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