diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.DeleteAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.DeleteAgentId.g.cs new file mode 100644 index 0000000..b0aa6d1 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.DeleteAgentId.g.cs @@ -0,0 +1,624 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_DeleteAgentIdSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_DeleteAgentIdSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_DeleteAgentIdSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_DeleteAgentIdSecurityRequirement0, + s_DeleteAgentIdSecurityRequirement1, + }; + partial void PrepareDeleteAgentIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId); + partial void PrepareDeleteAgentIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId); + partial void ProcessDeleteAgentIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteAgentIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete agent
+ /// Delete a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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 DeleteAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAgentIdAsResponseAsync( + agentId: agentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete agent
+ /// Delete a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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> DeleteAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteAgentIdArguments( + httpClient: HttpClient, + agentId: ref agentId); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteAgentIdSecurityRequirements, + operationName: "DeleteAgentIdAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: $"/v1/agent/{agentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteAgentIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId!); + + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAgentId", + methodName: "DeleteAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAgentId", + methodName: "DeleteAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAgentId", + methodName: "DeleteAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Braintrust.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); + ProcessDeleteAgentIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAgentId", + methodName: "DeleteAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAgentId", + methodName: "DeleteAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteAgentIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgent.g.cs new file mode 100644 index 0000000..834a2d0 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgent.g.cs @@ -0,0 +1,701 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_GetAgentSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_GetAgentSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_GetAgentSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_GetAgentSecurityRequirement0, + s_GetAgentSecurityRequirement1, + }; + partial void PrepareGetAgentArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref global::System.Guid? startingAfter, + ref global::System.Guid? endingBefore, + ref global::Braintrust.Ids? ids, + ref string? agentName, + ref string? orgName); + partial void PrepareGetAgentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + global::System.Guid? startingAfter, + global::System.Guid? endingBefore, + global::Braintrust.Ids? ids, + string? agentName, + string? orgName); + partial void ProcessGetAgentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAgentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List agents
+ /// List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first + ///
+ /// + /// Limit the number of objects to return + /// + /// + /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times + /// + /// + /// Name of the agent to search for + /// + /// + /// Filter search results to within a particular organization + /// + /// 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 GetAgentAsync( + int? limit = default, + global::System.Guid? startingAfter = default, + global::System.Guid? endingBefore = default, + global::Braintrust.Ids? ids = default, + string? agentName = default, + string? orgName = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAgentAsResponseAsync( + limit: limit, + startingAfter: startingAfter, + endingBefore: endingBefore, + ids: ids, + agentName: agentName, + orgName: orgName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List agents
+ /// List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first + ///
+ /// + /// Limit the number of objects to return + /// + /// + /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times + /// + /// + /// Name of the agent to search for + /// + /// + /// Filter search results to within a particular organization + /// + /// 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> GetAgentAsResponseAsync( + int? limit = default, + global::System.Guid? startingAfter = default, + global::System.Guid? endingBefore = default, + global::Braintrust.Ids? ids = default, + string? agentName = default, + string? orgName = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetAgentArguments( + httpClient: HttpClient, + limit: ref limit, + startingAfter: ref startingAfter, + endingBefore: ref endingBefore, + ids: ref ids, + agentName: ref agentName, + orgName: ref orgName); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAgentSecurityRequirements, + operationName: "GetAgentAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: "/v1/agent", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("starting_after", startingAfter?.ToString()) + .AddOptionalParameter("ending_before", endingBefore?.ToString()) + .AddOptionalParameter("ids", ids?.ToString()) + .AddOptionalParameter("agent_name", agentName) + .AddOptionalParameter("org_name", orgName) + ; + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.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::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetAgentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + startingAfter: startingAfter, + endingBefore: endingBefore, + ids: ids, + agentName: agentName, + orgName: orgName); + + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgent", + methodName: "GetAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgent", + methodName: "GetAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgent", + methodName: "GetAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.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); + ProcessGetAgentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgent", + methodName: "GetAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgent", + methodName: "GetAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetAgentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.GetAgentResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.GetAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgentId.g.cs new file mode 100644 index 0000000..5dd24dc --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.GetAgentId.g.cs @@ -0,0 +1,624 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_GetAgentIdSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_GetAgentIdSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_GetAgentIdSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_GetAgentIdSecurityRequirement0, + s_GetAgentIdSecurityRequirement1, + }; + partial void PrepareGetAgentIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId); + partial void PrepareGetAgentIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId); + partial void ProcessGetAgentIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAgentIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get agent
+ /// Get a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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 GetAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAgentIdAsResponseAsync( + agentId: agentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get agent
+ /// Get a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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> GetAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetAgentIdArguments( + httpClient: HttpClient, + agentId: ref agentId); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAgentIdSecurityRequirements, + operationName: "GetAgentIdAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: $"/v1/agent/{agentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.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::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetAgentIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId!); + + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgentId", + methodName: "GetAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgentId", + methodName: "GetAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgentId", + methodName: "GetAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.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); + ProcessGetAgentIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgentId", + methodName: "GetAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAgentId", + methodName: "GetAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetAgentIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PatchAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PatchAgentId.g.cs new file mode 100644 index 0000000..5b08881 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PatchAgentId.g.cs @@ -0,0 +1,684 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PatchAgentIdSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PatchAgentIdSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_PatchAgentIdSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_PatchAgentIdSecurityRequirement0, + s_PatchAgentIdSecurityRequirement1, + }; + partial void PreparePatchAgentIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId, + global::Braintrust.PatchAgent request); + partial void PreparePatchAgentIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId, + global::Braintrust.PatchAgent request); + partial void ProcessPatchAgentIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPatchAgentIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// 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 PatchAgentIdAsync( + global::System.Guid agentId, + + global::Braintrust.PatchAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PatchAgentIdAsResponseAsync( + agentId: agentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// 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> PatchAgentIdAsResponseAsync( + global::System.Guid agentId, + + global::Braintrust.PatchAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePatchAgentIdArguments( + httpClient: HttpClient, + agentId: ref agentId, + request: request); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PatchAgentIdSecurityRequirements, + operationName: "PatchAgentIdAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: $"/v1/agent/{agentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.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::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePatchAgentIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId!, + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchAgentId", + methodName: "PatchAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchAgentId", + methodName: "PatchAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchAgentId", + methodName: "PatchAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.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); + ProcessPatchAgentIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchAgentId", + methodName: "PatchAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchAgentId", + methodName: "PatchAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPatchAgentIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PatchAgentIdAsync( + global::System.Guid agentId, + string? name = default, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Braintrust.PatchAgent + { + Name = name, + Description = description, + Metadata = metadata, + }; + + return await PatchAgentIdAsync( + agentId: agentId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PostAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PostAgent.g.cs new file mode 100644 index 0000000..aa8f95f --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PostAgent.g.cs @@ -0,0 +1,671 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PostAgentSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PostAgentSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_PostAgentSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_PostAgentSecurityRequirement0, + s_PostAgentSecurityRequirement1, + }; + partial void PreparePostAgentArguments( + global::System.Net.Http.HttpClient httpClient, + global::Braintrust.CreateAgent request); + partial void PreparePostAgentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Braintrust.CreateAgent request); + partial void ProcessPostAgentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostAgentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// 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 PostAgentAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PostAgentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// 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> PostAgentAsResponseAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePostAgentArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PostAgentSecurityRequirements, + operationName: "PostAgentAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: "/v1/agent", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.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::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePostAgentRequest( + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PostAgent", + methodName: "PostAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PostAgent", + methodName: "PostAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PostAgent", + methodName: "PostAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.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); + ProcessPostAgentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PostAgent", + methodName: "PostAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PostAgent", + methodName: "PostAgentAsync", + pathTemplate: "\"/v1/agent\"", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPostAgentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PostAgentAsync( + global::System.Guid projectId, + string name, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Braintrust.CreateAgent + { + ProjectId = projectId, + Name = name, + Description = description, + Metadata = metadata, + }; + + return await PostAgentAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PutAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PutAgent.g.cs new file mode 100644 index 0000000..be45441 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.PutAgent.g.cs @@ -0,0 +1,671 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class AgentsClient + { + + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PutAgentSecurityRequirement0 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { new global::Braintrust.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + + private static readonly global::Braintrust.EndPointSecurityRequirement s_PutAgentSecurityRequirement1 = + new global::Braintrust.EndPointSecurityRequirement + { + Authorizations = new global::Braintrust.EndPointAuthorizationRequirement[] + { + }, + }; + private static readonly global::Braintrust.EndPointSecurityRequirement[] s_PutAgentSecurityRequirements = + new global::Braintrust.EndPointSecurityRequirement[] + { s_PutAgentSecurityRequirement0, + s_PutAgentSecurityRequirement1, + }; + partial void PreparePutAgentArguments( + global::System.Net.Http.HttpClient httpClient, + global::Braintrust.CreateAgent request); + partial void PreparePutAgentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Braintrust.CreateAgent request); + partial void ProcessPutAgentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPutAgentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// 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 PutAgentAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PutAgentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// 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> PutAgentAsResponseAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePutAgentArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Braintrust.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PutAgentSecurityRequirements, + operationName: "PutAgentAsync"); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: "/v1/agent", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + 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::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePutAgentRequest( + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PutAgent", + methodName: "PutAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "PUT", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PutAgent", + methodName: "PutAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "PUT", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PutAgent", + methodName: "PutAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "PUT", + 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::Braintrust.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); + ProcessPutAgentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PutAgent", + methodName: "PutAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "PUT", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PutAgent", + methodName: "PutAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "PUT", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // No valid API key provided + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + string? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The API key doesn’t have permissions to perform the request + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + string? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests hit the API too quickly. We recommend an exponential backoff of your requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + string? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Something went wrong on Braintrust's end. (These are rare.) + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + string? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPutAgentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Braintrust.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Braintrust.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PutAgentAsync( + global::System.Guid projectId, + string name, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Braintrust.CreateAgent + { + ProjectId = projectId, + Name = name, + Description = description, + Metadata = metadata, + }; + + return await PutAgentAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.AgentsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.g.cs new file mode 100644 index 0000000..30818d6 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.AgentsClient.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class AgentsClient : global::Braintrust.IAgentsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.braintrust.dev/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Braintrust.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Braintrust.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the AgentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Braintrust.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the AgentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public AgentsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Braintrust.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Braintrust.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs index ee52d2f..0164133 100644 --- a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs @@ -51,6 +51,15 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public AgentsClient Agents => new AgentsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgent.g.cs new file mode 100644 index 0000000..9028609 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgent.g.cs @@ -0,0 +1,388 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class CorsClient + { + partial void PrepareOptionsAgentArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareOptionsAgentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessOptionsAgentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Enable CORS (`/v1/agent`)
+ /// Enable CORS + ///
+ /// 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 OptionsAgentAsync( + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await OptionsAgentAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Enable CORS (`/v1/agent`)
+ /// Enable CORS + ///
+ /// 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 OptionsAgentAsResponseAsync( + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareOptionsAgentArguments( + httpClient: HttpClient); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: "/v1/agent", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Options, + 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 + global::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareOptionsAgentRequest( + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgent", + methodName: "OptionsAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgent", + methodName: "OptionsAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgent", + methodName: "OptionsAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "OPTIONS", + 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::Braintrust.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); + ProcessOptionsAgentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgent", + methodName: "OptionsAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgent", + methodName: "OptionsAgentAsync", + pathTemplate: "\"/v1/agent\"", + httpMethod: "OPTIONS", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgentId.g.cs new file mode 100644 index 0000000..3aaa07f --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAgentId.g.cs @@ -0,0 +1,401 @@ + +#nullable enable + +namespace Braintrust +{ + public partial class CorsClient + { + partial void PrepareOptionsAgentIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId); + partial void PrepareOptionsAgentIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId); + partial void ProcessOptionsAgentIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Enable CORS (`/v1/agent/{agent_id}`)
+ /// Enable CORS + ///
+ /// + /// Agent id + /// + /// 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 OptionsAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await OptionsAgentIdAsResponseAsync( + agentId: agentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Enable CORS (`/v1/agent/{agent_id}`)
+ /// Enable CORS + ///
+ /// + /// Agent id + /// + /// 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 OptionsAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareOptionsAgentIdArguments( + httpClient: HttpClient, + agentId: ref agentId); + + using var __timeoutCancellationTokenSource = global::Braintrust.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Braintrust.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Braintrust.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Braintrust.PathBuilder( + path: $"/v1/agent/{agentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Options, + 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 + global::Braintrust.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareOptionsAgentIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId!); + + 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::Braintrust.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgentId", + methodName: "OptionsAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgentId", + methodName: "OptionsAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgentId", + methodName: "OptionsAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "OPTIONS", + 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::Braintrust.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); + ProcessOptionsAgentIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgentId", + methodName: "OptionsAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "OPTIONS", + 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::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "OptionsAgentId", + methodName: "OptionsAgentIdAsync", + pathTemplate: "$\"/v1/agent/{agentId}\"", + httpMethod: "OPTIONS", + 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); + } + // The request was unacceptable, often due to missing a required parameter + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + string? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Braintrust.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Braintrust.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.DeleteAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.DeleteAgentId.g.cs new file mode 100644 index 0000000..a352edc --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.DeleteAgentId.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// Delete agent
+ /// Delete a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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 DeleteAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete agent
+ /// Delete a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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> DeleteAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgent.g.cs new file mode 100644 index 0000000..1d1da42 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgent.g.cs @@ -0,0 +1,80 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// List agents
+ /// List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first + ///
+ /// + /// Limit the number of objects to return + /// + /// + /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times + /// + /// + /// Name of the agent to search for + /// + /// + /// Filter search results to within a particular organization + /// + /// 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 GetAgentAsync( + int? limit = default, + global::System.Guid? startingAfter = default, + global::System.Guid? endingBefore = default, + global::Braintrust.Ids? ids = default, + string? agentName = default, + string? orgName = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List agents
+ /// List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first + ///
+ /// + /// Limit the number of objects to return + /// + /// + /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before` + /// + /// + /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times + /// + /// + /// Name of the agent to search for + /// + /// + /// Filter search results to within a particular organization + /// + /// 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> GetAgentAsResponseAsync( + int? limit = default, + global::System.Guid? startingAfter = default, + global::System.Guid? endingBefore = default, + global::Braintrust.Ids? ids = default, + string? agentName = default, + string? orgName = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgentId.g.cs new file mode 100644 index 0000000..2f6b991 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.GetAgentId.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// Get agent
+ /// Get a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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 GetAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get agent
+ /// Get a agent object by its id + ///
+ /// + /// Agent id + /// + /// 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> GetAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PatchAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PatchAgentId.g.cs new file mode 100644 index 0000000..0a52dc1 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PatchAgentId.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// 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 PatchAgentIdAsync( + global::System.Guid agentId, + + global::Braintrust.PatchAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// 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> PatchAgentIdAsResponseAsync( + global::System.Guid agentId, + + global::Braintrust.PatchAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Partially update agent
+ /// Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. + ///
+ /// + /// Agent id + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PatchAgentIdAsync( + global::System.Guid agentId, + string? name = default, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PostAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PostAgent.g.cs new file mode 100644 index 0000000..dab1363 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PostAgent.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// 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 PostAgentAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// 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> PostAgentAsResponseAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create agent
+ /// Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified + ///
+ /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PostAgentAsync( + global::System.Guid projectId, + string name, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PutAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PutAgent.g.cs new file mode 100644 index 0000000..4cfc18d --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.PutAgent.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface IAgentsClient + { + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// 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 PutAgentAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// 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> PutAgentAsResponseAsync( + + global::Braintrust.CreateAgent request, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or replace agent
+ /// Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields + ///
+ /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// + /// 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 PutAgentAsync( + global::System.Guid projectId, + string name, + string? description = default, + global::System.Collections.Generic.Dictionary? metadata = default, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.g.cs new file mode 100644 index 0000000..02df4f3 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.IAgentsClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IAgentsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Braintrust.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IBraintrustClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.IBraintrustClient.g.cs index 2f8ba1e..5520a65 100644 --- a/src/libs/Braintrust/Generated/Braintrust.IBraintrustClient.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.IBraintrustClient.g.cs @@ -52,6 +52,11 @@ public partial interface IBraintrustClient : global::System.IDisposable /// public AclsClient Acls { get; } + /// + /// + /// + public AgentsClient Agents { get; } + /// /// /// diff --git a/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgent.g.cs new file mode 100644 index 0000000..06798fa --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgent.g.cs @@ -0,0 +1,28 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface ICorsClient + { + /// + /// Enable CORS (`/v1/agent`)
+ /// Enable CORS + ///
+ /// 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 OptionsAgentAsync( + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Enable CORS (`/v1/agent`)
+ /// Enable CORS + ///
+ /// 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 OptionsAgentAsResponseAsync( + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgentId.g.cs new file mode 100644 index 0000000..c1f76de --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.ICorsClient.OptionsAgentId.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Braintrust +{ + public partial interface ICorsClient + { + /// + /// Enable CORS (`/v1/agent/{agent_id}`)
+ /// Enable CORS + ///
+ /// + /// Agent id + /// + /// 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 OptionsAgentIdAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Enable CORS (`/v1/agent/{agent_id}`)
+ /// Enable CORS + ///
+ /// + /// Agent id + /// + /// 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 OptionsAgentIdAsResponseAsync( + global::System.Guid agentId, + global::Braintrust.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PatchProjectAutomationId.g.cs b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PatchProjectAutomationId.g.cs index 4c4e789..a34ac95 100644 --- a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PatchProjectAutomationId.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PatchProjectAutomationId.g.cs @@ -61,7 +61,7 @@ public partial interface IProjectAutomationsClient global::System.Guid projectAutomationId, string? name = default, string? description = default, - global::Braintrust.OneOf? config = default, + global::Braintrust.OneOf? config = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PostProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PostProjectAutomation.g.cs index 25274fe..177a9ec 100644 --- a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PostProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PostProjectAutomation.g.cs @@ -52,7 +52,7 @@ public partial interface IProjectAutomationsClient global::System.Threading.Tasks.Task PostProjectAutomationAsync( global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, string? description = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PutProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PutProjectAutomation.g.cs index e957eb9..7529ebe 100644 --- a/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PutProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.IProjectAutomationsClient.PutProjectAutomation.g.cs @@ -52,7 +52,7 @@ public partial interface IProjectAutomationsClient global::System.Threading.Tasks.Task PutProjectAutomationAsync( global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, string? description = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..32c1adb --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant3FormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant3Format 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::Braintrust.CreateProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant3Format); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant3Format value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant3FormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullable.g.cs new file mode 100644 index 0000000..2992c56 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant3FormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant3Format? 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::Braintrust.CreateProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant3Format?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant3Format? 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::Braintrust.CreateProjectAutomationConfigVariant3FormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..0d9934b --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant3ObjectTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType 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::Braintrust.CreateProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullable.g.cs new file mode 100644 index 0000000..ba2a4a7 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType? 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::Braintrust.CreateProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType? 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::Braintrust.CreateProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs index 05f4658..6cb9d21 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type Read( + public override global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonC var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonC case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type); + return default(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonC /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type value, + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs index 2ec491c..436124d 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type? Read( + public override global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeNulla var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue); + return global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeNulla case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type?); + return default(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant1TypeNulla /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type? value, + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs index 767ea2b..19ceede 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type Read( + public override global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonC var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonC case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type); + return default(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonC /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type value, + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs index e93b9da..ada8b7b 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class CreateProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type? Read( + public override global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeNulla var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue); + return global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeNulla case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type?); + return default(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class CreateProjectAutomationConfigVariant4ActionVariant2TypeNulla /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type? value, + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..331f343 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant5EventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant5EventType 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::Braintrust.CreateProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant5EventType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant5EventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.CreateProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullable.g.cs new file mode 100644 index 0000000..7930ed7 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class CreateProjectAutomationConfigVariant5EventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.CreateProjectAutomationConfigVariant5EventType? 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::Braintrust.CreateProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.CreateProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.CreateProjectAutomationConfigVariant5EventType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.CreateProjectAutomationConfigVariant5EventType? 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::Braintrust.CreateProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf5.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf7.g.cs similarity index 71% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf5.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf7.g.cs index be0a0e7..43cddd1 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf5.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.OneOf7.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> { /// - public override global::Braintrust.OneOf Read( + public override global::Braintrust.OneOf Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -81,6 +81,28 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } } + var __score5 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T6), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score5++; + } + } + } + var __score6 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T7), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score6++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -88,12 +110,16 @@ public class OneOfJsonConverter : global::System.Text.Json.S if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } if (__score4 > __bestScore) { __bestScore = __score4; __bestIndex = 4; } + if (__score5 > __bestScore) { __bestScore = __score5; __bestIndex = 5; } + if (__score6 > __bestScore) { __bestScore = __score6; __bestIndex = 6; } T1? value1 = default; T2? value2 = default; T3? value3 = default; T4? value4 = default; T5? value5 = default; + T6? value6 = default; + T7? value7 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -180,9 +206,43 @@ public class OneOfJsonConverter : global::System.Text.Json.S { } } + + else if (__bestIndex == 5) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + value6 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + else if (__bestIndex == 6) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + value7 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null) + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) { try { @@ -199,7 +259,7 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } - if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null) + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) { try { @@ -216,7 +276,7 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } - if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null) + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) { try { @@ -233,7 +293,7 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } - if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null) + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) { try { @@ -250,7 +310,7 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } - if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null) + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) { try { @@ -267,7 +327,41 @@ public class OneOfJsonConverter : global::System.Text.Json.S } } - var __value = new global::Braintrust.OneOf( + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + value6 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (value1 == null && value2 == null && value3 == null && value4 == null && value5 == null && value6 == null && value7 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + value7 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Braintrust.OneOf( value1, value2, @@ -276,7 +370,11 @@ public class OneOfJsonConverter : global::System.Text.Json.S value4, - value5 + value5, + + value6, + + value7 ); return __value; @@ -285,7 +383,7 @@ public class OneOfJsonConverter : global::System.Text.Json.S /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.OneOf value, + global::Braintrust.OneOf value, global::System.Text.Json.JsonSerializerOptions options) { options = options ?? throw new global::System.ArgumentNullException(nameof(options)); @@ -321,6 +419,18 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5!, typeInfo); } + else if (value.IsValue6) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6!, typeInfo); + } + else if (value.IsValue7) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..606c1ac --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant3FormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant3Format 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::Braintrust.PatchProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant3Format); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant3Format value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant3FormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullable.g.cs new file mode 100644 index 0000000..02e791d --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant3FormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant3Format? 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::Braintrust.PatchProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant3Format?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant3Format? 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::Braintrust.PatchProjectAutomationConfigVariant3FormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..534e903 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant3ObjectTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType 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::Braintrust.PatchProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullable.g.cs new file mode 100644 index 0000000..318179c --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType? 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::Braintrust.PatchProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType? 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::Braintrust.PatchProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs index 2596e6d..9799523 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class PatchProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type Read( + public override global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonCo var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonCo case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type); + return default(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonCo /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type value, + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs index 44121a1..10c9776 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class PatchProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type? Read( + public override global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeNullab var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue); + return global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeNullab case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type?); + return default(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant1TypeNullab /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type? value, + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs index fdf65d9..346ddc3 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class PatchProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type Read( + public override global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonCo var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonCo case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type); + return default(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonCo /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type value, + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs index 999b13f..ed7916d 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class PatchProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type? Read( + public override global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeNullab var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue); + return global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeNullab case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type?); + return default(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class PatchProjectAutomationConfigVariant4ActionVariant2TypeNullab /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type? value, + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..635d1df --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant5EventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant5EventType 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::Braintrust.PatchProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant5EventType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant5EventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.PatchProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullable.g.cs new file mode 100644 index 0000000..d80fe1b --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class PatchProjectAutomationConfigVariant5EventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.PatchProjectAutomationConfigVariant5EventType? 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::Braintrust.PatchProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.PatchProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.PatchProjectAutomationConfigVariant5EventType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.PatchProjectAutomationConfigVariant5EventType? 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::Braintrust.PatchProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..a4fada0 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant3FormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant3Format 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::Braintrust.ProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant3Format); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant3Format value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant3FormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullable.g.cs new file mode 100644 index 0000000..d0dbe51 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant3FormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant3Format? 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::Braintrust.ProjectAutomationConfigVariant3FormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant3Format)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant3Format?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant3Format? 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::Braintrust.ProjectAutomationConfigVariant3FormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..3369994 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant3ObjectTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant3ObjectType 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::Braintrust.ProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant3ObjectType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant3ObjectType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullable.g.cs new file mode 100644 index 0000000..dd3d47a --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant3ObjectType? 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::Braintrust.ProjectAutomationConfigVariant3ObjectTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant3ObjectType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant3ObjectType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant3ObjectType? 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::Braintrust.ProjectAutomationConfigVariant3ObjectTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 80% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs index 72bf7b5..c6c826a 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type Read( + public override global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeJsonConvert var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeJsonConvert case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type); + return default(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeJsonConvert /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type value, + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs index 51b54b8..184a14c 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type? Read( + public override global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeNullableJso var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToEnum(stringValue); + return global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeNullableJso case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type)numValue; + return (global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type?); + return default(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant1TypeNullableJso /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type? value, + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 80% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs index 4c20ce4..ed0730a 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type Read( + public override global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeJsonConvert var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; + return global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeJsonConvert case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type); + return default(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeJsonConvert /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type value, + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs rename to src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs index 56596a5..091f550 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullable.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Braintrust.JsonConverters { /// - public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type? Read( + public override global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeNullableJso var stringValue = reader.GetString(); if (stringValue != null) { - return global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToEnum(stringValue); + return global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeNullableJso case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type)numValue; + return (global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type?); + return default(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ProjectAutomationConfigVariant4ActionVariant2TypeNullableJso /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type? value, + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..8c46c75 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant5EventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant5EventType 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::Braintrust.ProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant5EventType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant5EventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.ProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullable.g.cs new file mode 100644 index 0000000..2ab6c3c --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectAutomationConfigVariant5EventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectAutomationConfigVariant5EventType? 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::Braintrust.ProjectAutomationConfigVariant5EventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectAutomationConfigVariant5EventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectAutomationConfigVariant5EventType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectAutomationConfigVariant5EventType? 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::Braintrust.ProjectAutomationConfigVariant5EventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehavior.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehavior.g.cs new file mode 100644 index 0000000..1f87a51 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehavior.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectScoreConditionBehaviorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectScoreConditionBehavior 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::Braintrust.ProjectScoreConditionBehaviorExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectScoreConditionBehavior)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectScoreConditionBehavior); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectScoreConditionBehavior value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Braintrust.ProjectScoreConditionBehaviorExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullable.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullable.g.cs new file mode 100644 index 0000000..e5b42bc --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Braintrust.JsonConverters +{ + /// + public sealed class ProjectScoreConditionBehaviorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Braintrust.ProjectScoreConditionBehavior? 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::Braintrust.ProjectScoreConditionBehaviorExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Braintrust.ProjectScoreConditionBehavior)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Braintrust.ProjectScoreConditionBehavior?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Braintrust.ProjectScoreConditionBehavior? 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::Braintrust.ProjectScoreConditionBehaviorExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContext.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContext.g.cs index 285a3fe..2639156 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContext.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContext.g.cs @@ -361,17 +361,29 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant1EventTypeJsonConverter), @@ -417,17 +429,29 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant1EventTypeJsonConverter), @@ -473,17 +497,29 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2FunctionTypeJsonConverter), @@ -493,6 +529,10 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2GlobalTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeJsonConverter), typeof(global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeNullableJsonConverter), @@ -863,7 +903,7 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.AnyOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -873,9 +913,9 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -885,9 +925,9 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -897,7 +937,7 @@ namespace Braintrust typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.AllOfJsonConverter?>), @@ -963,11 +1003,11 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>), TypeInfoPropertyName = "TopicMapFunctionAutomationFunctionVariant2Global_31dc6848fbb9ed5d")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList?>>), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_385eb3dc65d85bbf")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_35e623b86265f845")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_eaf8b9b49c567561")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_39b025dda331d8c6")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "ProjectAutomationConfigVariant2ExportDefinitionVariant3_2a6132df942795d9")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_ccd36d425d0ff8b1")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_894780c3462a57c1")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2ExportDefinitionVariant3_378e18d0da0115e9")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_object_c1d13683938f4e63")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_object_bcb4e8da6f037ee8")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2ExportDefinitionVariant3_a18e2b09c026c85e")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AnyOf), TypeInfoPropertyName = "CodeBundleLocationExperimentPositionClassifier_b29c562fd5b3ee2b")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers_5dbc7250a4b23b86")] @@ -981,12 +1021,12 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PromptDataNullishMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers_d50854d224e89aa6")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>?), TypeInfoPropertyName = "TopicMapFunctionAutomationFunctionVariant2Global_dd10e9b65bc14212")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>?), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_e7c55b45c643ace1")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_58df192aaf6fc2e5")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_0d6c5f854a69b14c")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "ProjectAutomationConfigVariant2ExportDefinitionVariant3_ec6424933b017d35")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_881d1aa9c96b0132")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_b7a8ff37db6c0845")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2ExportDefinitionVariant3_c447fd26e3994f56")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2CredentialsVariant2_4d1ae1fb74e40163")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_object_d9870abf8360f205")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_object_2bfedff763b4b9bd")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2ExportDefinitionVariant3_406398cc1ac2a868")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2CredentialsVariant2_8e5c5ea50cba239d")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AnyOf?), TypeInfoPropertyName = "CodeBundleLocationExperimentPositionClassifier_c4d9fe7d3ca7c609")] @@ -1247,6 +1287,9 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AclBatchUpdateRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.User))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.Agent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateAgent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchAgent))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AutomationStatus), TypeInfoPropertyName = "AutomationStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.SpanScope))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.SpanScopeType), TypeInfoPropertyName = "SpanScopeType2")] @@ -1305,13 +1348,17 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant2Type), TypeInfoPropertyName = "ProjectAutomationConfigVariant2CredentialsVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant3))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant3EventType), TypeInfoPropertyName = "ProjectAutomationConfigVariant3EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant3ObjectType), TypeInfoPropertyName = "ProjectAutomationConfigVariant3ObjectType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant3Format), TypeInfoPropertyName = "ProjectAutomationConfigVariant3Format2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4EventType), TypeInfoPropertyName = "ProjectAutomationConfigVariant4EventType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfProjectAutomationConfigVariant4ActionVariant1ProjectAutomationConfigVariant4ActionVariant22")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type), TypeInfoPropertyName = "ProjectAutomationConfigVariant4ActionVariant1Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type), TypeInfoPropertyName = "ProjectAutomationConfigVariant4ActionVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5EventType), TypeInfoPropertyName = "ProjectAutomationConfigVariant5EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfProjectAutomationConfigVariant5ActionVariant1ProjectAutomationConfigVariant5ActionVariant22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type), TypeInfoPropertyName = "ProjectAutomationConfigVariant5ActionVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type), TypeInfoPropertyName = "ProjectAutomationConfigVariant5ActionVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomation))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant1EventType), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant1EventType2")] @@ -1336,13 +1383,17 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant2Type), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2CredentialsVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant3))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant3EventType), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant3EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant3ObjectType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant3Format), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant3Format2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4EventType), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant4EventType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfCreateProjectAutomationConfigVariant4ActionVariant1CreateProjectAutomationConfigVariant4ActionVariant22")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant4ActionVariant1Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant4ActionVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5EventType), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant5EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfCreateProjectAutomationConfigVariant5ActionVariant1CreateProjectAutomationConfigVariant5ActionVariant22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant5ActionVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant5ActionVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomation))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant1EventType), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant1EventType2")] @@ -1367,13 +1418,17 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant2Type), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2CredentialsVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant3))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant3EventType), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant3EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant3ObjectType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant3Format), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant3Format2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4EventType), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant4EventType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfPatchProjectAutomationConfigVariant4ActionVariant1PatchProjectAutomationConfigVariant4ActionVariant22")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant4ActionVariant1Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant4ActionVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5EventType), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant5EventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "OneOfPatchProjectAutomationConfigVariant5ActionVariant1PatchProjectAutomationConfigVariant5ActionVariant22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant5ActionVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant5ActionVariant2Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreCategory))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreCategories), TypeInfoPropertyName = "ProjectScoreCategories2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -1385,6 +1440,9 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OnlineScoreConfigScorerVariant2FunctionType), TypeInfoPropertyName = "OnlineScoreConfigScorerVariant2FunctionType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OnlineScoreConfigScorerVariant2Global))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OnlineScoreConfigScorerVariant2GlobalType), TypeInfoPropertyName = "OnlineScoreConfigScorerVariant2GlobalType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreCondition))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreConditionWhen))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreConditionBehavior), TypeInfoPropertyName = "ProjectScoreConditionBehavior2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScoreConfigVisibility))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.ProjectScore))] @@ -1435,24 +1493,6 @@ namespace Braintrust [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant4))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant4Position))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant4Type), TypeInfoPropertyName = "GraphNodeVariant4Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5Position))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5Type), TypeInfoPropertyName = "GraphNodeVariant5Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6Position))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6Type), TypeInfoPropertyName = "GraphNodeVariant6Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7Position))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7Type), TypeInfoPropertyName = "GraphNodeVariant7Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8Position))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8Type), TypeInfoPropertyName = "GraphNodeVariant8Type2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdge))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgeSource))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgeTarget))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgePurpose), TypeInfoPropertyName = "GraphEdgePurpose2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphData))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphDataType), TypeInfoPropertyName = "GraphDataType2")] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1812,17 +1852,29 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant1EventTypeJsonConverter), @@ -1868,17 +1920,29 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant1EventTypeJsonConverter), @@ -1924,17 +1988,29 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3EventTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeJsonConverter), typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter), - typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter), + + typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter), typeof(global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2FunctionTypeJsonConverter), @@ -1944,6 +2020,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2GlobalTypeNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorJsonConverter), + + typeof(global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullableJsonConverter), + typeof(global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeJsonConverter), typeof(global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeNullableJsonConverter), @@ -2314,7 +2394,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.AnyOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -2324,9 +2404,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -2336,9 +2416,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), @@ -2348,7 +2428,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), - typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), + typeof(global::Braintrust.JsonConverters.OneOfJsonConverter), typeof(global::Braintrust.JsonConverters.AllOfJsonConverter?>), @@ -2414,11 +2494,11 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>), TypeInfoPropertyName = "TopicMapFunctionAutomationFunctionVariant2Global_31dc6848fbb9ed5d")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList?>>), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_385eb3dc65d85bbf")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_35e623b86265f845")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_eaf8b9b49c567561")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_39b025dda331d8c6")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "ProjectAutomationConfigVariant2ExportDefinitionVariant3_2a6132df942795d9")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_ccd36d425d0ff8b1")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_894780c3462a57c1")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2ExportDefinitionVariant3_378e18d0da0115e9")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_object_c1d13683938f4e63")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "TopicAutomationConfig_object_bcb4e8da6f037ee8")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2ExportDefinitionVariant3_a18e2b09c026c85e")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AnyOf), TypeInfoPropertyName = "CodeBundleLocationExperimentPositionClassifier_b29c562fd5b3ee2b")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf), TypeInfoPropertyName = "PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers_5dbc7250a4b23b86")] @@ -2432,17 +2512,35 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PromptDataNullishMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers_d50854d224e89aa6")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>?), TypeInfoPropertyName = "TopicMapFunctionAutomationFunctionVariant2Global_dd10e9b65bc14212")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AllOf?>?), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_e7c55b45c643ace1")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_58df192aaf6fc2e5")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_0d6c5f854a69b14c")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "ProjectAutomationConfigVariant2ExportDefinitionVariant3_ec6424933b017d35")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_881d1aa9c96b0132")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_b7a8ff37db6c0845")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2ExportDefinitionVariant3_c447fd26e3994f56")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "CreateProjectAutomationConfigVariant2CredentialsVariant2_4d1ae1fb74e40163")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_object_d9870abf8360f205")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "TopicAutomationConfig_object_2bfedff763b4b9bd")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2ExportDefinitionVariant3_406398cc1ac2a868")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PatchProjectAutomationConfigVariant2CredentialsVariant2_8e5c5ea50cba239d")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.AnyOf?), TypeInfoPropertyName = "CodeBundleLocationExperimentPositionClassifier_c4d9fe7d3ca7c609")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.OneOf?), TypeInfoPropertyName = "PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers_2c2424cd8ae0cdf5")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List?>>), TypeInfoPropertyName = "TopicAutomationConfigFacetFunctionVariant2Global_0de25e7b7f3aebf4")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5Position))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant5Type), TypeInfoPropertyName = "GraphNodeVariant5Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6Position))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant6Type), TypeInfoPropertyName = "GraphNodeVariant6Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7Position))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant7Type), TypeInfoPropertyName = "GraphNodeVariant7Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8Position))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphNodeVariant8Type), TypeInfoPropertyName = "GraphNodeVariant8Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdge))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgeSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgeTarget))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphEdgePurpose), TypeInfoPropertyName = "GraphEdgePurpose2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphData))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GraphDataType), TypeInfoPropertyName = "GraphDataType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.FacetData))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.FacetDataType), TypeInfoPropertyName = "FacetDataType2")] @@ -2660,6 +2758,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GetAclResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GetUserResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GetAgentResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GetProjectAutomationResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Braintrust.GetProjectScoreResponse))] @@ -2751,6 +2851,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -2981,12 +3082,18 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant2CredentialsVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4EventTypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant1EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant1EventTypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant1ActionVariant1TypeJsonConverter()); @@ -3009,12 +3116,18 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant2CredentialsVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4EventTypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant1EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant1EventTypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant1ActionVariant1TypeJsonConverter()); @@ -3037,16 +3150,24 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant2CredentialsVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4EventTypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeNullableJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2FunctionTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2FunctionTypeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2GlobalTypeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OnlineScoreConfigScorerVariant2GlobalTypeNullableJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CodeBundleRuntimeContextRuntimeNullableJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.CodeBundleLocationExperimentTypeJsonConverter()); @@ -3232,24 +3353,24 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Braintrust.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AllOfJsonConverter?>()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Braintrust.JsonConverters.AnyOfJsonConverter()); diff --git a/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContextTypes.g.cs b/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContextTypes.g.cs index 2c38539..d408fa8 100644 --- a/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContextTypes.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.JsonSerializerContextTypes.g.cs @@ -1012,1799 +1012,1879 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Braintrust.AutomationStatus? Type246 { get; set; } + public global::Braintrust.Agent? Type246 { get; set; } /// /// /// - public global::Braintrust.SpanScope? Type247 { get; set; } + public global::Braintrust.CreateAgent? Type247 { get; set; } /// /// /// - public global::Braintrust.SpanScopeType? Type248 { get; set; } + public global::Braintrust.PatchAgent? Type248 { get; set; } /// /// /// - public global::Braintrust.TraceScope? Type249 { get; set; } + public global::Braintrust.AutomationStatus? Type249 { get; set; } /// /// /// - public global::Braintrust.TraceScopeType? Type250 { get; set; } + public global::Braintrust.SpanScope? Type250 { get; set; } /// /// /// - public global::Braintrust.GroupScope? Type251 { get; set; } + public global::Braintrust.SpanScopeType? Type251 { get; set; } /// /// /// - public global::Braintrust.GroupScopeType? Type252 { get; set; } + public global::Braintrust.TraceScope? Type252 { get; set; } /// /// /// - public global::Braintrust.GroupScopePlacement? Type253 { get; set; } + public global::Braintrust.TraceScopeType? Type253 { get; set; } /// /// /// - public global::Braintrust.RetentionObjectType? Type254 { get; set; } + public global::Braintrust.GroupScope? Type254 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationFacetModel? Type255 { get; set; } + public global::Braintrust.GroupScopeType? Type255 { get; set; } /// /// /// - public global::Braintrust.TopicMapFunctionAutomation? Type256 { get; set; } + public global::Braintrust.GroupScopePlacement? Type256 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type257 { get; set; } + public global::Braintrust.RetentionObjectType? Type257 { get; set; } /// /// /// - public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2Function? Type258 { get; set; } + public global::Braintrust.TopicAutomationFacetModel? Type258 { get; set; } /// /// /// - public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2FunctionType? Type259 { get; set; } + public global::Braintrust.TopicMapFunctionAutomation? Type259 { get; set; } /// /// /// - public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2Global? Type260 { get; set; } + public global::Braintrust.AnyOf? Type260 { get; set; } /// /// /// - public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2GlobalType? Type261 { get; set; } + public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2Function? Type261 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScope? Type262 { get; set; } + public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2FunctionType? Type262 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant1? Type263 { get; set; } + public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2Global? Type263 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant1Type? Type264 { get; set; } + public global::Braintrust.TopicMapFunctionAutomationFunctionVariant2GlobalType? Type264 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant2? Type265 { get; set; } + public global::Braintrust.TopicAutomationDataScope? Type265 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant2Type? Type266 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant1? Type266 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant3? Type267 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant1Type? Type267 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationDataScopeVariant3Type? Type268 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant2? Type268 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfig? Type269 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant2Type? Type269 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigEventType? Type270 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant3? Type270 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type271 { get; set; } + public global::Braintrust.TopicAutomationDataScopeVariant3Type? Type271 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2Function? Type272 { get; set; } + public global::Braintrust.TopicAutomationConfig? Type272 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2FunctionType? Type273 { get; set; } + public global::Braintrust.TopicAutomationConfigEventType? Type273 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2Global? Type274 { get; set; } + public global::Braintrust.AnyOf? Type274 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2GlobalType? Type275 { get; set; } + public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2Function? Type275 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type276 { get; set; } + public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2FunctionType? Type276 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type277 { get; set; } + public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2Global? Type277 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type278 { get; set; } + public global::Braintrust.TopicAutomationConfigFacetFunctionVariant2GlobalType? Type278 { get; set; } /// /// /// - public global::Braintrust.TopicAutomationConfigBackfillTimeRange? Type279 { get; set; } + public global::System.Collections.Generic.IList? Type279 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomation? Type280 { get; set; } + public global::Braintrust.AnyOf? Type280 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1? Type281 { get; set; } + public global::Braintrust.AnyOf? Type281 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1EventType? Type282 { get; set; } + public global::Braintrust.TopicAutomationConfigBackfillTimeRange? Type282 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type283 { get; set; } + public global::Braintrust.ProjectAutomation? Type283 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant1? Type284 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1? Type284 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant1Type? Type285 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1EventType? Type285 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant2? Type286 { get; set; } + public global::Braintrust.OneOf? Type286 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant2Type? Type287 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant1? Type287 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2? Type288 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant1Type? Type288 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2EventType? Type289 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant2? Type289 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant1? Type290 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant1ActionVariant2Type? Type290 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type291 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2? Type291 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant2? Type292 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2EventType? Type292 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type293 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant1? Type293 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant3? Type294 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type294 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type295 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant2? Type295 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2Format? Type296 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type296 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type297 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant3? Type297 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant1? Type298 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type298 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant1Type? Type299 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2Format? Type299 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant2? Type300 { get; set; } + public global::Braintrust.OneOf? Type300 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant2Type? Type301 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant1? Type301 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant3? Type302 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant1Type? Type302 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant3EventType? Type303 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant2? Type303 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4? Type304 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant2CredentialsVariant2Type? Type304 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4EventType? Type305 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant3? Type305 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type306 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant3EventType? Type306 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1? Type307 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant3ObjectType? Type307 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type? Type308 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant3Format? Type308 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2? Type309 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant4? Type309 { get; set; } /// /// /// - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type? Type310 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant4EventType? Type310 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomation? Type311 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5? Type311 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1? Type312 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5EventType? Type312 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1EventType? Type313 { get; set; } + public global::Braintrust.OneOf? Type313 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type314 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1? Type314 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant1? Type315 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type? Type315 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant1Type? Type316 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2? Type316 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant2? Type317 { get; set; } + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type? Type317 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant2Type? Type318 { get; set; } + public global::Braintrust.CreateProjectAutomation? Type318 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2? Type319 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1? Type319 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2EventType? Type320 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1EventType? Type320 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant1? Type321 { get; set; } + public global::Braintrust.OneOf? Type321 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type322 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant1? Type322 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant2? Type323 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant1Type? Type323 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type324 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant2? Type324 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant3? Type325 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant1ActionVariant2Type? Type325 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type326 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2? Type326 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2Format? Type327 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2EventType? Type327 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant1? Type328 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant1? Type328 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant1Type? Type329 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type329 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant2? Type330 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant2? Type330 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant2Type? Type331 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type331 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant3? Type332 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant3? Type332 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant3EventType? Type333 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type333 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4? Type334 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2Format? Type334 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4EventType? Type335 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant1? Type335 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type336 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant1Type? Type336 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1? Type337 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant2? Type337 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type? Type338 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant2CredentialsVariant2Type? Type338 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2? Type339 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant3? Type339 { get; set; } /// /// /// - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type? Type340 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant3EventType? Type340 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomation? Type341 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType? Type341 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1? Type342 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant3Format? Type342 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1EventType? Type343 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant4? Type343 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type344 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant4EventType? Type344 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant1? Type345 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5? Type345 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant1Type? Type346 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5EventType? Type346 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant2? Type347 { get; set; } + public global::Braintrust.OneOf? Type347 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant2Type? Type348 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1? Type348 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2? Type349 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type? Type349 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2EventType? Type350 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2? Type350 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant1? Type351 { get; set; } + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type? Type351 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type352 { get; set; } + public global::Braintrust.PatchProjectAutomation? Type352 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant2? Type353 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1? Type353 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type354 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1EventType? Type354 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant3? Type355 { get; set; } + public global::Braintrust.OneOf? Type355 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type356 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant1? Type356 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2Format? Type357 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant1Type? Type357 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant1? Type358 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant2? Type358 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant1Type? Type359 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant1ActionVariant2Type? Type359 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant2? Type360 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2? Type360 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant2Type? Type361 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2EventType? Type361 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant3? Type362 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant1? Type362 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant3EventType? Type363 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant1Type? Type363 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4? Type364 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant2? Type364 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4EventType? Type365 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant2Type? Type365 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type366 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant3? Type366 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1? Type367 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2ExportDefinitionVariant3Type? Type367 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type? Type368 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2Format? Type368 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2? Type369 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant1? Type369 { get; set; } /// /// /// - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type? Type370 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant1Type? Type370 { get; set; } /// /// /// - public global::Braintrust.ProjectScoreCategory? Type371 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant2? Type371 { get; set; } /// /// /// - public global::Braintrust.ProjectScoreCategories? Type372 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant2CredentialsVariant2Type? Type372 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type373 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant3? Type373 { get; set; } /// /// /// - public global::Braintrust.OnlineScoreConfig? Type374 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant3EventType? Type374 { get; set; } /// /// /// - public global::System.Collections.Generic.IList?>>? Type375 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType? Type375 { get; set; } /// /// /// - public global::Braintrust.AllOf?>? Type376 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant3Format? Type376 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type377 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant4? Type377 { get; set; } /// /// /// - public global::Braintrust.OnlineScoreConfigScorerVariant2Function? Type378 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant4EventType? Type378 { get; set; } /// /// /// - public global::Braintrust.OnlineScoreConfigScorerVariant2FunctionType? Type379 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5? Type379 { get; set; } /// /// /// - public global::Braintrust.OnlineScoreConfigScorerVariant2Global? Type380 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5EventType? Type380 { get; set; } /// /// /// - public global::Braintrust.OnlineScoreConfigScorerVariant2GlobalType? Type381 { get; set; } + public global::Braintrust.OneOf? Type381 { get; set; } /// /// /// - public global::Braintrust.ProjectScoreConfig? Type382 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1? Type382 { get; set; } /// /// /// - public global::Braintrust.ProjectScoreConfigVisibility? Type383 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type? Type383 { get; set; } /// /// /// - public global::Braintrust.ProjectScore? Type384 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2? Type384 { get; set; } /// /// /// - public global::Braintrust.CreateProjectScore? Type385 { get; set; } + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type? Type385 { get; set; } /// /// /// - public global::Braintrust.PatchProjectScore? Type386 { get; set; } + public global::Braintrust.ProjectScoreCategory? Type386 { get; set; } /// /// /// - public global::Braintrust.ProjectTag? Type387 { get; set; } + public global::Braintrust.ProjectScoreCategories? Type387 { get; set; } /// /// /// - public global::Braintrust.CreateProjectTag? Type388 { get; set; } + public global::System.Collections.Generic.IList? Type388 { get; set; } /// /// /// - public global::Braintrust.PatchProjectTag? Type389 { get; set; } + public global::Braintrust.OnlineScoreConfig? Type389 { get; set; } /// /// /// - public global::Braintrust.SpanIFrame? Type390 { get; set; } + public global::System.Collections.Generic.IList?>>? Type390 { get; set; } /// /// /// - public global::Braintrust.CreateSpanIFrame? Type391 { get; set; } + public global::Braintrust.AllOf?>? Type391 { get; set; } /// /// /// - public global::Braintrust.PatchSpanIFrame? Type392 { get; set; } + public global::Braintrust.AnyOf? Type392 { get; set; } /// /// /// - public global::Braintrust.CodeBundle? Type393 { get; set; } + public global::Braintrust.OnlineScoreConfigScorerVariant2Function? Type393 { get; set; } /// /// /// - public global::Braintrust.CodeBundleRuntimeContext? Type394 { get; set; } + public global::Braintrust.OnlineScoreConfigScorerVariant2FunctionType? Type394 { get; set; } /// /// /// - public global::Braintrust.CodeBundleRuntimeContextRuntime? Type395 { get; set; } + public global::Braintrust.OnlineScoreConfigScorerVariant2Global? Type395 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type396 { get; set; } + public global::Braintrust.OnlineScoreConfigScorerVariant2GlobalType? Type396 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperiment? Type397 { get; set; } + public global::Braintrust.ProjectScoreCondition? Type397 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentType? Type398 { get; set; } + public global::Braintrust.ProjectScoreConditionWhen? Type398 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionVariant1? Type399 { get; set; } + public global::Braintrust.ProjectScoreConditionBehavior? Type399 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionVariant1Type? Type400 { get; set; } + public global::Braintrust.ProjectScoreConfig? Type400 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionScorer? Type401 { get; set; } + public global::Braintrust.ProjectScoreConfigVisibility? Type401 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionScorerType? Type402 { get; set; } + public global::Braintrust.ProjectScore? Type402 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionClassifier? Type403 { get; set; } + public global::Braintrust.CreateProjectScore? Type403 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationExperimentPositionClassifierType? Type404 { get; set; } + public global::Braintrust.PatchProjectScore? Type404 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationFunction? Type405 { get; set; } + public global::Braintrust.ProjectTag? Type405 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationFunctionType? Type406 { get; set; } + public global::Braintrust.CreateProjectTag? Type406 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3? Type407 { get; set; } + public global::Braintrust.PatchProjectTag? Type407 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3Type? Type408 { get; set; } + public global::Braintrust.SpanIFrame? Type408 { get; set; } /// /// /// - public global::Braintrust.OneOf? Type409 { get; set; } + public global::Braintrust.CreateSpanIFrame? Type409 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant1? Type410 { get; set; } + public global::Braintrust.PatchSpanIFrame? Type410 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant1Provider? Type411 { get; set; } + public global::Braintrust.CodeBundle? Type411 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant2? Type412 { get; set; } + public global::Braintrust.CodeBundleRuntimeContext? Type412 { get; set; } /// /// /// - public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant2Provider? Type413 { get; set; } + public global::Braintrust.CodeBundleRuntimeContextRuntime? Type413 { get; set; } /// /// /// - public global::Braintrust.PromptBlockData? Type414 { get; set; } + public global::Braintrust.AnyOf? Type414 { get; set; } /// /// /// - public global::Braintrust.PromptBlockDataChat? Type415 { get; set; } + public global::Braintrust.CodeBundleLocationExperiment? Type415 { get; set; } /// /// /// - public global::Braintrust.PromptBlockDataChatType? Type416 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentType? Type416 { get; set; } /// /// /// - public global::Braintrust.PromptBlockDataCompletion? Type417 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionVariant1? Type417 { get; set; } /// /// /// - public global::Braintrust.PromptBlockDataCompletionType? Type418 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionVariant1Type? Type418 { get; set; } /// /// /// - public global::Braintrust.GraphNode? Type419 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionScorer? Type419 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant1? Type420 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionScorerType? Type420 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant1Position? Type421 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionClassifier? Type421 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant1Type? Type422 { get; set; } + public global::Braintrust.CodeBundleLocationExperimentPositionClassifierType? Type422 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant2? Type423 { get; set; } + public global::Braintrust.CodeBundleLocationFunction? Type423 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant2Position? Type424 { get; set; } + public global::Braintrust.CodeBundleLocationFunctionType? Type424 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant2Type? Type425 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3? Type425 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant3? Type426 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3Type? Type426 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant3Position? Type427 { get; set; } + public global::Braintrust.OneOf? Type427 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant3Type? Type428 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant1? Type428 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant4? Type429 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant1Provider? Type429 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant4Position? Type430 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant2? Type430 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant4Type? Type431 { get; set; } + public global::Braintrust.CodeBundleLocationVariant3SandboxSpecVariant2Provider? Type431 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant5? Type432 { get; set; } + public global::Braintrust.PromptBlockData? Type432 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant5Position? Type433 { get; set; } + public global::Braintrust.PromptBlockDataChat? Type433 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant5Type? Type434 { get; set; } + public global::Braintrust.PromptBlockDataChatType? Type434 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant6? Type435 { get; set; } + public global::Braintrust.PromptBlockDataCompletion? Type435 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant6Position? Type436 { get; set; } + public global::Braintrust.PromptBlockDataCompletionType? Type436 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant6Type? Type437 { get; set; } + public global::Braintrust.GraphNode? Type437 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant7? Type438 { get; set; } + public global::Braintrust.GraphNodeVariant1? Type438 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant7Position? Type439 { get; set; } + public global::Braintrust.GraphNodeVariant1Position? Type439 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant7Type? Type440 { get; set; } + public global::Braintrust.GraphNodeVariant1Type? Type440 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant8? Type441 { get; set; } + public global::Braintrust.GraphNodeVariant2? Type441 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant8Position? Type442 { get; set; } + public global::Braintrust.GraphNodeVariant2Position? Type442 { get; set; } /// /// /// - public global::Braintrust.GraphNodeVariant8Type? Type443 { get; set; } + public global::Braintrust.GraphNodeVariant2Type? Type443 { get; set; } /// /// /// - public global::Braintrust.GraphEdge? Type444 { get; set; } + public global::Braintrust.GraphNodeVariant3? Type444 { get; set; } /// /// /// - public global::Braintrust.GraphEdgeSource? Type445 { get; set; } + public global::Braintrust.GraphNodeVariant3Position? Type445 { get; set; } /// /// /// - public global::Braintrust.GraphEdgeTarget? Type446 { get; set; } + public global::Braintrust.GraphNodeVariant3Type? Type446 { get; set; } /// /// /// - public global::Braintrust.GraphEdgePurpose? Type447 { get; set; } + public global::Braintrust.GraphNodeVariant4? Type447 { get; set; } /// /// /// - public global::Braintrust.GraphData? Type448 { get; set; } + public global::Braintrust.GraphNodeVariant4Position? Type448 { get; set; } /// /// /// - public global::Braintrust.GraphDataType? Type449 { get; set; } + public global::Braintrust.GraphNodeVariant4Type? Type449 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type450 { get; set; } + public global::Braintrust.GraphNodeVariant5? Type450 { get; set; } /// /// /// - public global::Braintrust.FacetData? Type451 { get; set; } + public global::Braintrust.GraphNodeVariant5Position? Type451 { get; set; } /// /// /// - public global::Braintrust.FacetDataType? Type452 { get; set; } + public global::Braintrust.GraphNodeVariant5Type? Type452 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type453 { get; set; } + public global::Braintrust.GraphNodeVariant6? Type453 { get; set; } /// /// /// - public global::Braintrust.TopicMapGenerationSettings? Type454 { get; set; } + public global::Braintrust.GraphNodeVariant6Position? Type454 { get; set; } /// /// /// - public global::Braintrust.TopicMapGenerationSettingsAlgorithm? Type455 { get; set; } + public global::Braintrust.GraphNodeVariant6Type? Type455 { get; set; } /// /// /// - public global::Braintrust.TopicMapGenerationSettingsDimensionReduction? Type456 { get; set; } + public global::Braintrust.GraphNodeVariant7? Type456 { get; set; } /// /// /// - public global::Braintrust.TopicMapData? Type457 { get; set; } + public global::Braintrust.GraphNodeVariant7Position? Type457 { get; set; } /// /// /// - public global::Braintrust.TopicMapDataType? Type458 { get; set; } + public global::Braintrust.GraphNodeVariant7Type? Type458 { get; set; } /// /// /// - public global::Braintrust.BatchedFacetData? Type459 { get; set; } + public global::Braintrust.GraphNodeVariant8? Type459 { get; set; } /// /// /// - public global::Braintrust.BatchedFacetDataType? Type460 { get; set; } + public global::Braintrust.GraphNodeVariant8Position? Type460 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type461 { get; set; } + public global::Braintrust.GraphNodeVariant8Type? Type461 { get; set; } /// /// /// - public global::Braintrust.BatchedFacetDataFacet? Type462 { get; set; } + public global::Braintrust.GraphEdge? Type462 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type463 { get; set; } + public global::Braintrust.GraphEdgeSource? Type463 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type464 { get; set; } + public global::Braintrust.GraphEdgeTarget? Type464 { get; set; } /// /// /// - public global::Braintrust.BatchedFacetDataTopicMap? Type465 { get; set; } + public global::Braintrust.GraphEdgePurpose? Type465 { get; set; } /// /// /// - public global::Braintrust.FunctionData? Type466 { get; set; } + public global::Braintrust.GraphData? Type466 { get; set; } /// /// /// - public global::Braintrust.FunctionDataPrompt? Type467 { get; set; } + public global::Braintrust.GraphDataType? Type467 { get; set; } /// /// /// - public global::Braintrust.FunctionDataPromptType? Type468 { get; set; } + public global::System.Collections.Generic.Dictionary? Type468 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCode? Type469 { get; set; } + public global::Braintrust.FacetData? Type469 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeType? Type470 { get; set; } + public global::Braintrust.FacetDataType? Type470 { get; set; } /// /// /// - public global::Braintrust.AnyOf?, global::Braintrust.FunctionDataCodeData2>? Type471 { get; set; } + public global::Braintrust.AllOf? Type471 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type472 { get; set; } + public global::Braintrust.TopicMapGenerationSettings? Type472 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeData? Type473 { get; set; } + public global::Braintrust.TopicMapGenerationSettingsAlgorithm? Type473 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeDataType? Type474 { get; set; } + public global::Braintrust.TopicMapGenerationSettingsDimensionReduction? Type474 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeData2? Type475 { get; set; } + public global::Braintrust.TopicMapData? Type475 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeDataType2? Type476 { get; set; } + public global::Braintrust.TopicMapDataType? Type476 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeDataRuntimeContext? Type477 { get; set; } + public global::Braintrust.BatchedFacetData? Type477 { get; set; } /// /// /// - public global::Braintrust.FunctionDataCodeDataRuntimeContextRuntime? Type478 { get; set; } + public global::Braintrust.BatchedFacetDataType? Type478 { get; set; } /// /// /// - public global::Braintrust.FunctionDataRemoteEval? Type479 { get; set; } + public global::System.Collections.Generic.IList? Type479 { get; set; } /// /// /// - public global::Braintrust.FunctionDataRemoteEvalType? Type480 { get; set; } + public global::Braintrust.BatchedFacetDataFacet? Type480 { get; set; } /// /// /// - public global::Braintrust.FunctionDataGlobal? Type481 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type481 { get; set; } /// /// /// - public global::Braintrust.FunctionDataGlobalType? Type482 { get; set; } + public global::System.Collections.Generic.IList? Type482 { get; set; } /// /// /// - public global::Braintrust.FunctionDataParameters? Type483 { get; set; } + public global::Braintrust.BatchedFacetDataTopicMap? Type483 { get; set; } /// /// /// - public global::Braintrust.FunctionDataParametersType? Type484 { get; set; } + public global::Braintrust.FunctionData? Type484 { get; set; } /// /// /// - public global::Braintrust.FunctionDataParametersSchema? Type485 { get; set; } + public global::Braintrust.FunctionDataPrompt? Type485 { get; set; } /// /// /// - public global::Braintrust.FunctionDataParametersSchemaType? Type486 { get; set; } + public global::Braintrust.FunctionDataPromptType? Type486 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type487 { get; set; } + public global::Braintrust.FunctionDataCode? Type487 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type488 { get; set; } + public global::Braintrust.FunctionDataCodeType? Type488 { get; set; } /// /// /// - public global::Braintrust.Function2? Type489 { get; set; } + public global::Braintrust.AnyOf?, global::Braintrust.FunctionDataCodeData2>? Type489 { get; set; } /// /// /// - public global::Braintrust.FunctionLogId? Type490 { get; set; } + public global::Braintrust.AllOf? Type490 { get; set; } /// /// /// - public global::Braintrust.FunctionOrigin? Type491 { get; set; } + public global::Braintrust.FunctionDataCodeData? Type491 { get; set; } /// /// /// - public global::Braintrust.FunctionFunctionSchema? Type492 { get; set; } + public global::Braintrust.FunctionDataCodeDataType? Type492 { get; set; } /// /// /// - public global::Braintrust.CreateFunction? Type493 { get; set; } + public global::Braintrust.FunctionDataCodeData2? Type493 { get; set; } /// /// /// - public global::Braintrust.CreateFunctionOrigin? Type494 { get; set; } + public global::Braintrust.FunctionDataCodeDataType2? Type494 { get; set; } /// /// /// - public global::Braintrust.CreateFunctionFunctionSchema? Type495 { get; set; } + public global::Braintrust.FunctionDataCodeDataRuntimeContext? Type495 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullish? Type496 { get; set; } + public global::Braintrust.FunctionDataCodeDataRuntimeContextRuntime? Type496 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishPrompt? Type497 { get; set; } + public global::Braintrust.FunctionDataRemoteEval? Type497 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishPromptType? Type498 { get; set; } + public global::Braintrust.FunctionDataRemoteEvalType? Type498 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCode? Type499 { get; set; } + public global::Braintrust.FunctionDataGlobal? Type499 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeType? Type500 { get; set; } + public global::Braintrust.FunctionDataGlobalType? Type500 { get; set; } /// /// /// - public global::Braintrust.AnyOf?, global::Braintrust.FunctionDataNullishCodeData2>? Type501 { get; set; } + public global::Braintrust.FunctionDataParameters? Type501 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type502 { get; set; } + public global::Braintrust.FunctionDataParametersType? Type502 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeData? Type503 { get; set; } + public global::Braintrust.FunctionDataParametersSchema? Type503 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeDataType? Type504 { get; set; } + public global::Braintrust.FunctionDataParametersSchemaType? Type504 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeData2? Type505 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type505 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeDataType2? Type506 { get; set; } + public global::Braintrust.AllOf? Type506 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeDataRuntimeContext? Type507 { get; set; } + public global::Braintrust.Function2? Type507 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishCodeDataRuntimeContextRuntime? Type508 { get; set; } + public global::Braintrust.FunctionLogId? Type508 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishRemoteEval? Type509 { get; set; } + public global::Braintrust.FunctionOrigin? Type509 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishRemoteEvalType? Type510 { get; set; } + public global::Braintrust.FunctionFunctionSchema? Type510 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishGlobal? Type511 { get; set; } + public global::Braintrust.CreateFunction? Type511 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishGlobalType? Type512 { get; set; } + public global::Braintrust.CreateFunctionOrigin? Type512 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishParameters? Type513 { get; set; } + public global::Braintrust.CreateFunctionFunctionSchema? Type513 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishParametersType? Type514 { get; set; } + public global::Braintrust.FunctionDataNullish? Type514 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishParametersSchema? Type515 { get; set; } + public global::Braintrust.FunctionDataNullishPrompt? Type515 { get; set; } /// /// /// - public global::Braintrust.FunctionDataNullishParametersSchemaType? Type516 { get; set; } + public global::Braintrust.FunctionDataNullishPromptType? Type516 { get; set; } /// /// /// - public global::Braintrust.PatchFunction? Type517 { get; set; } + public global::Braintrust.FunctionDataNullishCode? Type517 { get; set; } /// /// /// - public global::Braintrust.InvokeParent? Type518 { get; set; } + public global::Braintrust.FunctionDataNullishCodeType? Type518 { get; set; } /// /// /// - public global::Braintrust.InvokeParentSpanParentStruct? Type519 { get; set; } + public global::Braintrust.AnyOf?, global::Braintrust.FunctionDataNullishCodeData2>? Type519 { get; set; } /// /// /// - public global::Braintrust.InvokeParentSpanParentStructObjectType? Type520 { get; set; } + public global::Braintrust.AllOf? Type520 { get; set; } /// /// /// - public global::Braintrust.InvokeParentSpanParentStructRowIds? Type521 { get; set; } + public global::Braintrust.FunctionDataNullishCodeData? Type521 { get; set; } /// /// /// - public global::Braintrust.StreamingMode? Type522 { get; set; } + public global::Braintrust.FunctionDataNullishCodeDataType? Type522 { get; set; } /// /// /// - public global::Braintrust.InvokeApi? Type523 { get; set; } + public global::Braintrust.FunctionDataNullishCodeData2? Type523 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type524 { get; set; } + public global::Braintrust.FunctionDataNullishCodeDataType2? Type524 { get; set; } /// /// /// - public global::Braintrust.InvokeApiMcpAuth2? Type525 { get; set; } + public global::Braintrust.FunctionDataNullishCodeDataRuntimeContext? Type525 { get; set; } /// /// /// - public global::Braintrust.ViewDataSearch? Type526 { get; set; } + public global::Braintrust.FunctionDataNullishCodeDataRuntimeContextRuntime? Type526 { get; set; } /// /// /// - public global::Braintrust.ViewData? Type527 { get; set; } + public global::Braintrust.FunctionDataNullishRemoteEval? Type527 { get; set; } /// /// /// - public global::Braintrust.ViewOptions? Type528 { get; set; } + public global::Braintrust.FunctionDataNullishRemoteEvalType? Type528 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsMonitorViewOptions? Type529 { get; set; } + public global::Braintrust.FunctionDataNullishGlobal? Type529 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsMonitorViewOptionsViewType? Type530 { get; set; } + public global::Braintrust.FunctionDataNullishGlobalType? Type530 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsMonitorViewOptionsOptions? Type531 { get; set; } + public global::Braintrust.FunctionDataNullishParameters? Type531 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsMonitorViewOptionsOptionsSpanType? Type532 { get; set; } + public global::Braintrust.FunctionDataNullishParametersType? Type532 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type533 { get; set; } + public global::Braintrust.FunctionDataNullishParametersSchema? Type533 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsMonitorViewOptionsOptionsType? Type534 { get; set; } + public global::Braintrust.FunctionDataNullishParametersSchemaType? Type534 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptions? Type535 { get; set; } + public global::Braintrust.PatchFunction? Type535 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type536 { get; set; } + public global::Braintrust.InvokeParent? Type536 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsExcludedMeasure? Type537 { get; set; } + public global::Braintrust.InvokeParentSpanParentStruct? Type537 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsExcludedMeasureType? Type538 { get; set; } + public global::Braintrust.InvokeParentSpanParentStructObjectType? Type538 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsYMetric? Type539 { get; set; } + public global::Braintrust.InvokeParentSpanParentStructRowIds? Type539 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsYMetricType? Type540 { get; set; } + public global::Braintrust.StreamingMode? Type540 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsXAxis? Type541 { get; set; } + public global::Braintrust.InvokeApi? Type541 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsXAxisType? Type542 { get; set; } + public global::System.Collections.Generic.Dictionary? Type542 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsSymbolGrouping? Type543 { get; set; } + public global::Braintrust.InvokeApiMcpAuth2? Type543 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsSymbolGroupingType? Type544 { get; set; } + public global::Braintrust.ViewDataSearch? Type544 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type545 { get; set; } + public global::Braintrust.ViewData? Type545 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsChartAnnotation? Type546 { get; set; } + public global::Braintrust.ViewOptions? Type546 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type547 { get; set; } + public global::Braintrust.ViewOptionsMonitorViewOptions? Type547 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsTimeRangeFilter? Type548 { get; set; } + public global::Braintrust.ViewOptionsMonitorViewOptionsViewType? Type548 { get; set; } /// /// /// - public global::Braintrust.ViewOptionsTableViewOptionsQueryShape? Type549 { get; set; } + public global::Braintrust.ViewOptionsMonitorViewOptionsOptions? Type549 { get; set; } /// /// /// - public global::Braintrust.View? Type550 { get; set; } + public global::Braintrust.ViewOptionsMonitorViewOptionsOptionsSpanType? Type550 { get; set; } /// /// /// - public global::Braintrust.ViewViewType? Type551 { get; set; } + public global::System.Collections.Generic.Dictionary? Type551 { get; set; } /// /// /// - public global::Braintrust.CreateView? Type552 { get; set; } + public global::Braintrust.ViewOptionsMonitorViewOptionsOptionsType? Type552 { get; set; } /// /// /// - public global::Braintrust.CreateViewViewType? Type553 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptions? Type553 { get; set; } /// /// /// - public global::Braintrust.PatchView? Type554 { get; set; } + public global::System.Collections.Generic.IList? Type554 { get; set; } /// /// /// - public global::Braintrust.PatchViewViewType? Type555 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsExcludedMeasure? Type555 { get; set; } /// /// /// - public global::Braintrust.DeleteView? Type556 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsExcludedMeasureType? Type556 { get; set; } /// /// /// - public global::Braintrust.ImageRenderingMode? Type557 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsYMetric? Type557 { get; set; } /// /// /// - public global::Braintrust.Organization? Type558 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsYMetricType? Type558 { get; set; } /// /// /// - public global::Braintrust.PatchOrganization? Type559 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsXAxis? Type559 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersOutput? Type560 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsXAxisType? Type560 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersOutputStatus? Type561 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsSymbolGrouping? Type561 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type562 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsSymbolGroupingType? Type562 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersOutputAddedUser? Type563 { get; set; } + public global::System.Collections.Generic.IList? Type563 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembers? Type564 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsChartAnnotation? Type564 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersInviteUsers? Type565 { get; set; } + public global::Braintrust.AnyOf? Type565 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type566 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsTimeRangeFilter? Type566 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersInviteUsersServiceAccount? Type567 { get; set; } + public global::Braintrust.ViewOptionsTableViewOptionsQueryShape? Type567 { get; set; } /// /// /// - public global::Braintrust.PatchOrganizationMembersRemoveUsers? Type568 { get; set; } + public global::Braintrust.View? Type568 { get; set; } /// /// /// - public global::Braintrust.ApiKey? Type569 { get; set; } + public global::Braintrust.ViewViewType? Type569 { get; set; } /// /// /// - public global::Braintrust.CreateServiceTokenOutput? Type570 { get; set; } + public global::Braintrust.CreateView? Type570 { get; set; } /// /// /// - public global::Braintrust.ServiceToken? Type571 { get; set; } + public global::Braintrust.CreateViewViewType? Type571 { get; set; } /// /// /// - public global::Braintrust.DeleteServiceToken? Type572 { get; set; } + public global::Braintrust.PatchView? Type572 { get; set; } /// /// /// - public global::Braintrust.AISecret? Type573 { get; set; } + public global::Braintrust.PatchViewViewType? Type573 { get; set; } /// /// /// - public global::Braintrust.CreateAISecret? Type574 { get; set; } + public global::Braintrust.DeleteView? Type574 { get; set; } /// /// /// - public global::Braintrust.DeleteAISecret? Type575 { get; set; } + public global::Braintrust.ImageRenderingMode? Type575 { get; set; } /// /// /// - public global::Braintrust.PatchAISecret? Type576 { get; set; } + public global::Braintrust.Organization? Type576 { get; set; } /// /// /// - public global::Braintrust.EnvVar? Type577 { get; set; } + public global::Braintrust.PatchOrganization? Type577 { get; set; } /// /// /// - public global::Braintrust.EnvVarObjectType2? Type578 { get; set; } + public global::Braintrust.PatchOrganizationMembersOutput? Type578 { get; set; } /// /// /// - public global::Braintrust.EnvVarSecretCategory? Type579 { get; set; } + public global::Braintrust.PatchOrganizationMembersOutputStatus? Type579 { get; set; } /// /// /// - public global::Braintrust.MCPServer? Type580 { get; set; } + public global::System.Collections.Generic.IList? Type580 { get; set; } /// /// /// - public global::Braintrust.CreateMCPServer? Type581 { get; set; } + public global::Braintrust.PatchOrganizationMembersOutputAddedUser? Type581 { get; set; } /// /// /// - public global::Braintrust.PatchMCPServer? Type582 { get; set; } + public global::Braintrust.PatchOrganizationMembers? Type582 { get; set; } /// /// /// - public global::Braintrust.DatasetSnapshot? Type583 { get; set; } + public global::Braintrust.PatchOrganizationMembersInviteUsers? Type583 { get; set; } /// /// /// - public global::Braintrust.CreateDatasetSnapshot? Type584 { get; set; } + public global::System.Collections.Generic.IList? Type584 { get; set; } /// /// /// - public global::Braintrust.PatchDatasetSnapshot? Type585 { get; set; } + public global::Braintrust.PatchOrganizationMembersInviteUsersServiceAccount? Type585 { get; set; } /// /// /// - public global::Braintrust.Environment? Type586 { get; set; } + public global::Braintrust.PatchOrganizationMembersRemoveUsers? Type586 { get; set; } /// /// /// - public global::Braintrust.CreateEnvironment? Type587 { get; set; } + public global::Braintrust.ApiKey? Type587 { get; set; } /// /// /// - public global::Braintrust.PatchEnvironment? Type588 { get; set; } + public global::Braintrust.CreateServiceTokenOutput? Type588 { get; set; } /// /// /// - public global::Braintrust.CrossObjectInsertResponse? Type589 { get; set; } + public global::Braintrust.ServiceToken? Type589 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type590 { get; set; } + public global::Braintrust.DeleteServiceToken? Type590 { get; set; } /// /// /// - public global::Braintrust.CrossObjectInsertRequest? Type591 { get; set; } + public global::Braintrust.AISecret? Type591 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type592 { get; set; } + public global::Braintrust.CreateAISecret? Type592 { get; set; } /// /// /// - public global::Braintrust.CrossObjectInsertRequestExperiment2? Type593 { get; set; } + public global::Braintrust.DeleteAISecret? Type593 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type594 { get; set; } + public global::Braintrust.PatchAISecret? Type594 { get; set; } /// /// /// - public global::Braintrust.CrossObjectInsertRequestDataset2? Type595 { get; set; } + public global::Braintrust.EnvVar? Type595 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type596 { get; set; } + public global::Braintrust.EnvVarObjectType2? Type596 { get; set; } /// /// /// - public global::Braintrust.CrossObjectInsertRequestProjectLogs2? Type597 { get; set; } + public global::Braintrust.EnvVarSecretCategory? Type597 { get; set; } /// /// /// - public global::Braintrust.PromptData? Type598 { get; set; } + public global::Braintrust.MCPServer? Type598 { get; set; } /// /// /// - public global::System.Collections.Generic.IList?>>? Type599 { get; set; } + public global::Braintrust.CreateMCPServer? Type599 { get; set; } /// /// /// - public global::Braintrust.AllOf?>? Type600 { get; set; } + public global::Braintrust.PatchMCPServer? Type600 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type601 { get; set; } + public global::Braintrust.DatasetSnapshot? Type601 { get; set; } /// /// /// - public global::Braintrust.PromptDataToolFunctionVariant2Function? Type602 { get; set; } + public global::Braintrust.CreateDatasetSnapshot? Type602 { get; set; } /// /// /// - public global::Braintrust.PromptDataToolFunctionVariant2FunctionType? Type603 { get; set; } + public global::Braintrust.PatchDatasetSnapshot? Type603 { get; set; } /// /// /// - public global::Braintrust.PromptDataToolFunctionVariant2Global? Type604 { get; set; } + public global::Braintrust.Environment? Type604 { get; set; } /// /// /// - public global::Braintrust.PromptDataToolFunctionVariant2GlobalType? Type605 { get; set; } + public global::Braintrust.CreateEnvironment? Type605 { get; set; } /// /// /// - public global::Braintrust.PromptDataTemplateFormat? Type606 { get; set; } + public global::Braintrust.PatchEnvironment? Type606 { get; set; } /// /// /// - public global::Braintrust.PromptDataMcpMcpServerIdThisIsUsedForProjectLevelMcpServerDefinitions? Type607 { get; set; } + public global::Braintrust.CrossObjectInsertResponse? Type607 { get; set; } /// /// /// - public global::Braintrust.PromptDataMcpMcpServerIdThisIsUsedForProjectLevelMcpServerDefinitionsType? Type608 { get; set; } + public global::System.Collections.Generic.Dictionary? Type608 { get; set; } /// /// /// - public global::Braintrust.PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers? Type609 { get; set; } + public global::Braintrust.CrossObjectInsertRequest? Type609 { get; set; } /// /// /// - public global::Braintrust.PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServersType? Type610 { get; set; } + public global::System.Collections.Generic.Dictionary? Type610 { get; set; } /// /// /// - public global::Braintrust.PromptDataOrigin? Type611 { get; set; } + public global::Braintrust.CrossObjectInsertRequestExperiment2? Type611 { get; set; } /// /// /// - public global::Braintrust.FunctionId? Type612 { get; set; } + public global::System.Collections.Generic.Dictionary? Type612 { get; set; } /// /// /// - public global::Braintrust.FunctionIdFunctionId1? Type613 { get; set; } + public global::Braintrust.CrossObjectInsertRequestDataset2? Type613 { get; set; } /// /// /// - public global::Braintrust.FunctionIdProjectSlug? Type614 { get; set; } + public global::System.Collections.Generic.Dictionary? Type614 { get; set; } /// /// /// - public global::Braintrust.FunctionIdGlobalFunction? Type615 { get; set; } + public global::Braintrust.CrossObjectInsertRequestProjectLogs2? Type615 { get; set; } /// /// /// - public global::Braintrust.FunctionIdPromptSessionId? Type616 { get; set; } + public global::Braintrust.PromptData? Type616 { get; set; } /// /// /// - public global::Braintrust.FunctionIdInlineCode? Type617 { get; set; } + public global::System.Collections.Generic.IList?>>? Type617 { get; set; } /// /// /// - public global::Braintrust.FunctionIdInlineCodeInlineContext? Type618 { get; set; } + public global::Braintrust.AllOf?>? Type618 { get; set; } /// /// /// - public global::Braintrust.FunctionIdInlineCodeInlineContextRuntime? Type619 { get; set; } + public global::Braintrust.AnyOf? Type619 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type620 { get; set; } + public global::Braintrust.PromptDataToolFunctionVariant2Function? Type620 { get; set; } /// /// /// - public global::Braintrust.FunctionIdInlineFunction? Type621 { get; set; } + public global::Braintrust.PromptDataToolFunctionVariant2FunctionType? Type621 { get; set; } /// /// /// - public global::Braintrust.FunctionIdInlinePrompt? Type622 { get; set; } + public global::Braintrust.PromptDataToolFunctionVariant2Global? Type622 { get; set; } /// /// /// - public global::Braintrust.GitMetadataSettings? Type623 { get; set; } + public global::Braintrust.PromptDataToolFunctionVariant2GlobalType? Type623 { get; set; } /// /// /// - public global::Braintrust.GitMetadataSettingsCollect? Type624 { get; set; } + public global::Braintrust.PromptDataTemplateFormat? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type625 { get; set; } + public global::Braintrust.PromptDataMcpMcpServerIdThisIsUsedForProjectLevelMcpServerDefinitions? Type625 { get; set; } /// /// /// - public global::Braintrust.GitMetadataSettingsField? Type626 { get; set; } + public global::Braintrust.PromptDataMcpMcpServerIdThisIsUsedForProjectLevelMcpServerDefinitionsType? Type626 { get; set; } /// /// /// - public global::Braintrust.RunEval? Type627 { get; set; } + public global::Braintrust.PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServers? Type627 { get; set; } /// /// /// - public global::Braintrust.AnyOf? Type628 { get; set; } + public global::Braintrust.PromptDataMcpMcpServerUrlThisIsUsedForInlineDefinitionsOfMcpServersType? Type628 { get; set; } /// /// /// - public global::Braintrust.RunEvalDataDatasetId? Type629 { get; set; } + public global::Braintrust.PromptDataOrigin? Type629 { get; set; } /// /// /// - public global::Braintrust.RunEvalDataProjectDatasetName? Type630 { get; set; } + public global::Braintrust.FunctionId? Type630 { get; set; } /// /// /// - public global::Braintrust.RunEvalDataDatasetRows? Type631 { get; set; } + public global::Braintrust.FunctionIdFunctionId1? Type631 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type632 { get; set; } + public global::Braintrust.FunctionIdProjectSlug? Type632 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type633 { get; set; } + public global::Braintrust.FunctionIdGlobalFunction? Type633 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type634 { get; set; } + public global::Braintrust.FunctionIdPromptSessionId? Type634 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type635 { get; set; } + public global::Braintrust.FunctionIdInlineCode? Type635 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type636 { get; set; } + public global::Braintrust.FunctionIdInlineCodeInlineContext? Type636 { get; set; } /// /// /// - public global::Braintrust.RunEvalMcpAuth2? Type637 { get; set; } + public global::Braintrust.FunctionIdInlineCodeInlineContextRuntime? Type637 { get; set; } /// /// /// - public global::Braintrust.PostServiceTokenRequest? Type638 { get; set; } + public global::Braintrust.AllOf? Type638 { get; set; } /// /// /// - public global::Braintrust.PutServiceTokenRequest? Type639 { get; set; } + public global::Braintrust.FunctionIdInlineFunction? Type639 { get; set; } /// /// /// - public global::Braintrust.PostEnvVarRequest? Type640 { get; set; } + public global::Braintrust.FunctionIdInlinePrompt? Type640 { get; set; } /// /// /// - public global::Braintrust.PostEnvVarRequestObjectType? Type641 { get; set; } + public global::Braintrust.GitMetadataSettings? Type641 { get; set; } /// /// /// - public global::Braintrust.PutEnvVarRequest? Type642 { get; set; } + public global::Braintrust.GitMetadataSettingsCollect? Type642 { get; set; } /// /// /// - public global::Braintrust.PutEnvVarRequestObjectType? Type643 { get; set; } + public global::System.Collections.Generic.IList? Type643 { get; set; } /// /// /// - public global::Braintrust.PatchEnvVarIdRequest? Type644 { get; set; } + public global::Braintrust.GitMetadataSettingsField? Type644 { get; set; } /// /// /// - public global::Braintrust.ProxycredentialsRequest? Type645 { get; set; } + public global::Braintrust.RunEval? Type645 { get; set; } /// /// /// - public global::Braintrust.ProxycredentialsRequestLogging? Type646 { get; set; } + public global::Braintrust.AnyOf? Type646 { get; set; } /// /// /// - public global::Braintrust.AnyOf>>? Type647 { get; set; } + public global::Braintrust.RunEvalDataDatasetId? Type647 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type648 { get; set; } + public global::Braintrust.RunEvalDataProjectDatasetName? Type648 { get; set; } /// /// /// - public global::Braintrust.AllOf? Type649 { get; set; } + public global::Braintrust.RunEvalDataDatasetRows? Type649 { get; set; } /// /// /// - public global::Braintrust.AnyOf>? Type650 { get; set; } + public global::System.Collections.Generic.IList>? Type650 { get; set; } /// /// /// - public global::Braintrust.GetProjectResponse? Type651 { get; set; } + public global::Braintrust.AllOf? Type651 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type652 { get; set; } + public global::Braintrust.AllOf? Type652 { get; set; } /// /// /// - public global::Braintrust.GetExperimentResponse? Type653 { get; set; } + public global::Braintrust.AllOf? Type653 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type654 { get; set; } + public global::System.Collections.Generic.Dictionary? Type654 { get; set; } /// /// /// - public global::Braintrust.GetDatasetResponse? Type655 { get; set; } + public global::Braintrust.RunEvalMcpAuth2? Type655 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::Braintrust.PostServiceTokenRequest? Type656 { get; set; } /// /// /// - public global::Braintrust.GetPromptResponse? Type657 { get; set; } + public global::Braintrust.PutServiceTokenRequest? Type657 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type658 { get; set; } + public global::Braintrust.PostEnvVarRequest? Type658 { get; set; } /// /// /// - public global::Braintrust.GetRoleResponse? Type659 { get; set; } + public global::Braintrust.PostEnvVarRequestObjectType? Type659 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type660 { get; set; } + public global::Braintrust.PutEnvVarRequest? Type660 { get; set; } /// /// /// - public global::Braintrust.GetGroupResponse? Type661 { get; set; } + public global::Braintrust.PutEnvVarRequestObjectType? Type661 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type662 { get; set; } + public global::Braintrust.PatchEnvVarIdRequest? Type662 { get; set; } /// /// /// - public global::Braintrust.GetAclResponse? Type663 { get; set; } + public global::Braintrust.ProxycredentialsRequest? Type663 { get; set; } /// /// /// - public global::Braintrust.GetUserResponse? Type664 { get; set; } + public global::Braintrust.ProxycredentialsRequestLogging? Type664 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type665 { get; set; } + public global::Braintrust.AnyOf>>? Type665 { get; set; } /// /// /// - public global::Braintrust.GetProjectAutomationResponse? Type666 { get; set; } + public global::System.Collections.Generic.IList>? Type666 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type667 { get; set; } + public global::Braintrust.AllOf? Type667 { get; set; } /// /// /// - public global::Braintrust.GetProjectScoreResponse? Type668 { get; set; } + public global::Braintrust.AnyOf>? Type668 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type669 { get; set; } + public global::Braintrust.GetProjectResponse? Type669 { get; set; } /// /// /// - public global::Braintrust.GetProjectTagResponse? Type670 { get; set; } + public global::System.Collections.Generic.IList? Type670 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::Braintrust.GetExperimentResponse? Type671 { get; set; } /// /// /// - public global::Braintrust.GetSpanIframeResponse? Type672 { get; set; } + public global::System.Collections.Generic.IList? Type672 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type673 { get; set; } + public global::Braintrust.GetDatasetResponse? Type673 { get; set; } /// /// /// - public global::Braintrust.GetFunctionResponse? Type674 { get; set; } + public global::System.Collections.Generic.IList? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::Braintrust.GetPromptResponse? Type675 { get; set; } /// /// /// - public global::Braintrust.GetViewResponse? Type676 { get; set; } + public global::System.Collections.Generic.IList? Type676 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type677 { get; set; } + public global::Braintrust.GetRoleResponse? Type677 { get; set; } /// /// /// - public global::Braintrust.GetOrganizationResponse? Type678 { get; set; } + public global::System.Collections.Generic.IList? Type678 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type679 { get; set; } + public global::Braintrust.GetGroupResponse? Type679 { get; set; } /// /// /// - public global::Braintrust.GetApiKeyResponse? Type680 { get; set; } + public global::System.Collections.Generic.IList? Type680 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type681 { get; set; } + public global::Braintrust.GetAclResponse? Type681 { get; set; } /// /// /// - public global::Braintrust.GetServiceTokenResponse? Type682 { get; set; } + public global::Braintrust.GetUserResponse? Type682 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type683 { get; set; } + public global::System.Collections.Generic.IList? Type683 { get; set; } /// /// /// - public global::Braintrust.GetAiSecretResponse? Type684 { get; set; } + public global::Braintrust.GetAgentResponse? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type685 { get; set; } + public global::System.Collections.Generic.IList? Type685 { get; set; } /// /// /// - public global::Braintrust.GetEnvVarResponse? Type686 { get; set; } + public global::Braintrust.GetProjectAutomationResponse? Type686 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type687 { get; set; } + public global::System.Collections.Generic.IList? Type687 { get; set; } /// /// /// - public global::Braintrust.GetMcpServerResponse? Type688 { get; set; } + public global::Braintrust.GetProjectScoreResponse? Type688 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type689 { get; set; } + public global::System.Collections.Generic.IList? Type689 { get; set; } /// /// /// - public global::Braintrust.GetDatasetSnapshotResponse? Type690 { get; set; } + public global::Braintrust.GetProjectTagResponse? Type690 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type691 { get; set; } + public global::System.Collections.Generic.IList? Type691 { get; set; } /// /// /// - public global::Braintrust.ListEnvironmentsResponse? Type692 { get; set; } + public global::Braintrust.GetSpanIframeResponse? Type692 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type693 { get; set; } + public global::System.Collections.Generic.IList? Type693 { get; set; } /// /// /// - public global::Braintrust.ProxycredentialsResponse? Type694 { get; set; } + public global::Braintrust.GetFunctionResponse? Type694 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type695 { get; set; } + /// + /// + /// + public global::Braintrust.GetViewResponse? Type696 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type697 { get; set; } + /// + /// + /// + public global::Braintrust.GetOrganizationResponse? Type698 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type699 { get; set; } + /// + /// + /// + public global::Braintrust.GetApiKeyResponse? Type700 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type701 { get; set; } + /// + /// + /// + public global::Braintrust.GetServiceTokenResponse? Type702 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type703 { get; set; } + /// + /// + /// + public global::Braintrust.GetAiSecretResponse? Type704 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type705 { get; set; } + /// + /// + /// + public global::Braintrust.GetEnvVarResponse? Type706 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type707 { get; set; } + /// + /// + /// + public global::Braintrust.GetMcpServerResponse? Type708 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type709 { get; set; } + /// + /// + /// + public global::Braintrust.GetDatasetSnapshotResponse? Type710 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type711 { get; set; } + /// + /// + /// + public global::Braintrust.ListEnvironmentsResponse? Type712 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type713 { get; set; } + /// + /// + /// + public global::Braintrust.ProxycredentialsResponse? Type714 { get; set; } /// /// @@ -3053,58 +3133,62 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType61 { get; set; } + public global::System.Collections.Generic.List? ListType61 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType62 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType62 { get; set; } + public global::System.Collections.Generic.List? ListType63 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType63 { get; set; } + public global::System.Collections.Generic.List? ListType64 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType64 { get; set; } + public global::System.Collections.Generic.List? ListType65 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType65 { get; set; } + public global::System.Collections.Generic.List? ListType66 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType66 { get; set; } + public global::System.Collections.Generic.List? ListType67 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType67 { get; set; } + public global::System.Collections.Generic.List? ListType68 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType68 { get; set; } + public global::System.Collections.Generic.List? ListType69 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType70 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType71 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AclListOrgObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AclListOrgObjectType.g.cs index 40e9a74..9d107bf 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.AclListOrgObjectType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.AclListOrgObjectType.g.cs @@ -23,6 +23,10 @@ public enum AclListOrgObjectType /// /// /// + OrgAuditLogs, + /// + /// + /// OrgMember, /// /// @@ -69,6 +73,7 @@ public static string ToValueString(this AclListOrgObjectType value) AclListOrgObjectType.Dataset => "dataset", AclListOrgObjectType.Experiment => "experiment", AclListOrgObjectType.Group => "group", + AclListOrgObjectType.OrgAuditLogs => "org_audit_logs", AclListOrgObjectType.OrgMember => "org_member", AclListOrgObjectType.OrgProject => "org_project", AclListOrgObjectType.Organization => "organization", @@ -90,6 +95,7 @@ public static string ToValueString(this AclListOrgObjectType value) "dataset" => AclListOrgObjectType.Dataset, "experiment" => AclListOrgObjectType.Experiment, "group" => AclListOrgObjectType.Group, + "org_audit_logs" => AclListOrgObjectType.OrgAuditLogs, "org_member" => AclListOrgObjectType.OrgMember, "org_project" => AclListOrgObjectType.OrgProject, "organization" => AclListOrgObjectType.Organization, diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AclListRestrictObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AclListRestrictObjectType.g.cs index f070eda..acc1a38 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.AclListRestrictObjectType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.AclListRestrictObjectType.g.cs @@ -23,6 +23,10 @@ public enum AclListRestrictObjectType /// /// /// + OrgAuditLogs, + /// + /// + /// OrgMember, /// /// @@ -69,6 +73,7 @@ public static string ToValueString(this AclListRestrictObjectType value) AclListRestrictObjectType.Dataset => "dataset", AclListRestrictObjectType.Experiment => "experiment", AclListRestrictObjectType.Group => "group", + AclListRestrictObjectType.OrgAuditLogs => "org_audit_logs", AclListRestrictObjectType.OrgMember => "org_member", AclListRestrictObjectType.OrgProject => "org_project", AclListRestrictObjectType.Organization => "organization", @@ -90,6 +95,7 @@ public static string ToValueString(this AclListRestrictObjectType value) "dataset" => AclListRestrictObjectType.Dataset, "experiment" => AclListRestrictObjectType.Experiment, "group" => AclListRestrictObjectType.Group, + "org_audit_logs" => AclListRestrictObjectType.OrgAuditLogs, "org_member" => AclListRestrictObjectType.OrgMember, "org_project" => AclListRestrictObjectType.OrgProject, "organization" => AclListRestrictObjectType.Organization, diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AclObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AclObjectType.g.cs index 3e07a37..84383df 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.AclObjectType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.AclObjectType.g.cs @@ -23,6 +23,10 @@ public enum AclObjectType /// /// /// + OrgAuditLogs, + /// + /// + /// OrgMember, /// /// @@ -69,6 +73,7 @@ public static string ToValueString(this AclObjectType value) AclObjectType.Dataset => "dataset", AclObjectType.Experiment => "experiment", AclObjectType.Group => "group", + AclObjectType.OrgAuditLogs => "org_audit_logs", AclObjectType.OrgMember => "org_member", AclObjectType.OrgProject => "org_project", AclObjectType.Organization => "organization", @@ -90,6 +95,7 @@ public static string ToValueString(this AclObjectType value) "dataset" => AclObjectType.Dataset, "experiment" => AclObjectType.Experiment, "group" => AclObjectType.Group, + "org_audit_logs" => AclObjectType.OrgAuditLogs, "org_member" => AclObjectType.OrgMember, "org_project" => AclObjectType.OrgProject, "organization" => AclObjectType.Organization, diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.Agent.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.Agent.Json.g.cs new file mode 100644 index 0000000..b63027f --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.Agent.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class Agent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.Agent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.Agent), + jsonSerializerContext) as global::Braintrust.Agent; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.Agent? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.Agent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.Agent), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.Agent; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.Agent.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.Agent.g.cs new file mode 100644 index 0000000..2e4b2ea --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.Agent.g.cs @@ -0,0 +1,138 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// An agent is a project-scoped durable object that identifies an AI agent or service emitting spans + /// + public sealed partial class Agent + { + /// + /// Unique identifier for the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid Id { get; set; } + + /// + /// Unique identifier for the project that the agent belongs under + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid ProjectId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid UserId { get; set; } + + /// + /// Date of agent creation + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + public global::System.DateTime? Created { get; set; } + + /// + /// Name of the agent. Within a project, agent names are unique + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Stable, URL-safe identifier for the agent, unique within its project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("slug")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Slug { get; set; } + + /// + /// Agent classification: 'custom' for customer-defined agents, 'loop' for built-in Loop agents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } + + /// + /// Textual description of the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// User-controlled metadata about the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { 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. + /// + /// + /// Unique identifier for the agent + /// + /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Stable, URL-safe identifier for the agent, unique within its project. + /// + /// + /// Agent classification: 'custom' for customer-defined agents, 'loop' for built-in Loop agents. + /// + /// + /// Date of agent creation + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Agent( + global::System.Guid id, + global::System.Guid projectId, + global::System.Guid userId, + string name, + string slug, + string kind, + global::System.DateTime? created, + string? description, + global::System.Collections.Generic.Dictionary? metadata) + { + this.Id = id; + this.ProjectId = projectId; + this.UserId = userId; + this.Created = created; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Slug = slug ?? throw new global::System.ArgumentNullException(nameof(slug)); + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Description = description; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public Agent() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.Json.g.cs new file mode 100644 index 0000000..5fbef37 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class AgentMetadata + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.AgentMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.AgentMetadata), + jsonSerializerContext) as global::Braintrust.AgentMetadata; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.AgentMetadata? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.AgentMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.AgentMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.AgentMetadata; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.g.cs new file mode 100644 index 0000000..2ef8502 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.AgentMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// User-controlled metadata about the agent + /// + public sealed partial class AgentMetadata + { + + /// + /// 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/Braintrust/Generated/Braintrust.Models.CreateAgent.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgent.Json.g.cs new file mode 100644 index 0000000..a828ca9 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgent.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class CreateAgent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.CreateAgent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.CreateAgent), + jsonSerializerContext) as global::Braintrust.CreateAgent; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.CreateAgent? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.CreateAgent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.CreateAgent), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateAgent; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgent.g.cs new file mode 100644 index 0000000..425c0a8 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgent.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// An agent is a project-scoped durable object that identifies an AI agent or service emitting spans + /// + public sealed partial class CreateAgent + { + /// + /// Unique identifier for the project that the agent belongs under + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid ProjectId { get; set; } + + /// + /// Name of the agent. Within a project, agent names are unique + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Textual description of the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// User-controlled metadata about the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { 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. + /// + /// + /// Unique identifier for the project that the agent belongs under + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAgent( + global::System.Guid projectId, + string name, + string? description, + global::System.Collections.Generic.Dictionary? metadata) + { + this.ProjectId = projectId; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAgent() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.Json.g.cs new file mode 100644 index 0000000..46a17f9 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class CreateAgentMetadata + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.CreateAgentMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.CreateAgentMetadata), + jsonSerializerContext) as global::Braintrust.CreateAgentMetadata; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.CreateAgentMetadata? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.CreateAgentMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.CreateAgentMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateAgentMetadata; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.g.cs new file mode 100644 index 0000000..d304278 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateAgentMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// User-controlled metadata about the agent + /// + public sealed partial class CreateAgentMetadata + { + + /// + /// 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/Braintrust/Generated/Braintrust.Models.CreateProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomation.g.cs index f1b163e..904faa7 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomation.g.cs @@ -32,9 +32,9 @@ public sealed partial class CreateProjectAutomation /// The configuration for the automation rule /// [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.OneOf Config { get; set; } + public required global::Braintrust.OneOf Config { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -63,7 +63,7 @@ public sealed partial class CreateProjectAutomation public CreateProjectAutomation( global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, string? description) { this.ProjectId = projectId; diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3.g.cs index 84fa149..28a2888 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3.g.cs @@ -16,19 +16,53 @@ public sealed partial class CreateProjectAutomationConfigVariant3 public global::Braintrust.CreateProjectAutomationConfigVariant3EventType EventType { get; set; } /// - /// The object type that the retention policy applies to + /// Whether the automation is active or paused. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.AutomationStatusJsonConverter))] + public global::Braintrust.AutomationStatus? Status { get; set; } + + /// + /// The user who submitted the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by_user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid CreatedByUserId { get; set; } + + /// + /// The source object type for the async query /// [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3ObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType ObjectType { get; set; } + + /// + /// The source object ID for the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.RetentionObjectType ObjectType { get; set; } + public required string ObjectId { get; set; } /// - /// The number of days to retain the object + /// The SQL query to execute asynchronously /// - [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] + [global::System.Text.Json.Serialization.JsonPropertyName("query")] [global::System.Text.Json.Serialization.JsonRequired] - public required double RetentionDays { get; set; } + public required string Query { get; set; } + + /// + /// The materialized result format + /// + [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant3FormatJsonConverter))] + public global::Braintrust.CreateProjectAutomationConfigVariant3Format Format { get; set; } + + /// + /// The maximum number of result rows to write per async query batch + /// + [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] + public int? BatchSize { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,26 +73,51 @@ public sealed partial class CreateProjectAutomationConfigVariant3 /// /// Initializes a new instance of the class. /// + /// + /// The user who submitted the async query + /// /// - /// The object type that the retention policy applies to + /// The source object type for the async query + /// + /// + /// The source object ID for the async query /// - /// - /// The number of days to retain the object + /// + /// The SQL query to execute asynchronously /// /// /// The type of automation. /// + /// + /// Whether the automation is active or paused. + /// + /// + /// The materialized result format + /// + /// + /// The maximum number of result rows to write per async query batch + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateProjectAutomationConfigVariant3( - global::Braintrust.RetentionObjectType objectType, - double retentionDays, - global::Braintrust.CreateProjectAutomationConfigVariant3EventType eventType) + global::System.Guid createdByUserId, + global::Braintrust.CreateProjectAutomationConfigVariant3ObjectType objectType, + string objectId, + string query, + global::Braintrust.CreateProjectAutomationConfigVariant3EventType eventType, + global::Braintrust.AutomationStatus? status, + global::Braintrust.CreateProjectAutomationConfigVariant3Format format, + int? batchSize) { this.EventType = eventType; + this.Status = status; + this.CreatedByUserId = createdByUserId; this.ObjectType = objectType; - this.RetentionDays = retentionDays; + this.ObjectId = objectId ?? throw new global::System.ArgumentNullException(nameof(objectId)); + this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query)); + this.Format = format; + this.BatchSize = batchSize; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3EventType.g.cs index 980c0b4..fbe2ca3 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3EventType.g.cs @@ -11,7 +11,7 @@ public enum CreateProjectAutomationConfigVariant3EventType /// /// /// - Retention, + AsyncQuery, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this CreateProjectAutomationConfigVariant3Eve { return value switch { - CreateProjectAutomationConfigVariant3EventType.Retention => "retention", + CreateProjectAutomationConfigVariant3EventType.AsyncQuery => "async_query", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this CreateProjectAutomationConfigVariant3Eve { return value switch { - "retention" => CreateProjectAutomationConfigVariant3EventType.Retention, + "async_query" => CreateProjectAutomationConfigVariant3EventType.AsyncQuery, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..cdd79a4 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The materialized result format + /// + public enum CreateProjectAutomationConfigVariant3Format + { + /// + /// + /// + Jsonl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateProjectAutomationConfigVariant3FormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateProjectAutomationConfigVariant3Format value) + { + return value switch + { + CreateProjectAutomationConfigVariant3Format.Jsonl => "jsonl", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateProjectAutomationConfigVariant3Format? ToEnum(string value) + { + return value switch + { + "jsonl" => CreateProjectAutomationConfigVariant3Format.Jsonl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..11edbab --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The source object type for the async query + /// + public enum CreateProjectAutomationConfigVariant3ObjectType + { + /// + /// + /// + Dataset, + /// + /// + /// + Experiment, + /// + /// + /// + PlaygroundLogs, + /// + /// + /// + ProjectLogs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateProjectAutomationConfigVariant3ObjectTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateProjectAutomationConfigVariant3ObjectType value) + { + return value switch + { + CreateProjectAutomationConfigVariant3ObjectType.Dataset => "dataset", + CreateProjectAutomationConfigVariant3ObjectType.Experiment => "experiment", + CreateProjectAutomationConfigVariant3ObjectType.PlaygroundLogs => "playground_logs", + CreateProjectAutomationConfigVariant3ObjectType.ProjectLogs => "project_logs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateProjectAutomationConfigVariant3ObjectType? ToEnum(string value) + { + return value switch + { + "dataset" => CreateProjectAutomationConfigVariant3ObjectType.Dataset, + "experiment" => CreateProjectAutomationConfigVariant3ObjectType.Experiment, + "playground_logs" => CreateProjectAutomationConfigVariant3ObjectType.PlaygroundLogs, + "project_logs" => CreateProjectAutomationConfigVariant3ObjectType.ProjectLogs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4.g.cs index fdbb0e3..bceb510 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4.g.cs @@ -16,18 +16,19 @@ public sealed partial class CreateProjectAutomationConfigVariant4 public global::Braintrust.CreateProjectAutomationConfigVariant4EventType EventType { get; set; } /// - /// Optional list of environment slugs to filter by + /// The object type that the retention policy applies to /// - [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] - public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.RetentionObjectType ObjectType { get; set; } /// - /// The action to take when the automation rule is triggered + /// The number of days to retain the object /// - [global::System.Text.Json.Serialization.JsonPropertyName("action")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.OneOf Action { get; set; } + public required double RetentionDays { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +39,26 @@ public sealed partial class CreateProjectAutomationConfigVariant4 /// /// Initializes a new instance of the class. /// - /// - /// The action to take when the automation rule is triggered + /// + /// The object type that the retention policy applies to + /// + /// + /// The number of days to retain the object /// /// /// The type of automation. /// - /// - /// Optional list of environment slugs to filter by - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateProjectAutomationConfigVariant4( - global::Braintrust.OneOf action, - global::Braintrust.CreateProjectAutomationConfigVariant4EventType eventType, - global::System.Collections.Generic.IList? environmentFilter) + global::Braintrust.RetentionObjectType objectType, + double retentionDays, + global::Braintrust.CreateProjectAutomationConfigVariant4EventType eventType) { this.EventType = eventType; - this.EnvironmentFilter = environmentFilter; - this.Action = action; + this.ObjectType = objectType; + this.RetentionDays = retentionDays; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4EventType.g.cs index a6e0251..2dfe0a5 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4EventType.g.cs @@ -11,7 +11,7 @@ public enum CreateProjectAutomationConfigVariant4EventType /// /// /// - EnvironmentUpdate, + Retention, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this CreateProjectAutomationConfigVariant4Eve { return value switch { - CreateProjectAutomationConfigVariant4EventType.EnvironmentUpdate => "environment_update", + CreateProjectAutomationConfigVariant4EventType.Retention => "retention", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this CreateProjectAutomationConfigVariant4Eve { return value switch { - "environment_update" => CreateProjectAutomationConfigVariant4EventType.EnvironmentUpdate, + "retention" => CreateProjectAutomationConfigVariant4EventType.Retention, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.Json.g.cs new file mode 100644 index 0000000..3221b91 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class CreateProjectAutomationConfigVariant5 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.CreateProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5), + jsonSerializerContext) as global::Braintrust.CreateProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.CreateProjectAutomationConfigVariant5? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.CreateProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.g.cs new file mode 100644 index 0000000..d6eee94 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class CreateProjectAutomationConfigVariant5 + { + /// + /// The type of automation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5EventTypeJsonConverter))] + public global::Braintrust.CreateProjectAutomationConfigVariant5EventType EventType { get; set; } + + /// + /// Optional list of environment slugs to filter by + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] + public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + + /// + /// The action to take when the automation rule is triggered + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.OneOf Action { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The action to take when the automation rule is triggered + /// + /// + /// The type of automation. + /// + /// + /// Optional list of environment slugs to filter by + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateProjectAutomationConfigVariant5( + global::Braintrust.OneOf action, + global::Braintrust.CreateProjectAutomationConfigVariant5EventType eventType, + global::System.Collections.Generic.IList? environmentFilter) + { + this.EventType = eventType; + this.EnvironmentFilter = environmentFilter; + this.Action = action; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateProjectAutomationConfigVariant5() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.Json.g.cs index 0dbfd03..2f83f47 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class CreateProjectAutomationConfigVariant5ActionVariant1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext) as global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext) as global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.g.cs index 69c6aa2..ff71842 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class CreateProjectAutomationConfigVariant5ActionVariant1 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter))] - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter))] + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type Type { get; set; } /// /// The webhook URL to send the request to @@ -29,7 +29,7 @@ public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The webhook URL to send the request to @@ -40,18 +40,18 @@ public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public CreateProjectAutomationConfigVariant4ActionVariant1( + public CreateProjectAutomationConfigVariant5ActionVariant1( string url, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant1Type type) + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant1Type type) { this.Type = type; this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public CreateProjectAutomationConfigVariant4ActionVariant1() + public CreateProjectAutomationConfigVariant5ActionVariant1() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 75% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs index 6fa3f45..65c4290 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum CreateProjectAutomationConfigVariant4ActionVariant1Type + public enum CreateProjectAutomationConfigVariant5ActionVariant1Type { /// /// @@ -17,27 +17,27 @@ public enum CreateProjectAutomationConfigVariant4ActionVariant1Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class CreateProjectAutomationConfigVariant4ActionVariant1TypeExtensions + public static class CreateProjectAutomationConfigVariant5ActionVariant1TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this CreateProjectAutomationConfigVariant4ActionVariant1Type value) + public static string ToValueString(this CreateProjectAutomationConfigVariant5ActionVariant1Type value) { return value switch { - CreateProjectAutomationConfigVariant4ActionVariant1Type.Webhook => "webhook", + CreateProjectAutomationConfigVariant5ActionVariant1Type.Webhook => "webhook", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static CreateProjectAutomationConfigVariant4ActionVariant1Type? ToEnum(string value) + public static CreateProjectAutomationConfigVariant5ActionVariant1Type? ToEnum(string value) { return value switch { - "webhook" => CreateProjectAutomationConfigVariant4ActionVariant1Type.Webhook, + "webhook" => CreateProjectAutomationConfigVariant5ActionVariant1Type.Webhook, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.Json.g.cs index 59ce084..6a990ab 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class CreateProjectAutomationConfigVariant5ActionVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext) as global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext) as global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.g.cs similarity index 88% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.g.cs index 29df9b8..e0d1056 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class CreateProjectAutomationConfigVariant5ActionVariant2 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter))] - public global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.CreateProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter))] + public global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type Type { get; set; } /// /// The Slack workspace ID to post to @@ -42,7 +42,7 @@ public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant2 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The Slack workspace ID to post to @@ -59,10 +59,10 @@ public sealed partial class CreateProjectAutomationConfigVariant4ActionVariant2 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public CreateProjectAutomationConfigVariant4ActionVariant2( + public CreateProjectAutomationConfigVariant5ActionVariant2( string workspaceId, string channel, - global::Braintrust.CreateProjectAutomationConfigVariant4ActionVariant2Type type, + global::Braintrust.CreateProjectAutomationConfigVariant5ActionVariant2Type type, string? messageTemplate) { this.Type = type; @@ -72,9 +72,9 @@ public CreateProjectAutomationConfigVariant4ActionVariant2( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public CreateProjectAutomationConfigVariant4ActionVariant2() + public CreateProjectAutomationConfigVariant5ActionVariant2() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 72% rename from src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs index 29fcd12..b196351 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum CreateProjectAutomationConfigVariant4ActionVariant2Type + public enum CreateProjectAutomationConfigVariant5ActionVariant2Type { /// /// @@ -17,27 +17,27 @@ public enum CreateProjectAutomationConfigVariant4ActionVariant2Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class CreateProjectAutomationConfigVariant4ActionVariant2TypeExtensions + public static class CreateProjectAutomationConfigVariant5ActionVariant2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this CreateProjectAutomationConfigVariant4ActionVariant2Type value) + public static string ToValueString(this CreateProjectAutomationConfigVariant5ActionVariant2Type value) { return value switch { - CreateProjectAutomationConfigVariant4ActionVariant2Type.Slack => "slack", + CreateProjectAutomationConfigVariant5ActionVariant2Type.Slack => "slack", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static CreateProjectAutomationConfigVariant4ActionVariant2Type? ToEnum(string value) + public static CreateProjectAutomationConfigVariant5ActionVariant2Type? ToEnum(string value) { return value switch { - "slack" => CreateProjectAutomationConfigVariant4ActionVariant2Type.Slack, + "slack" => CreateProjectAutomationConfigVariant5ActionVariant2Type.Slack, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..3b5cb95 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.CreateProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The type of automation. + /// + public enum CreateProjectAutomationConfigVariant5EventType + { + /// + /// + /// + EnvironmentUpdate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateProjectAutomationConfigVariant5EventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateProjectAutomationConfigVariant5EventType value) + { + return value switch + { + CreateProjectAutomationConfigVariant5EventType.EnvironmentUpdate => "environment_update", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateProjectAutomationConfigVariant5EventType? ToEnum(string value) + { + return value switch + { + "environment_update" => CreateProjectAutomationConfigVariant5EventType.EnvironmentUpdate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.Json.g.cs new file mode 100644 index 0000000..ccdd0cc --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class GetAgentResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.GetAgentResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.GetAgentResponse), + jsonSerializerContext) as global::Braintrust.GetAgentResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.GetAgentResponse? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.GetAgentResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.GetAgentResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.GetAgentResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.g.cs new file mode 100644 index 0000000..d2a5621 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.GetAgentResponse.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class GetAgentResponse + { + /// + /// A list of agent objects + /// + [global::System.Text.Json.Serialization.JsonPropertyName("objects")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Objects { 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. + /// + /// + /// A list of agent objects + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetAgentResponse( + global::System.Collections.Generic.IList objects) + { + this.Objects = objects ?? throw new global::System.ArgumentNullException(nameof(objects)); + } + + /// + /// Initializes a new instance of the class. + /// + public GetAgentResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.OnlineScoreConfig.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.OnlineScoreConfig.g.cs index cc5bbbd..3aba00a 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.OnlineScoreConfig.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.OnlineScoreConfig.g.cs @@ -47,7 +47,7 @@ public sealed partial class OnlineScoreConfig public bool? SkipLogging { get; set; } /// - /// The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets. + /// The scope at which to run the functions. Defaults to span-level execution. /// [global::System.Text.Json.Serialization.JsonPropertyName("scope")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.AnyOfJsonConverter))] @@ -81,7 +81,7 @@ public sealed partial class OnlineScoreConfig /// Whether to skip adding scorer spans when computing scores /// /// - /// The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets. + /// The scope at which to run the functions. Defaults to span-level execution. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.Json.g.cs new file mode 100644 index 0000000..c913a00 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class PatchAgent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.PatchAgent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.PatchAgent), + jsonSerializerContext) as global::Braintrust.PatchAgent; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.PatchAgent? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.PatchAgent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.PatchAgent), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchAgent; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.g.cs new file mode 100644 index 0000000..ab7c034 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgent.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// An agent is a project-scoped durable object that identifies an AI agent or service emitting spans + /// + public sealed partial class PatchAgent + { + /// + /// Name of the agent. Within a project, agent names are unique + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Textual description of the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// User-controlled metadata about the agent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Name of the agent. Within a project, agent names are unique + /// + /// + /// Textual description of the agent + /// + /// + /// User-controlled metadata about the agent + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PatchAgent( + string? name, + string? description, + global::System.Collections.Generic.Dictionary? metadata) + { + this.Name = name; + this.Description = description; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public PatchAgent() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.Json.g.cs new file mode 100644 index 0000000..bf266f3 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class PatchAgentMetadata + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.PatchAgentMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.PatchAgentMetadata), + jsonSerializerContext) as global::Braintrust.PatchAgentMetadata; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.PatchAgentMetadata? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.PatchAgentMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.PatchAgentMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchAgentMetadata; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.g.cs new file mode 100644 index 0000000..ae918c1 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchAgentMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// User-controlled metadata about the agent + /// + public sealed partial class PatchAgentMetadata + { + + /// + /// 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/Braintrust/Generated/Braintrust.Models.PatchProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomation.g.cs index 110693b..2a6d964 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomation.g.cs @@ -24,8 +24,8 @@ public sealed partial class PatchProjectAutomation /// The configuration for the automation rule /// [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] - public global::Braintrust.OneOf? Config { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + public global::Braintrust.OneOf? Config { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,7 +51,7 @@ public sealed partial class PatchProjectAutomation public PatchProjectAutomation( string? name, string? description, - global::Braintrust.OneOf? config) + global::Braintrust.OneOf? config) { this.Name = name; this.Description = description; diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3.g.cs index 22b35cd..192f449 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3.g.cs @@ -16,19 +16,53 @@ public sealed partial class PatchProjectAutomationConfigVariant3 public global::Braintrust.PatchProjectAutomationConfigVariant3EventType EventType { get; set; } /// - /// The object type that the retention policy applies to + /// Whether the automation is active or paused. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.AutomationStatusJsonConverter))] + public global::Braintrust.AutomationStatus? Status { get; set; } + + /// + /// The user who submitted the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by_user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid CreatedByUserId { get; set; } + + /// + /// The source object type for the async query /// [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3ObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType ObjectType { get; set; } + + /// + /// The source object ID for the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.RetentionObjectType ObjectType { get; set; } + public required string ObjectId { get; set; } /// - /// The number of days to retain the object + /// The SQL query to execute asynchronously /// - [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] + [global::System.Text.Json.Serialization.JsonPropertyName("query")] [global::System.Text.Json.Serialization.JsonRequired] - public required double RetentionDays { get; set; } + public required string Query { get; set; } + + /// + /// The materialized result format + /// + [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant3FormatJsonConverter))] + public global::Braintrust.PatchProjectAutomationConfigVariant3Format Format { get; set; } + + /// + /// The maximum number of result rows to write per async query batch + /// + [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] + public int? BatchSize { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,26 +73,51 @@ public sealed partial class PatchProjectAutomationConfigVariant3 /// /// Initializes a new instance of the class. /// + /// + /// The user who submitted the async query + /// /// - /// The object type that the retention policy applies to + /// The source object type for the async query + /// + /// + /// The source object ID for the async query /// - /// - /// The number of days to retain the object + /// + /// The SQL query to execute asynchronously /// /// /// The type of automation. /// + /// + /// Whether the automation is active or paused. + /// + /// + /// The materialized result format + /// + /// + /// The maximum number of result rows to write per async query batch + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public PatchProjectAutomationConfigVariant3( - global::Braintrust.RetentionObjectType objectType, - double retentionDays, - global::Braintrust.PatchProjectAutomationConfigVariant3EventType eventType) + global::System.Guid createdByUserId, + global::Braintrust.PatchProjectAutomationConfigVariant3ObjectType objectType, + string objectId, + string query, + global::Braintrust.PatchProjectAutomationConfigVariant3EventType eventType, + global::Braintrust.AutomationStatus? status, + global::Braintrust.PatchProjectAutomationConfigVariant3Format format, + int? batchSize) { this.EventType = eventType; + this.Status = status; + this.CreatedByUserId = createdByUserId; this.ObjectType = objectType; - this.RetentionDays = retentionDays; + this.ObjectId = objectId ?? throw new global::System.ArgumentNullException(nameof(objectId)); + this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query)); + this.Format = format; + this.BatchSize = batchSize; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3EventType.g.cs index dc8fd1f..34ea4d6 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3EventType.g.cs @@ -11,7 +11,7 @@ public enum PatchProjectAutomationConfigVariant3EventType /// /// /// - Retention, + AsyncQuery, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this PatchProjectAutomationConfigVariant3Even { return value switch { - PatchProjectAutomationConfigVariant3EventType.Retention => "retention", + PatchProjectAutomationConfigVariant3EventType.AsyncQuery => "async_query", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this PatchProjectAutomationConfigVariant3Even { return value switch { - "retention" => PatchProjectAutomationConfigVariant3EventType.Retention, + "async_query" => PatchProjectAutomationConfigVariant3EventType.AsyncQuery, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..f14b348 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The materialized result format + /// + public enum PatchProjectAutomationConfigVariant3Format + { + /// + /// + /// + Jsonl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class PatchProjectAutomationConfigVariant3FormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this PatchProjectAutomationConfigVariant3Format value) + { + return value switch + { + PatchProjectAutomationConfigVariant3Format.Jsonl => "jsonl", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static PatchProjectAutomationConfigVariant3Format? ToEnum(string value) + { + return value switch + { + "jsonl" => PatchProjectAutomationConfigVariant3Format.Jsonl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..a9d800e --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The source object type for the async query + /// + public enum PatchProjectAutomationConfigVariant3ObjectType + { + /// + /// + /// + Dataset, + /// + /// + /// + Experiment, + /// + /// + /// + PlaygroundLogs, + /// + /// + /// + ProjectLogs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class PatchProjectAutomationConfigVariant3ObjectTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this PatchProjectAutomationConfigVariant3ObjectType value) + { + return value switch + { + PatchProjectAutomationConfigVariant3ObjectType.Dataset => "dataset", + PatchProjectAutomationConfigVariant3ObjectType.Experiment => "experiment", + PatchProjectAutomationConfigVariant3ObjectType.PlaygroundLogs => "playground_logs", + PatchProjectAutomationConfigVariant3ObjectType.ProjectLogs => "project_logs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static PatchProjectAutomationConfigVariant3ObjectType? ToEnum(string value) + { + return value switch + { + "dataset" => PatchProjectAutomationConfigVariant3ObjectType.Dataset, + "experiment" => PatchProjectAutomationConfigVariant3ObjectType.Experiment, + "playground_logs" => PatchProjectAutomationConfigVariant3ObjectType.PlaygroundLogs, + "project_logs" => PatchProjectAutomationConfigVariant3ObjectType.ProjectLogs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4.g.cs index 9c8673e..2b26882 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4.g.cs @@ -16,18 +16,19 @@ public sealed partial class PatchProjectAutomationConfigVariant4 public global::Braintrust.PatchProjectAutomationConfigVariant4EventType EventType { get; set; } /// - /// Optional list of environment slugs to filter by + /// The object type that the retention policy applies to /// - [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] - public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.RetentionObjectType ObjectType { get; set; } /// - /// The action to take when the automation rule is triggered + /// The number of days to retain the object /// - [global::System.Text.Json.Serialization.JsonPropertyName("action")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.OneOf Action { get; set; } + public required double RetentionDays { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +39,26 @@ public sealed partial class PatchProjectAutomationConfigVariant4 /// /// Initializes a new instance of the class. /// - /// - /// The action to take when the automation rule is triggered + /// + /// The object type that the retention policy applies to + /// + /// + /// The number of days to retain the object /// /// /// The type of automation. /// - /// - /// Optional list of environment slugs to filter by - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public PatchProjectAutomationConfigVariant4( - global::Braintrust.OneOf action, - global::Braintrust.PatchProjectAutomationConfigVariant4EventType eventType, - global::System.Collections.Generic.IList? environmentFilter) + global::Braintrust.RetentionObjectType objectType, + double retentionDays, + global::Braintrust.PatchProjectAutomationConfigVariant4EventType eventType) { this.EventType = eventType; - this.EnvironmentFilter = environmentFilter; - this.Action = action; + this.ObjectType = objectType; + this.RetentionDays = retentionDays; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4EventType.g.cs index 10adbe8..612d284 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4EventType.g.cs @@ -11,7 +11,7 @@ public enum PatchProjectAutomationConfigVariant4EventType /// /// /// - EnvironmentUpdate, + Retention, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this PatchProjectAutomationConfigVariant4Even { return value switch { - PatchProjectAutomationConfigVariant4EventType.EnvironmentUpdate => "environment_update", + PatchProjectAutomationConfigVariant4EventType.Retention => "retention", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this PatchProjectAutomationConfigVariant4Even { return value switch { - "environment_update" => PatchProjectAutomationConfigVariant4EventType.EnvironmentUpdate, + "retention" => PatchProjectAutomationConfigVariant4EventType.Retention, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.Json.g.cs new file mode 100644 index 0000000..87c8441 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class PatchProjectAutomationConfigVariant5 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.PatchProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5), + jsonSerializerContext) as global::Braintrust.PatchProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.PatchProjectAutomationConfigVariant5? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.PatchProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.g.cs new file mode 100644 index 0000000..917f73a --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class PatchProjectAutomationConfigVariant5 + { + /// + /// The type of automation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5EventTypeJsonConverter))] + public global::Braintrust.PatchProjectAutomationConfigVariant5EventType EventType { get; set; } + + /// + /// Optional list of environment slugs to filter by + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] + public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + + /// + /// The action to take when the automation rule is triggered + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.OneOf Action { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The action to take when the automation rule is triggered + /// + /// + /// The type of automation. + /// + /// + /// Optional list of environment slugs to filter by + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PatchProjectAutomationConfigVariant5( + global::Braintrust.OneOf action, + global::Braintrust.PatchProjectAutomationConfigVariant5EventType eventType, + global::System.Collections.Generic.IList? environmentFilter) + { + this.EventType = eventType; + this.EnvironmentFilter = environmentFilter; + this.Action = action; + } + + /// + /// Initializes a new instance of the class. + /// + public PatchProjectAutomationConfigVariant5() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.Json.g.cs index b17b354..3439963 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class PatchProjectAutomationConfigVariant5ActionVariant1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext) as global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext) as global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.g.cs similarity index 83% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.g.cs index a745f74..6576322 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class PatchProjectAutomationConfigVariant5ActionVariant1 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter))] - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter))] + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type Type { get; set; } /// /// The webhook URL to send the request to @@ -29,7 +29,7 @@ public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The webhook URL to send the request to @@ -40,18 +40,18 @@ public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public PatchProjectAutomationConfigVariant4ActionVariant1( + public PatchProjectAutomationConfigVariant5ActionVariant1( string url, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant1Type type) + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant1Type type) { this.Type = type; this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PatchProjectAutomationConfigVariant4ActionVariant1() + public PatchProjectAutomationConfigVariant5ActionVariant1() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 75% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs index c162f53..e193b03 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum PatchProjectAutomationConfigVariant4ActionVariant1Type + public enum PatchProjectAutomationConfigVariant5ActionVariant1Type { /// /// @@ -17,27 +17,27 @@ public enum PatchProjectAutomationConfigVariant4ActionVariant1Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class PatchProjectAutomationConfigVariant4ActionVariant1TypeExtensions + public static class PatchProjectAutomationConfigVariant5ActionVariant1TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this PatchProjectAutomationConfigVariant4ActionVariant1Type value) + public static string ToValueString(this PatchProjectAutomationConfigVariant5ActionVariant1Type value) { return value switch { - PatchProjectAutomationConfigVariant4ActionVariant1Type.Webhook => "webhook", + PatchProjectAutomationConfigVariant5ActionVariant1Type.Webhook => "webhook", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static PatchProjectAutomationConfigVariant4ActionVariant1Type? ToEnum(string value) + public static PatchProjectAutomationConfigVariant5ActionVariant1Type? ToEnum(string value) { return value switch { - "webhook" => PatchProjectAutomationConfigVariant4ActionVariant1Type.Webhook, + "webhook" => PatchProjectAutomationConfigVariant5ActionVariant1Type.Webhook, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.Json.g.cs index 190915d..13047ae 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class PatchProjectAutomationConfigVariant5ActionVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext) as global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext) as global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.g.cs similarity index 88% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.g.cs index 646d92d..a5ca6f0 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class PatchProjectAutomationConfigVariant5ActionVariant2 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter))] - public global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.PatchProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter))] + public global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type Type { get; set; } /// /// The Slack workspace ID to post to @@ -42,7 +42,7 @@ public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant2 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The Slack workspace ID to post to @@ -59,10 +59,10 @@ public sealed partial class PatchProjectAutomationConfigVariant4ActionVariant2 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public PatchProjectAutomationConfigVariant4ActionVariant2( + public PatchProjectAutomationConfigVariant5ActionVariant2( string workspaceId, string channel, - global::Braintrust.PatchProjectAutomationConfigVariant4ActionVariant2Type type, + global::Braintrust.PatchProjectAutomationConfigVariant5ActionVariant2Type type, string? messageTemplate) { this.Type = type; @@ -72,9 +72,9 @@ public PatchProjectAutomationConfigVariant4ActionVariant2( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PatchProjectAutomationConfigVariant4ActionVariant2() + public PatchProjectAutomationConfigVariant5ActionVariant2() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 72% rename from src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs index 788eadb..b572cef 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum PatchProjectAutomationConfigVariant4ActionVariant2Type + public enum PatchProjectAutomationConfigVariant5ActionVariant2Type { /// /// @@ -17,27 +17,27 @@ public enum PatchProjectAutomationConfigVariant4ActionVariant2Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class PatchProjectAutomationConfigVariant4ActionVariant2TypeExtensions + public static class PatchProjectAutomationConfigVariant5ActionVariant2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this PatchProjectAutomationConfigVariant4ActionVariant2Type value) + public static string ToValueString(this PatchProjectAutomationConfigVariant5ActionVariant2Type value) { return value switch { - PatchProjectAutomationConfigVariant4ActionVariant2Type.Slack => "slack", + PatchProjectAutomationConfigVariant5ActionVariant2Type.Slack => "slack", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static PatchProjectAutomationConfigVariant4ActionVariant2Type? ToEnum(string value) + public static PatchProjectAutomationConfigVariant5ActionVariant2Type? ToEnum(string value) { return value switch { - "slack" => PatchProjectAutomationConfigVariant4ActionVariant2Type.Slack, + "slack" => PatchProjectAutomationConfigVariant5ActionVariant2Type.Slack, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..15dae09 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.PatchProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The type of automation. + /// + public enum PatchProjectAutomationConfigVariant5EventType + { + /// + /// + /// + EnvironmentUpdate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class PatchProjectAutomationConfigVariant5EventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this PatchProjectAutomationConfigVariant5EventType value) + { + return value switch + { + PatchProjectAutomationConfigVariant5EventType.EnvironmentUpdate => "environment_update", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static PatchProjectAutomationConfigVariant5EventType? ToEnum(string value) + { + return value switch + { + "environment_update" => PatchProjectAutomationConfigVariant5EventType.EnvironmentUpdate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomation.g.cs index a976bff..29cc009 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomation.g.cs @@ -51,9 +51,9 @@ public sealed partial class ProjectAutomation /// The configuration for the automation rule /// [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.OneOf Config { get; set; } + public required global::Braintrust.OneOf Config { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -92,7 +92,7 @@ public ProjectAutomation( global::System.Guid id, global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, global::System.Guid? userId, global::System.DateTime? created, string? description) diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3.g.cs index aeb95e7..94b5b39 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3.g.cs @@ -16,19 +16,53 @@ public sealed partial class ProjectAutomationConfigVariant3 public global::Braintrust.ProjectAutomationConfigVariant3EventType EventType { get; set; } /// - /// The object type that the retention policy applies to + /// Whether the automation is active or paused. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.AutomationStatusJsonConverter))] + public global::Braintrust.AutomationStatus? Status { get; set; } + + /// + /// The user who submitted the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by_user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid CreatedByUserId { get; set; } + + /// + /// The source object type for the async query /// [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3ObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.ProjectAutomationConfigVariant3ObjectType ObjectType { get; set; } + + /// + /// The source object ID for the async query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.RetentionObjectType ObjectType { get; set; } + public required string ObjectId { get; set; } /// - /// The number of days to retain the object + /// The SQL query to execute asynchronously /// - [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] + [global::System.Text.Json.Serialization.JsonPropertyName("query")] [global::System.Text.Json.Serialization.JsonRequired] - public required double RetentionDays { get; set; } + public required string Query { get; set; } + + /// + /// The materialized result format + /// + [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant3FormatJsonConverter))] + public global::Braintrust.ProjectAutomationConfigVariant3Format Format { get; set; } + + /// + /// The maximum number of result rows to write per async query batch + /// + [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] + public int? BatchSize { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,26 +73,51 @@ public sealed partial class ProjectAutomationConfigVariant3 /// /// Initializes a new instance of the class. /// + /// + /// The user who submitted the async query + /// /// - /// The object type that the retention policy applies to + /// The source object type for the async query + /// + /// + /// The source object ID for the async query /// - /// - /// The number of days to retain the object + /// + /// The SQL query to execute asynchronously /// /// /// The type of automation. /// + /// + /// Whether the automation is active or paused. + /// + /// + /// The materialized result format + /// + /// + /// The maximum number of result rows to write per async query batch + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectAutomationConfigVariant3( - global::Braintrust.RetentionObjectType objectType, - double retentionDays, - global::Braintrust.ProjectAutomationConfigVariant3EventType eventType) + global::System.Guid createdByUserId, + global::Braintrust.ProjectAutomationConfigVariant3ObjectType objectType, + string objectId, + string query, + global::Braintrust.ProjectAutomationConfigVariant3EventType eventType, + global::Braintrust.AutomationStatus? status, + global::Braintrust.ProjectAutomationConfigVariant3Format format, + int? batchSize) { this.EventType = eventType; + this.Status = status; + this.CreatedByUserId = createdByUserId; this.ObjectType = objectType; - this.RetentionDays = retentionDays; + this.ObjectId = objectId ?? throw new global::System.ArgumentNullException(nameof(objectId)); + this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query)); + this.Format = format; + this.BatchSize = batchSize; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3EventType.g.cs index ff41605..478e7d4 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3EventType.g.cs @@ -11,7 +11,7 @@ public enum ProjectAutomationConfigVariant3EventType /// /// /// - Retention, + AsyncQuery, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this ProjectAutomationConfigVariant3EventType { return value switch { - ProjectAutomationConfigVariant3EventType.Retention => "retention", + ProjectAutomationConfigVariant3EventType.AsyncQuery => "async_query", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this ProjectAutomationConfigVariant3EventType { return value switch { - "retention" => ProjectAutomationConfigVariant3EventType.Retention, + "async_query" => ProjectAutomationConfigVariant3EventType.AsyncQuery, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3Format.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3Format.g.cs new file mode 100644 index 0000000..d8ebf34 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3Format.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The materialized result format + /// + public enum ProjectAutomationConfigVariant3Format + { + /// + /// + /// + Jsonl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectAutomationConfigVariant3FormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectAutomationConfigVariant3Format value) + { + return value switch + { + ProjectAutomationConfigVariant3Format.Jsonl => "jsonl", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectAutomationConfigVariant3Format? ToEnum(string value) + { + return value switch + { + "jsonl" => ProjectAutomationConfigVariant3Format.Jsonl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3ObjectType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3ObjectType.g.cs new file mode 100644 index 0000000..311d1b4 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant3ObjectType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The source object type for the async query + /// + public enum ProjectAutomationConfigVariant3ObjectType + { + /// + /// + /// + Dataset, + /// + /// + /// + Experiment, + /// + /// + /// + PlaygroundLogs, + /// + /// + /// + ProjectLogs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectAutomationConfigVariant3ObjectTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectAutomationConfigVariant3ObjectType value) + { + return value switch + { + ProjectAutomationConfigVariant3ObjectType.Dataset => "dataset", + ProjectAutomationConfigVariant3ObjectType.Experiment => "experiment", + ProjectAutomationConfigVariant3ObjectType.PlaygroundLogs => "playground_logs", + ProjectAutomationConfigVariant3ObjectType.ProjectLogs => "project_logs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectAutomationConfigVariant3ObjectType? ToEnum(string value) + { + return value switch + { + "dataset" => ProjectAutomationConfigVariant3ObjectType.Dataset, + "experiment" => ProjectAutomationConfigVariant3ObjectType.Experiment, + "playground_logs" => ProjectAutomationConfigVariant3ObjectType.PlaygroundLogs, + "project_logs" => ProjectAutomationConfigVariant3ObjectType.ProjectLogs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4.g.cs index db48108..b1ce926 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4.g.cs @@ -16,18 +16,19 @@ public sealed partial class ProjectAutomationConfigVariant4 public global::Braintrust.ProjectAutomationConfigVariant4EventType EventType { get; set; } /// - /// Optional list of environment slugs to filter by + /// The object type that the retention policy applies to /// - [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] - public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.RetentionObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.RetentionObjectType ObjectType { get; set; } /// - /// The action to take when the automation rule is triggered + /// The number of days to retain the object /// - [global::System.Text.Json.Serialization.JsonPropertyName("action")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("retention_days")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Braintrust.OneOf Action { get; set; } + public required double RetentionDays { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +39,26 @@ public sealed partial class ProjectAutomationConfigVariant4 /// /// Initializes a new instance of the class. /// - /// - /// The action to take when the automation rule is triggered + /// + /// The object type that the retention policy applies to + /// + /// + /// The number of days to retain the object /// /// /// The type of automation. /// - /// - /// Optional list of environment slugs to filter by - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectAutomationConfigVariant4( - global::Braintrust.OneOf action, - global::Braintrust.ProjectAutomationConfigVariant4EventType eventType, - global::System.Collections.Generic.IList? environmentFilter) + global::Braintrust.RetentionObjectType objectType, + double retentionDays, + global::Braintrust.ProjectAutomationConfigVariant4EventType eventType) { this.EventType = eventType; - this.EnvironmentFilter = environmentFilter; - this.Action = action; + this.ObjectType = objectType; + this.RetentionDays = retentionDays; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4EventType.g.cs index 8af0ec8..a133aaf 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4EventType.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4EventType.g.cs @@ -11,7 +11,7 @@ public enum ProjectAutomationConfigVariant4EventType /// /// /// - EnvironmentUpdate, + Retention, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this ProjectAutomationConfigVariant4EventType { return value switch { - ProjectAutomationConfigVariant4EventType.EnvironmentUpdate => "environment_update", + ProjectAutomationConfigVariant4EventType.Retention => "retention", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this ProjectAutomationConfigVariant4EventType { return value switch { - "environment_update" => ProjectAutomationConfigVariant4EventType.EnvironmentUpdate, + "retention" => ProjectAutomationConfigVariant4EventType.Retention, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.Json.g.cs new file mode 100644 index 0000000..7ff23cd --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class ProjectAutomationConfigVariant5 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.ProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.ProjectAutomationConfigVariant5), + jsonSerializerContext) as global::Braintrust.ProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.ProjectAutomationConfigVariant5? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.ProjectAutomationConfigVariant5? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.ProjectAutomationConfigVariant5), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectAutomationConfigVariant5; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.g.cs new file mode 100644 index 0000000..60739a7 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class ProjectAutomationConfigVariant5 + { + /// + /// The type of automation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5EventTypeJsonConverter))] + public global::Braintrust.ProjectAutomationConfigVariant5EventType EventType { get; set; } + + /// + /// Optional list of environment slugs to filter by + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment_filter")] + public global::System.Collections.Generic.IList? EnvironmentFilter { get; set; } + + /// + /// The action to take when the automation rule is triggered + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.OneOf Action { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The action to take when the automation rule is triggered + /// + /// + /// The type of automation. + /// + /// + /// Optional list of environment slugs to filter by + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectAutomationConfigVariant5( + global::Braintrust.OneOf action, + global::Braintrust.ProjectAutomationConfigVariant5EventType eventType, + global::System.Collections.Generic.IList? environmentFilter) + { + this.EventType = eventType; + this.EnvironmentFilter = environmentFilter; + this.Action = action; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectAutomationConfigVariant5() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.Json.g.cs index 8c819a3..e05b4bf 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class ProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class ProjectAutomationConfigVariant5ActionVariant1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext) as global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext) as global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1; + typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.g.cs similarity index 81% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.g.cs index c6c306b..83a6365 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class ProjectAutomationConfigVariant4ActionVariant1 + public sealed partial class ProjectAutomationConfigVariant5ActionVariant1 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant1TypeJsonConverter))] - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant1TypeJsonConverter))] + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type Type { get; set; } /// /// The webhook URL to send the request to @@ -29,7 +29,7 @@ public sealed partial class ProjectAutomationConfigVariant4ActionVariant1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The webhook URL to send the request to @@ -40,18 +40,18 @@ public sealed partial class ProjectAutomationConfigVariant4ActionVariant1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ProjectAutomationConfigVariant4ActionVariant1( + public ProjectAutomationConfigVariant5ActionVariant1( string url, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant1Type type) + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant1Type type) { this.Type = type; this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ProjectAutomationConfigVariant4ActionVariant1() + public ProjectAutomationConfigVariant5ActionVariant1() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs similarity index 72% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs index ae921d2..f1ed20d 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant1Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant1Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum ProjectAutomationConfigVariant4ActionVariant1Type + public enum ProjectAutomationConfigVariant5ActionVariant1Type { /// /// @@ -17,27 +17,27 @@ public enum ProjectAutomationConfigVariant4ActionVariant1Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ProjectAutomationConfigVariant4ActionVariant1TypeExtensions + public static class ProjectAutomationConfigVariant5ActionVariant1TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ProjectAutomationConfigVariant4ActionVariant1Type value) + public static string ToValueString(this ProjectAutomationConfigVariant5ActionVariant1Type value) { return value switch { - ProjectAutomationConfigVariant4ActionVariant1Type.Webhook => "webhook", + ProjectAutomationConfigVariant5ActionVariant1Type.Webhook => "webhook", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ProjectAutomationConfigVariant4ActionVariant1Type? ToEnum(string value) + public static ProjectAutomationConfigVariant5ActionVariant1Type? ToEnum(string value) { return value switch { - "webhook" => ProjectAutomationConfigVariant4ActionVariant1Type.Webhook, + "webhook" => ProjectAutomationConfigVariant5ActionVariant1Type.Webhook, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.Json.g.cs index 6704bd6..aa512f8 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public sealed partial class ProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class ProjectAutomationConfigVariant5ActionVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext) as global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext) as global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2? FromJson( + public static global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2; + typeof(global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.g.cs similarity index 86% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.g.cs index 0bb6be6..2bd95a8 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2.g.cs @@ -6,14 +6,14 @@ namespace Braintrust /// /// /// - public sealed partial class ProjectAutomationConfigVariant4ActionVariant2 + public sealed partial class ProjectAutomationConfigVariant5ActionVariant2 { /// /// The type of action to take /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant4ActionVariant2TypeJsonConverter))] - public global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectAutomationConfigVariant5ActionVariant2TypeJsonConverter))] + public global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type Type { get; set; } /// /// The Slack workspace ID to post to @@ -42,7 +42,7 @@ public sealed partial class ProjectAutomationConfigVariant4ActionVariant2 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The Slack workspace ID to post to @@ -59,10 +59,10 @@ public sealed partial class ProjectAutomationConfigVariant4ActionVariant2 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ProjectAutomationConfigVariant4ActionVariant2( + public ProjectAutomationConfigVariant5ActionVariant2( string workspaceId, string channel, - global::Braintrust.ProjectAutomationConfigVariant4ActionVariant2Type type, + global::Braintrust.ProjectAutomationConfigVariant5ActionVariant2Type type, string? messageTemplate) { this.Type = type; @@ -72,9 +72,9 @@ public ProjectAutomationConfigVariant4ActionVariant2( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ProjectAutomationConfigVariant4ActionVariant2() + public ProjectAutomationConfigVariant5ActionVariant2() { } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs similarity index 72% rename from src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs rename to src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs index 58667e1..826a01a 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant4ActionVariant2Type.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5ActionVariant2Type.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// The type of action to take /// - public enum ProjectAutomationConfigVariant4ActionVariant2Type + public enum ProjectAutomationConfigVariant5ActionVariant2Type { /// /// @@ -17,27 +17,27 @@ public enum ProjectAutomationConfigVariant4ActionVariant2Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ProjectAutomationConfigVariant4ActionVariant2TypeExtensions + public static class ProjectAutomationConfigVariant5ActionVariant2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ProjectAutomationConfigVariant4ActionVariant2Type value) + public static string ToValueString(this ProjectAutomationConfigVariant5ActionVariant2Type value) { return value switch { - ProjectAutomationConfigVariant4ActionVariant2Type.Slack => "slack", + ProjectAutomationConfigVariant5ActionVariant2Type.Slack => "slack", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ProjectAutomationConfigVariant4ActionVariant2Type? ToEnum(string value) + public static ProjectAutomationConfigVariant5ActionVariant2Type? ToEnum(string value) { return value switch { - "slack" => ProjectAutomationConfigVariant4ActionVariant2Type.Slack, + "slack" => ProjectAutomationConfigVariant5ActionVariant2Type.Slack, _ => null, }; } diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5EventType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5EventType.g.cs new file mode 100644 index 0000000..8f7a34c --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectAutomationConfigVariant5EventType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// The type of automation. + /// + public enum ProjectAutomationConfigVariant5EventType + { + /// + /// + /// + EnvironmentUpdate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectAutomationConfigVariant5EventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectAutomationConfigVariant5EventType value) + { + return value switch + { + ProjectAutomationConfigVariant5EventType.EnvironmentUpdate => "environment_update", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectAutomationConfigVariant5EventType? ToEnum(string value) + { + return value switch + { + "environment_update" => ProjectAutomationConfigVariant5EventType.EnvironmentUpdate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.Json.g.cs new file mode 100644 index 0000000..9e92a6f --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class ProjectScoreCondition + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.ProjectScoreCondition? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.ProjectScoreCondition), + jsonSerializerContext) as global::Braintrust.ProjectScoreCondition; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.ProjectScoreCondition? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.ProjectScoreCondition? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.ProjectScoreCondition), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectScoreCondition; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.g.cs new file mode 100644 index 0000000..b4d3ad5 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreCondition.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class ProjectScoreCondition + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("when")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Braintrust.ProjectScoreConditionWhen When { get; set; } + + /// + /// Default Value: hidden + /// + [global::System.Text.Json.Serialization.JsonPropertyName("behavior")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Braintrust.JsonConverters.ProjectScoreConditionBehaviorJsonConverter))] + public global::Braintrust.ProjectScoreConditionBehavior? Behavior { 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: hidden + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectScoreCondition( + global::Braintrust.ProjectScoreConditionWhen when, + global::Braintrust.ProjectScoreConditionBehavior? behavior) + { + this.When = when ?? throw new global::System.ArgumentNullException(nameof(when)); + this.Behavior = behavior; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectScoreCondition() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionBehavior.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionBehavior.g.cs new file mode 100644 index 0000000..6c8031e --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionBehavior.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// Default Value: hidden + /// + public enum ProjectScoreConditionBehavior + { + /// + /// + /// + Hidden, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectScoreConditionBehaviorExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectScoreConditionBehavior value) + { + return value switch + { + ProjectScoreConditionBehavior.Hidden => "hidden", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectScoreConditionBehavior? ToEnum(string value) + { + return value switch + { + "hidden" => ProjectScoreConditionBehavior.Hidden, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.Json.g.cs new file mode 100644 index 0000000..7fc78cd --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Braintrust +{ + public sealed partial class ProjectScoreConditionWhen + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Braintrust.ProjectScoreConditionWhen? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Braintrust.ProjectScoreConditionWhen), + jsonSerializerContext) as global::Braintrust.ProjectScoreConditionWhen; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Braintrust.ProjectScoreConditionWhen? FromJson( + string json) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Braintrust.ProjectScoreConditionWhen? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Braintrust.ProjectScoreConditionWhen), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.ProjectScoreConditionWhen; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Braintrust.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.g.cs new file mode 100644 index 0000000..0b07059 --- /dev/null +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConditionWhen.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Braintrust +{ + /// + /// + /// + public sealed partial class ProjectScoreConditionWhen + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clauses")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Clauses { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectScoreConditionWhen( + global::System.Collections.Generic.IList clauses) + { + this.Clauses = clauses ?? throw new global::System.ArgumentNullException(nameof(clauses)); + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectScoreConditionWhen() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConfig.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConfig.g.cs index 7e6d47f..91d80ce 100644 --- a/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConfig.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.Models.ProjectScoreConfig.g.cs @@ -32,6 +32,12 @@ public sealed partial class ProjectScoreConfig [global::System.Text.Json.Serialization.JsonPropertyName("online")] public global::Braintrust.OnlineScoreConfig? Online { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("condition")] + public global::Braintrust.ProjectScoreCondition? Condition { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +51,7 @@ public sealed partial class ProjectScoreConfig /// /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -52,12 +59,14 @@ public ProjectScoreConfig( bool? multiSelect, string? destination, global::Braintrust.ProjectScoreConfigVisibility? visibility, - global::Braintrust.OnlineScoreConfig? online) + global::Braintrust.OnlineScoreConfig? online, + global::Braintrust.ProjectScoreCondition? condition) { this.MultiSelect = multiSelect; this.Destination = destination; this.Visibility = visibility; this.Online = online; + this.Condition = condition; } /// diff --git a/src/libs/Braintrust/Generated/Braintrust.OneOf.5.Json.g.cs b/src/libs/Braintrust/Generated/Braintrust.OneOf.7.Json.g.cs similarity index 91% rename from src/libs/Braintrust/Generated/Braintrust.OneOf.5.Json.g.cs rename to src/libs/Braintrust/Generated/Braintrust.OneOf.7.Json.g.cs index 4b30058..a5d1054 100644 --- a/src/libs/Braintrust/Generated/Braintrust.OneOf.5.Json.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.OneOf.7.Json.g.cs @@ -2,7 +2,7 @@ namespace Braintrust { - public readonly partial struct OneOf + public readonly partial struct OneOf { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Braintrust.OneOf? FromJson( + public static global::Braintrust.OneOf? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Braintrust.OneOf), - jsonSerializerContext) as global::Braintrust.OneOf?; + typeof(global::Braintrust.OneOf), + jsonSerializerContext) as global::Braintrust.OneOf?; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Braintrust.OneOf? FromJson( + public static global::Braintrust.OneOf? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Braintrust.OneOf? FromJson( + public static global::Braintrust.OneOf? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize>( + return global::System.Text.Json.JsonSerializer.Deserialize>( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Braintrust.OneOf), - jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.OneOf?; + typeof(global::Braintrust.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::Braintrust.OneOf?; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Braintrust.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Braintrust/Generated/Braintrust.OneOf.5.g.cs b/src/libs/Braintrust/Generated/Braintrust.OneOf.7.g.cs similarity index 64% rename from src/libs/Braintrust/Generated/Braintrust.OneOf.5.g.cs rename to src/libs/Braintrust/Generated/Braintrust.OneOf.7.g.cs index 4bfb89d..ef4fc15 100644 --- a/src/libs/Braintrust/Generated/Braintrust.OneOf.5.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.OneOf.7.g.cs @@ -6,7 +6,7 @@ namespace Braintrust /// /// /// - public readonly partial struct OneOf : global::System.IEquatable> + public readonly partial struct OneOf : global::System.IEquatable> { /// /// @@ -192,15 +192,89 @@ public bool TryPickValue5( public T5 PickValue5() => IsValue5 ? Value5! : throw new global::System.InvalidOperationException($"Expected union variant 'Value5' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public T6? Value6 { get; init; } +#else + public T6? Value6 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] +#endif + public bool IsValue6 => Value6 != null; + + /// + /// + /// + public bool TryPickValue6( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T6? value) + { + value = Value6; + return IsValue6; + } + + /// + /// + /// + public T6 PickValue6() => IsValue6 + ? Value6! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value6' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public T7? Value7 { get; init; } +#else + public T7? Value7 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] +#endif + public bool IsValue7 => Value7 != null; + + /// + /// + /// + public bool TryPickValue7( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T7? value) + { + value = Value7; + return IsValue7; + } + + /// + /// + /// + public T7 PickValue7() => IsValue7 + ? Value7! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value7' but the value was {ToString()}."); /// /// /// - public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); + public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); /// /// /// - public static implicit operator T1?(OneOf @this) => @this.Value1; + public static implicit operator T1?(OneOf @this) => @this.Value1; /// /// @@ -213,17 +287,17 @@ public OneOf(T1? value) /// /// /// - public static OneOf FromValue1(T1? value) => new OneOf(value); + public static OneOf FromValue1(T1? value) => new OneOf(value); /// /// /// - public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); /// /// /// - public static implicit operator T2?(OneOf @this) => @this.Value2; + public static implicit operator T2?(OneOf @this) => @this.Value2; /// /// @@ -236,17 +310,17 @@ public OneOf(T2? value) /// /// /// - public static OneOf FromValue2(T2? value) => new OneOf(value); + public static OneOf FromValue2(T2? value) => new OneOf(value); /// /// /// - public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); + public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); /// /// /// - public static implicit operator T3?(OneOf @this) => @this.Value3; + public static implicit operator T3?(OneOf @this) => @this.Value3; /// /// @@ -259,17 +333,17 @@ public OneOf(T3? value) /// /// /// - public static OneOf FromValue3(T3? value) => new OneOf(value); + public static OneOf FromValue3(T3? value) => new OneOf(value); /// /// /// - public static implicit operator OneOf(T4 value) => new OneOf((T4?)value); + public static implicit operator OneOf(T4 value) => new OneOf((T4?)value); /// /// /// - public static implicit operator T4?(OneOf @this) => @this.Value4; + public static implicit operator T4?(OneOf @this) => @this.Value4; /// /// @@ -282,17 +356,17 @@ public OneOf(T4? value) /// /// /// - public static OneOf FromValue4(T4? value) => new OneOf(value); + public static OneOf FromValue4(T4? value) => new OneOf(value); /// /// /// - public static implicit operator OneOf(T5 value) => new OneOf((T5?)value); + public static implicit operator OneOf(T5 value) => new OneOf((T5?)value); /// /// /// - public static implicit operator T5?(OneOf @this) => @this.Value5; + public static implicit operator T5?(OneOf @this) => @this.Value5; /// /// @@ -305,7 +379,53 @@ public OneOf(T5? value) /// /// /// - public static OneOf FromValue5(T5? value) => new OneOf(value); + public static OneOf FromValue5(T5? value) => new OneOf(value); + + /// + /// + /// + public static implicit operator OneOf(T6 value) => new OneOf((T6?)value); + + /// + /// + /// + public static implicit operator T6?(OneOf @this) => @this.Value6; + + /// + /// + /// + public OneOf(T6? value) + { + Value6 = value; + } + + /// + /// + /// + public static OneOf FromValue6(T6? value) => new OneOf(value); + + /// + /// + /// + public static implicit operator OneOf(T7 value) => new OneOf((T7?)value); + + /// + /// + /// + public static implicit operator T7?(OneOf @this) => @this.Value7; + + /// + /// + /// + public OneOf(T7? value) + { + Value7 = value; + } + + /// + /// + /// + public static OneOf FromValue7(T7? value) => new OneOf(value); /// /// @@ -315,7 +435,9 @@ public OneOf( T2? value2, T3? value3, T4? value4, - T5? value5 + T5? value5, + T6? value6, + T7? value7 ) { Value1 = value1; @@ -323,12 +445,16 @@ public OneOf( Value3 = value3; Value4 = value4; Value5 = value5; + Value6 = value6; + Value7 = value7; } /// /// /// public object? Object => + Value7 as object ?? + Value6 as object ?? Value5 as object ?? Value4 as object ?? Value3 as object ?? @@ -344,7 +470,9 @@ Value1 as object Value2?.ToString() ?? Value3?.ToString() ?? Value4?.ToString() ?? - Value5?.ToString() + Value5?.ToString() ?? + Value6?.ToString() ?? + Value7?.ToString() ; /// @@ -352,7 +480,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5; + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7; } /// @@ -364,6 +492,8 @@ public bool Validate() global::System.Func? value3 = null, global::System.Func? value4 = null, global::System.Func? value5 = null, + global::System.Func? value6 = null, + global::System.Func? value7 = null, bool validate = true) { if (validate) @@ -391,6 +521,14 @@ public bool Validate() { return value5(Value5!); } + else if (IsValue6 && value6 != null) + { + return value6(Value6!); + } + else if (IsValue7 && value7 != null) + { + return value7(Value7!); + } return default(TResult); } @@ -408,6 +546,10 @@ public void Match( global::System.Action? value4 = null, global::System.Action? value5 = null, + + global::System.Action? value6 = null, + + global::System.Action? value7 = null, bool validate = true) { if (validate) @@ -435,6 +577,14 @@ public void Match( { value5?.Invoke(Value5!); } + else if (IsValue6) + { + value6?.Invoke(Value6!); + } + else if (IsValue7) + { + value7?.Invoke(Value7!); + } } /// @@ -446,6 +596,8 @@ public void Switch( global::System.Action? value3 = null, global::System.Action? value4 = null, global::System.Action? value5 = null, + global::System.Action? value6 = null, + global::System.Action? value7 = null, bool validate = true) { if (validate) @@ -473,6 +625,14 @@ public void Switch( { value5?.Invoke(Value5!); } + else if (IsValue6) + { + value6?.Invoke(Value6!); + } + else if (IsValue7) + { + value7?.Invoke(Value7!); + } } /// @@ -492,6 +652,10 @@ public override int GetHashCode() typeof(T4), Value5, typeof(T5), + Value6, + typeof(T6), + Value7, + typeof(T7), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -505,29 +669,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(OneOf other) + public bool Equals(OneOf other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) ; } /// /// /// - public static bool operator ==(OneOf obj1, OneOf obj2) + public static bool operator ==(OneOf obj1, OneOf obj2) { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(OneOf obj1, OneOf obj2) + public static bool operator !=(OneOf obj1, OneOf obj2) { return !(obj1 == obj2); } @@ -537,7 +703,7 @@ public bool Equals(OneOf other) /// public override bool Equals(object? obj) { - return obj is OneOf o && Equals(o); + return obj is OneOf o && Equals(o); } } } diff --git a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PatchProjectAutomationId.g.cs b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PatchProjectAutomationId.g.cs index d720c3e..aca9faf 100644 --- a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PatchProjectAutomationId.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PatchProjectAutomationId.g.cs @@ -663,7 +663,7 @@ partial void ProcessPatchProjectAutomationIdResponseContent( global::System.Guid projectAutomationId, string? name = default, string? description = default, - global::Braintrust.OneOf? config = default, + global::Braintrust.OneOf? config = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { diff --git a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PostProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PostProjectAutomation.g.cs index 3bf50e4..d3fccb3 100644 --- a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PostProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PostProjectAutomation.g.cs @@ -649,7 +649,7 @@ partial void ProcessPostProjectAutomationResponseContent( public async global::System.Threading.Tasks.Task PostProjectAutomationAsync( global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, string? description = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PutProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PutProjectAutomation.g.cs index ef76c3b..03cf38f 100644 --- a/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PutProjectAutomation.g.cs +++ b/src/libs/Braintrust/Generated/Braintrust.ProjectAutomationsClient.PutProjectAutomation.g.cs @@ -649,7 +649,7 @@ partial void ProcessPutProjectAutomationResponseContent( public async global::System.Threading.Tasks.Task PutProjectAutomationAsync( global::System.Guid projectId, string name, - global::Braintrust.OneOf config, + global::Braintrust.OneOf config, string? description = default, global::Braintrust.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/Braintrust/openapi.yaml b/src/libs/Braintrust/openapi.yaml index d1ede54..ff8f4d9 100644 --- a/src/libs/Braintrust/openapi.yaml +++ b/src/libs/Braintrust/openapi.yaml @@ -74,6 +74,11 @@ "format": "uuid", "description": "User id" }, + "AgentIdParam": { + "type": "string", + "format": "uuid", + "description": "Agent id" + }, "ProjectAutomationIdParam": { "type": "string", "format": "uuid", @@ -172,6 +177,10 @@ "type": "string", "description": "Name of the group to search for" }, + "AgentName": { + "type": "string", + "description": "Name of the agent to search for" + }, "ProjectAutomationName": { "type": "string", "description": "Name of the project_automation to search for" @@ -387,7 +396,8 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs" ], "description": "The object type that the ACL applies to" }, @@ -409,7 +419,8 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs" ], "description": "The object type that the ACL applies to" }, @@ -455,7 +466,8 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs" ], "description": "The object type that the ACL applies to" }, @@ -5072,6 +5084,121 @@ "id" ] }, + "Agent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the agent" + }, + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the agent belongs under" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of agent creation" + }, + "name": { + "type": "string", + "description": "Name of the agent. Within a project, agent names are unique" + }, + "slug": { + "type": "string", + "description": "Stable, URL-safe identifier for the agent, unique within its project." + }, + "kind": { + "type": "string", + "description": "Agent classification: 'custom' for customer-defined agents, 'loop' for built-in Loop agents." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "required": [ + "id", + "project_id", + "user_id", + "name", + "slug", + "kind" + ], + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, + "CreateAgent": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the agent belongs under" + }, + "name": { + "type": "string", + "description": "Name of the agent. Within a project, agent names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "required": [ + "project_id", + "name" + ], + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, + "PatchAgent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Name of the agent. Within a project, agent names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, "AutomationStatus": { "type": "string", "enum": [ @@ -5742,6 +5869,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -6121,6 +6309,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -6495,6 +6744,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -6768,7 +7078,7 @@ "type": "null" } ], - "description": "The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets." + "description": "The scope at which to run the functions. Defaults to span-level execution." } }, "required": [ @@ -6776,6 +7086,36 @@ "scorers" ] }, + "ProjectScoreCondition": { + "type": "object", + "nullable": true, + "properties": { + "when": { + "type": "object", + "properties": { + "clauses": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "clauses" + ] + }, + "behavior": { + "type": "string", + "enum": [ + "hidden" + ], + "default": "hidden" + } + }, + "required": [ + "when" + ] + }, "ProjectScoreConfig": { "type": "object", "nullable": true, @@ -6810,6 +7150,9 @@ }, "online": { "$ref": "#/components/schemas/OnlineScoreConfig" + }, + "condition": { + "$ref": "#/components/schemas/ProjectScoreCondition" } } }, @@ -11267,6 +11610,15 @@ "name": "user_id", "in": "path" }, + "AgentIdParam": { + "schema": { + "$ref": "#/components/schemas/AgentIdParam" + }, + "required": true, + "description": "Agent id", + "name": "agent_id", + "in": "path" + }, "ProjectAutomationIdParam": { "schema": { "$ref": "#/components/schemas/ProjectAutomationIdParam" @@ -11463,9 +11815,19 @@ "in": "query", "allowReserved": true }, - "ProjectAutomationName": { + "AgentName": { "schema": { - "$ref": "#/components/schemas/ProjectAutomationName" + "$ref": "#/components/schemas/AgentName" + }, + "required": false, + "description": "Name of the agent to search for", + "name": "agent_name", + "in": "query", + "allowReserved": true + }, + "ProjectAutomationName": { + "schema": { + "$ref": "#/components/schemas/ProjectAutomationName" }, "required": false, "description": "Name of the project_automation to search for", @@ -20634,6 +20996,858 @@ } } }, + "/v1/agent": { + "post": { + "tags": [ + "Agents" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postAgent", + "description": "Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified", + "summary": "Create agent", + "requestBody": { + "description": "Any desired information about the new agent object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgent" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "put": { + "tags": [ + "Agents" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "putAgent", + "description": "Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields", + "summary": "Create or replace agent", + "requestBody": { + "description": "Any desired information about the new agent object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgent" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getAgent", + "tags": [ + "Agents" + ], + "description": "List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first", + "summary": "List agents", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/AgentName" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of agent objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Agent" + }, + "description": "A list of agent objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsAgent", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/agent`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/agent/{agent_id}": { + "get": { + "operationId": "getAgentId", + "tags": [ + "Agents" + ], + "description": "Get a agent object by its id", + "summary": "Get agent", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchAgentId", + "tags": [ + "Agents" + ], + "description": "Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update agent", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchAgent" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteAgentId", + "tags": [ + "Agents" + ], + "description": "Delete a agent object by its id", + "summary": "Delete agent", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsAgentId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/agent/{agent_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, "/v1/project_automation": { "post": { "tags": [