diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentUsage.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentUsage.g.cs
new file mode 100644
index 0000000..cc1a002
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentUsage.g.cs
@@ -0,0 +1,682 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial class CursorAgentsClient
+ {
+
+
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetAgentUsageSecurityRequirement0 =
+ new global::CursorAgents.EndPointSecurityRequirement
+ {
+ Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
+ { new global::CursorAgents.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetAgentUsageSecurityRequirements =
+ new global::CursorAgents.EndPointSecurityRequirement[]
+ { s_GetAgentUsageSecurityRequirement0,
+ };
+ partial void PrepareGetAgentUsageArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id,
+ ref string? runId);
+ partial void PrepareGetAgentUsageRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id,
+ string? runId);
+ partial void ProcessGetAgentUsageResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetAgentUsageResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get agent usage
+ /// Retrieve token usage for an agent, broken down per run.
+ /// `totalUsage` sums input, output, and cache token counts across
+ /// every run on the agent, and `runs` lists the same breakdown for
+ /// each run. Token usage mirrors the `tokenUsage` shape on the team
+ /// usage events endpoint.
+ /// This endpoint is in early access. When it isn't enabled for the
+ /// account it returns `403 feature_unavailable`. An unknown `runId`
+ /// returns `404 run_not_found`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// 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 GetAgentUsageAsync(
+ string id,
+ string? runId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAgentUsageAsResponseAsync(
+ id: id,
+ runId: runId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent usage
+ /// Retrieve token usage for an agent, broken down per run.
+ /// `totalUsage` sums input, output, and cache token counts across
+ /// every run on the agent, and `runs` lists the same breakdown for
+ /// each run. Token usage mirrors the `tokenUsage` shape on the team
+ /// usage events endpoint.
+ /// This endpoint is in early access. When it isn't enabled for the
+ /// account it returns `403 feature_unavailable`. An unknown `runId`
+ /// returns `404 run_not_found`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// 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> GetAgentUsageAsResponseAsync(
+ string id,
+ string? runId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetAgentUsageArguments(
+ httpClient: HttpClient,
+ id: ref id,
+ runId: ref runId);
+
+
+ var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetAgentUsageSecurityRequirements,
+ operationName: "GetAgentUsageAsync");
+
+ using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::CursorAgents.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::CursorAgents.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::CursorAgents.PathBuilder(
+ path: $"/v1/agents/{id}/usage",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("runId", runId)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::CursorAgents.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::CursorAgents.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetAgentUsageRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id!,
+ runId: runId);
+
+ 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::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAgentUsage",
+ methodName: "GetAgentUsageAsync",
+ pathTemplate: "$\"/v1/agents/{id}/usage\"",
+ 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::CursorAgents.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAgentUsage",
+ methodName: "GetAgentUsageAsync",
+ pathTemplate: "$\"/v1/agents/{id}/usage\"",
+ 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::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::CursorAgents.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAgentUsage",
+ methodName: "GetAgentUsageAsync",
+ pathTemplate: "$\"/v1/agents/{id}/usage\"",
+ 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::CursorAgents.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);
+ ProcessGetAgentUsageResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAgentUsage",
+ methodName: "GetAgentUsageAsync",
+ pathTemplate: "$\"/v1/agents/{id}/usage\"",
+ 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::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAgentUsage",
+ methodName: "GetAgentUsageAsync",
+ pathTemplate: "$\"/v1/agents/{id}/usage\"",
+ 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);
+ }
+ // Validation error or malformed request body.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::CursorAgents.Error? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::CursorAgents.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));
+ }
+ // Invalid or missing API key.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::CursorAgents.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::CursorAgents.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));
+ }
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::CursorAgents.Error? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::CursorAgents.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));
+ }
+ // Agent or run not found.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::CursorAgents.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::CursorAgents.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::CursorAgents.Error? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::CursorAgents.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));
+ }
+ // Internal server error.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::CursorAgents.Error? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::CursorAgents.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);
+ ProcessGetAgentUsageResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::CursorAgents.AgentUsageResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::CursorAgents.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::CursorAgents.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::CursorAgents.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::CursorAgents.AgentUsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::CursorAgents.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::CursorAgents.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::CursorAgents.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/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentUsage.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentUsage.g.cs
new file mode 100644
index 0000000..a85c526
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentUsage.g.cs
@@ -0,0 +1,58 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// Get agent usage
+ /// Retrieve token usage for an agent, broken down per run.
+ /// `totalUsage` sums input, output, and cache token counts across
+ /// every run on the agent, and `runs` lists the same breakdown for
+ /// each run. Token usage mirrors the `tokenUsage` shape on the team
+ /// usage events endpoint.
+ /// This endpoint is in early access. When it isn't enabled for the
+ /// account it returns `403 feature_unavailable`. An unknown `runId`
+ /// returns `404 run_not_found`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// 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 GetAgentUsageAsync(
+ string id,
+ string? runId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get agent usage
+ /// Retrieve token usage for an agent, broken down per run.
+ /// `totalUsage` sums input, output, and cache token counts across
+ /// every run on the agent, and `runs` lists the same breakdown for
+ /// each run. Token usage mirrors the `tokenUsage` shape on the team
+ /// usage events endpoint.
+ /// This endpoint is in early access. When it isn't enabled for the
+ /// account it returns `403 feature_unavailable`. An unknown `runId`
+ /// returns `404 run_not_found`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// 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> GetAgentUsageAsResponseAsync(
+ string id,
+ string? runId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
index 7c04278..c0b2413 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
@@ -122,6 +122,10 @@ namespace CursorAgents
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListArtifactsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.DownloadArtifactResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.UsageTokenUsage))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.RunUsage))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentUsageResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ApiKeyInfo))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ModelParameterValueDefinition))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ModelParameterDefinition))]
@@ -152,6 +156,7 @@ namespace CursorAgents
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
index 678ddf2..32b720f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
@@ -276,79 +276,95 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::CursorAgents.ApiKeyInfo? Type62 { get; set; }
+ public global::CursorAgents.UsageTokenUsage? Type62 { get; set; }
///
///
///
- public global::CursorAgents.ModelParameterValueDefinition? Type63 { get; set; }
+ public global::CursorAgents.RunUsage? Type63 { get; set; }
///
///
///
- public global::CursorAgents.ModelParameterDefinition? Type64 { get; set; }
+ public global::CursorAgents.AgentUsageResponse? Type64 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type65 { get; set; }
+ public global::System.Collections.Generic.IList? Type65 { get; set; }
///
///
///
- public global::CursorAgents.ModelVariant? Type66 { get; set; }
+ public global::CursorAgents.ApiKeyInfo? Type66 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type67 { get; set; }
+ public global::CursorAgents.ModelParameterValueDefinition? Type67 { get; set; }
///
///
///
- public global::CursorAgents.ModelVariantParam? Type68 { get; set; }
+ public global::CursorAgents.ModelParameterDefinition? Type68 { get; set; }
///
///
///
- public global::CursorAgents.ModelListItem? Type69 { get; set; }
+ public global::System.Collections.Generic.IList? Type69 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type70 { get; set; }
+ public global::CursorAgents.ModelVariant? Type70 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type71 { get; set; }
+ public global::System.Collections.Generic.IList? Type71 { get; set; }
///
///
///
- public global::CursorAgents.ListModelsResponse? Type72 { get; set; }
+ public global::CursorAgents.ModelVariantParam? Type72 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type73 { get; set; }
+ public global::CursorAgents.ModelListItem? Type73 { get; set; }
///
///
///
- public global::CursorAgents.Repository? Type74 { get; set; }
+ public global::System.Collections.Generic.IList? Type74 { get; set; }
///
///
///
- public global::CursorAgents.ListRepositoriesResponse? Type75 { get; set; }
+ public global::System.Collections.Generic.IList? Type75 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type76 { get; set; }
+ public global::CursorAgents.ListModelsResponse? Type76 { get; set; }
///
///
///
- public global::CursorAgents.CreateSubTokenRequest? Type77 { get; set; }
+ public global::System.Collections.Generic.IList? Type77 { get; set; }
///
///
///
- public global::CursorAgents.CreateSubTokenResponse? Type78 { get; set; }
+ public global::CursorAgents.Repository? Type78 { get; set; }
///
///
///
- public global::CursorAgents.Error? Type79 { get; set; }
+ public global::CursorAgents.ListRepositoriesResponse? Type79 { get; set; }
///
///
///
- public global::CursorAgents.ErrorError1? Type80 { get; set; }
+ public global::System.Collections.Generic.IList? Type80 { get; set; }
+ ///
+ ///
+ ///
+ public global::CursorAgents.CreateSubTokenRequest? Type81 { get; set; }
+ ///
+ ///
+ ///
+ public global::CursorAgents.CreateSubTokenResponse? Type82 { get; set; }
+ ///
+ ///
+ ///
+ public global::CursorAgents.Error? Type83 { get; set; }
+ ///
+ ///
+ ///
+ public global::CursorAgents.ErrorError1? Type84 { get; set; }
///
///
@@ -397,26 +413,30 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::System.Collections.Generic.List? ListType11 { get; set; }
+ public global::System.Collections.Generic.List? ListType11 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType12 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType12 { get; set; }
+ public global::System.Collections.Generic.List? ListType13 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType13 { get; set; }
+ public global::System.Collections.Generic.List? ListType14 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType14 { get; set; }
+ public global::System.Collections.Generic.List? ListType15 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType15 { get; set; }
+ public global::System.Collections.Generic.List? ListType16 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType16 { get; set; }
+ public global::System.Collections.Generic.List? ListType17 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
index 8f27632..3dca4ee 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Agent?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Agent? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Agent?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs
index ca02634..ed31fa4 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.AgentEnv;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentEnv? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentEnv;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs
index a059e08..6c79157 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.AgentSummary;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentSummary? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentSummary;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.Json.g.cs
new file mode 100644
index 0000000..590d329
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public sealed partial class AgentUsageResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentUsageResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::CursorAgents.AgentUsageResponse),
+ jsonSerializerContext) as global::CursorAgents.AgentUsageResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentUsageResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::CursorAgents.AgentUsageResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::CursorAgents.AgentUsageResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentUsageResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.g.cs
new file mode 100644
index 0000000..be4828b
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentUsageResponse.g.cs
@@ -0,0 +1,59 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public sealed partial class AgentUsageResponse
+ {
+ ///
+ /// Token usage summed across the returned runs.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("totalUsage")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::CursorAgents.UsageTokenUsage TotalUsage { get; set; }
+
+ ///
+ /// Per-run usage, one entry per run (or a single entry when `runId` is set).
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("runs")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Runs { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Token usage summed across the returned runs.
+ ///
+ ///
+ /// Per-run usage, one entry per run (or a single entry when `runId` is set).
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public AgentUsageResponse(
+ global::CursorAgents.UsageTokenUsage totalUsage,
+ global::System.Collections.Generic.IList runs)
+ {
+ this.TotalUsage = totalUsage ?? throw new global::System.ArgumentNullException(nameof(totalUsage));
+ this.Runs = runs ?? throw new global::System.ArgumentNullException(nameof(runs));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AgentUsageResponse()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
index 030b19d..8c739ba 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.AgentVariant2;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentVariant2? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentVariant2;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
index 23c4f02..2218da6 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ApiKeyInfo;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ApiKeyInfo? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ApiKeyInfo;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.Json.g.cs
index 5f4cb69..1002cbb 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Artifact;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Artifact? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Artifact;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.Json.g.cs
index b98859a..6f95cb5 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateAgentRequest;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateAgentRequest? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequest;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestEnvVars.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestEnvVars.Json.g.cs
index 5b36b8e..7ace6b7 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestEnvVars.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestEnvVars.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateAgentRequestEnvVars;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateAgentRequestEnvVars? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequestEnvVars;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.Json.g.cs
index b8dc0c2..089b55b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateAgentRequestPrompt;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateAgentRequestPrompt? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequestPrompt;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.Json.g.cs
index fabb8cb..59490b8 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateAgentResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateAgentResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
index 9419575..fc76225 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateRunRequest;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateRunRequest? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunRequest;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
index db1726b..a9dbf5e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateRunRequestPrompt;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateRunRequestPrompt? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunRequestPrompt;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
index b809696..ddf8380 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateRunResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateRunResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequest.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequest.Json.g.cs
index d0ed914..1c0a0e8 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequest.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequest.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateSubTokenRequest;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateSubTokenRequest? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateSubTokenRequest;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant1.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant1.Json.g.cs
index edd45e8..504be37 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant1.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant1.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateSubTokenRequestVariant1;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateSubTokenRequestVariant1? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateSubTokenRequestVariant1;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant2.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant2.Json.g.cs
index 97aff20..5159194 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant2.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenRequestVariant2.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateSubTokenRequestVariant2;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateSubTokenRequestVariant2? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateSubTokenRequestVariant2;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenResponse.Json.g.cs
index de00f3e..a77e36e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateSubTokenResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CreateSubTokenResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CreateSubTokenResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateSubTokenResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CustomSubagent.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CustomSubagent.Json.g.cs
index 6f76fc6..da89ba4 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CustomSubagent.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CustomSubagent.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.CustomSubagent;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.CustomSubagent? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CustomSubagent;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.DownloadArtifactResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.DownloadArtifactResponse.Json.g.cs
index cd534f8..e66ef48 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.DownloadArtifactResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.DownloadArtifactResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.DownloadArtifactResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.DownloadArtifactResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.DownloadArtifactResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Error.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Error.Json.g.cs
index ca58258..fd53680 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Error.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Error.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Error;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Error? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Error;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ErrorError1.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ErrorError1.Json.g.cs
index b6e17b8..be84205 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ErrorError1.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ErrorError1.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ErrorError1;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ErrorError1? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ErrorError1;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.IdResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.IdResponse.Json.g.cs
index e43fa4d..f2be9f8 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.IdResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.IdResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.IdResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.IdResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.IdResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Image.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Image.Json.g.cs
index 8664aea..d1c6e14 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Image.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Image.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Image;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Image? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Image;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageDimension.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageDimension.Json.g.cs
index 36598d8..37b1479 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageDimension.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageDimension.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ImageDimension;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ImageDimension? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ImageDimension;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant1.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant1.Json.g.cs
index deee100..4d758e0 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant1.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant1.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ImageVariant1;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ImageVariant1? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ImageVariant1;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant2.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant2.Json.g.cs
index 3c5b1ab..e30003e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant2.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ImageVariant2.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ImageVariant2;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ImageVariant2? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ImageVariant2;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValue.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValue.Json.g.cs
index fb1ebd3..dce500e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValue.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValue.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.JsonValue?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.JsonValue? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.JsonValue?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant4.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant4.Json.g.cs
index 92cd0cc..912db4d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant4.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant4.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.JsonValueVariant4;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.JsonValueVariant4? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.JsonValueVariant4;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant5Item.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant5Item.Json.g.cs
index 4b0c8b7..fd66e2b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant5Item.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.JsonValueVariant5Item.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.JsonValueVariant5Item;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.JsonValueVariant5Item? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.JsonValueVariant5Item;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListAgentsResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListAgentsResponse.Json.g.cs
index 85f116a..cd973a9 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListAgentsResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListAgentsResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ListAgentsResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ListAgentsResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ListAgentsResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListArtifactsResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListArtifactsResponse.Json.g.cs
index 165a14e..6e92b0f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListArtifactsResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListArtifactsResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ListArtifactsResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ListArtifactsResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ListArtifactsResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListModelsResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListModelsResponse.Json.g.cs
index 1e015ab..1590a5f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListModelsResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListModelsResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ListModelsResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ListModelsResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ListModelsResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRepositoriesResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRepositoriesResponse.Json.g.cs
index 7c13e43..f3b6e23 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRepositoriesResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRepositoriesResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ListRepositoriesResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ListRepositoriesResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ListRepositoriesResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRunsResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRunsResponse.Json.g.cs
index cc8bd34..442df55 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRunsResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ListRunsResponse.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ListRunsResponse;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ListRunsResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ListRunsResponse;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.McpAuth.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.McpAuth.Json.g.cs
index 334c9ec..1f04344 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.McpAuth.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.McpAuth.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.McpAuth;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.McpAuth? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.McpAuth;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.McpServer.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.McpServer.Json.g.cs
index 73c1420..5428cb6 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.McpServer.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.McpServer.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.McpServer?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.McpServer? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.McpServer?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelListItem.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelListItem.Json.g.cs
index 68b6e2f..40be048 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelListItem.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelListItem.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelListItem;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelListItem? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelListItem;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterDefinition.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterDefinition.Json.g.cs
index 3ab8eb0..1807d34 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterDefinition.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterDefinition.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelParameterDefinition;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelParameterDefinition? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelParameterDefinition;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterValueDefinition.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterValueDefinition.Json.g.cs
index a8d63a7..7fc08ae 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterValueDefinition.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelParameterValueDefinition.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelParameterValueDefinition;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelParameterValueDefinition? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelParameterValueDefinition;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRef.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRef.Json.g.cs
index bc99e29..70b69aa 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRef.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRef.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelRef;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelRef? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelRef;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRefParam.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRefParam.Json.g.cs
index 8e279e9..28393b7 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRefParam.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelRefParam.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelRefParam;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelRefParam? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelRefParam;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariant.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariant.Json.g.cs
index c51090c..49920d8 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariant.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariant.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelVariant;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelVariant? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelVariant;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariantParam.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariantParam.Json.g.cs
index 818faa5..5ae9b85 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariantParam.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ModelVariantParam.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.ModelVariantParam;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.ModelVariantParam? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ModelVariantParam;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServer.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServer.Json.g.cs
index 55aa014..2bcbc7e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServer.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServer.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RemoteMcpServer;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RemoteMcpServer? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RemoteMcpServer;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServerHeaders.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServerHeaders.Json.g.cs
index b9ecebf..a01075f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServerHeaders.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RemoteMcpServerHeaders.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RemoteMcpServerHeaders;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RemoteMcpServerHeaders? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RemoteMcpServerHeaders;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RepoConfig.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RepoConfig.Json.g.cs
index e91ad2f..b798186 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RepoConfig.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RepoConfig.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RepoConfig;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RepoConfig? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RepoConfig;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Repository.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Repository.Json.g.cs
index 6574458..2f21c2c 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Repository.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Repository.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Repository;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Repository? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Repository;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Run.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Run.Json.g.cs
index 253f284..05b4634 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Run.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Run.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.Run;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.Run? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Run;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGit.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGit.Json.g.cs
index 3412545..527bf5b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGit.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGit.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RunGit;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunGit? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunGit;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGitBranch.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGitBranch.Json.g.cs
index 807e4d2..324c700 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGitBranch.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunGitBranch.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RunGitBranch;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunGitBranch? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunGitBranch;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallData.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallData.Json.g.cs
index 0ad5934..54cd4da 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallData.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallData.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RunStreamToolCallData;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunStreamToolCallData? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunStreamToolCallData;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallEvent.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallEvent.Json.g.cs
index b5a0ce3..0029c52 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallEvent.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallEvent.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RunStreamToolCallEvent;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunStreamToolCallEvent? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunStreamToolCallEvent;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallTruncation.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallTruncation.Json.g.cs
index 3c239d7..221a37e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallTruncation.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunStreamToolCallTruncation.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.RunStreamToolCallTruncation;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunStreamToolCallTruncation? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunStreamToolCallTruncation;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.Json.g.cs
new file mode 100644
index 0000000..7ec40c7
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public sealed partial class RunUsage
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunUsage? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::CursorAgents.RunUsage),
+ jsonSerializerContext) as global::CursorAgents.RunUsage;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.RunUsage? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::CursorAgents.RunUsage? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::CursorAgents.RunUsage),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.RunUsage;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.g.cs
new file mode 100644
index 0000000..788ee7d
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.RunUsage.g.cs
@@ -0,0 +1,76 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public sealed partial class RunUsage
+ {
+ ///
+ /// Run identifier.
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// run-00000000-0000-0000-0000-000000000001
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Id { get; set; }
+
+ ///
+ /// Internal usage identifier for the run. Omitted when the run has no recorded usage yet.
+ /// Example: 00000000-0000-0000-0000-000000000001
+ ///
+ /// 00000000-0000-0000-0000-000000000001
+ [global::System.Text.Json.Serialization.JsonPropertyName("usageUuid")]
+ public string? UsageUuid { get; set; }
+
+ ///
+ /// Token usage for this run. Runs without recorded usage report zeros across all fields.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("usage")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::CursorAgents.UsageTokenUsage Usage { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Run identifier.
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Token usage for this run. Runs without recorded usage report zeros across all fields.
+ ///
+ ///
+ /// Internal usage identifier for the run. Omitted when the run has no recorded usage yet.
+ /// Example: 00000000-0000-0000-0000-000000000001
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public RunUsage(
+ string id,
+ global::CursorAgents.UsageTokenUsage usage,
+ string? usageUuid)
+ {
+ this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
+ this.UsageUuid = usageUuid;
+ this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RunUsage()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServer.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServer.Json.g.cs
index 548289c..30dad50 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServer.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServer.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.StdioMcpServer;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.StdioMcpServer? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.StdioMcpServer;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServerEnv.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServerEnv.Json.g.cs
index 0caa268..e086e7e 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServerEnv.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.StdioMcpServerEnv.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.StdioMcpServerEnv;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.StdioMcpServerEnv? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.StdioMcpServerEnv;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.Json.g.cs
new file mode 100644
index 0000000..34667b7
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public sealed partial class UsageTokenUsage
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::CursorAgents.UsageTokenUsage? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::CursorAgents.UsageTokenUsage),
+ jsonSerializerContext) as global::CursorAgents.UsageTokenUsage;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.UsageTokenUsage? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::CursorAgents.UsageTokenUsage? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::CursorAgents.UsageTokenUsage),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.UsageTokenUsage;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.g.cs
new file mode 100644
index 0000000..dd1b309
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.UsageTokenUsage.g.cs
@@ -0,0 +1,110 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public sealed partial class UsageTokenUsage
+ {
+ ///
+ /// Input tokens consumed.
+ /// Example: 6320
+ ///
+ /// 6320
+ [global::System.Text.Json.Serialization.JsonPropertyName("inputTokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int InputTokens { get; set; }
+
+ ///
+ /// Output tokens generated.
+ /// Example: 1450
+ ///
+ /// 1450
+ [global::System.Text.Json.Serialization.JsonPropertyName("outputTokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int OutputTokens { get; set; }
+
+ ///
+ /// Tokens written to cache.
+ /// Example: 7100
+ ///
+ /// 7100
+ [global::System.Text.Json.Serialization.JsonPropertyName("cacheWriteTokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int CacheWriteTokens { get; set; }
+
+ ///
+ /// Tokens read from cache.
+ /// Example: 21300
+ ///
+ /// 21300
+ [global::System.Text.Json.Serialization.JsonPropertyName("cacheReadTokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int CacheReadTokens { get; set; }
+
+ ///
+ /// Sum of the four token counts above.
+ /// Example: 36170
+ ///
+ /// 36170
+ [global::System.Text.Json.Serialization.JsonPropertyName("totalTokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalTokens { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Input tokens consumed.
+ /// Example: 6320
+ ///
+ ///
+ /// Output tokens generated.
+ /// Example: 1450
+ ///
+ ///
+ /// Tokens written to cache.
+ /// Example: 7100
+ ///
+ ///
+ /// Tokens read from cache.
+ /// Example: 21300
+ ///
+ ///
+ /// Sum of the four token counts above.
+ /// Example: 36170
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public UsageTokenUsage(
+ int inputTokens,
+ int outputTokens,
+ int cacheWriteTokens,
+ int cacheReadTokens,
+ int totalTokens)
+ {
+ this.InputTokens = inputTokens;
+ this.OutputTokens = outputTokens;
+ this.CacheWriteTokens = cacheWriteTokens;
+ this.CacheReadTokens = cacheReadTokens;
+ this.TotalTokens = totalTokens;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UsageTokenUsage()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.OneOf.3.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.OneOf.3.Json.g.cs
index df10056..c31dc0a 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.OneOf.3.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.OneOf.3.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::CursorAgents.OneOf?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::CursorAgents.OneOf? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.OneOf?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::CursorAgents.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/CursorAgents/openapi.yaml b/src/libs/CursorAgents/openapi.yaml
index 5bbb9eb..3f8c237 100644
--- a/src/libs/CursorAgents/openapi.yaml
+++ b/src/libs/CursorAgents/openapi.yaml
@@ -763,6 +763,78 @@ components:
format: date-time
description: When the presigned URL expires.
+ UsageTokenUsage:
+ type: object
+ required:
+ - inputTokens
+ - outputTokens
+ - cacheWriteTokens
+ - cacheReadTokens
+ - totalTokens
+ properties:
+ inputTokens:
+ type: integer
+ minimum: 0
+ description: Input tokens consumed.
+ example: 6320
+ outputTokens:
+ type: integer
+ minimum: 0
+ description: Output tokens generated.
+ example: 1450
+ cacheWriteTokens:
+ type: integer
+ minimum: 0
+ description: Tokens written to cache.
+ example: 7100
+ cacheReadTokens:
+ type: integer
+ minimum: 0
+ description: Tokens read from cache.
+ example: 21300
+ totalTokens:
+ type: integer
+ minimum: 0
+ description: Sum of the four token counts above.
+ example: 36170
+
+ RunUsage:
+ type: object
+ required:
+ - id
+ - usage
+ properties:
+ id:
+ type: string
+ minLength: 1
+ description: Run identifier.
+ example: 'run-00000000-0000-0000-0000-000000000001'
+ usageUuid:
+ type: string
+ minLength: 1
+ description: Internal usage identifier for the run. Omitted when the run has no recorded usage yet.
+ example: '00000000-0000-0000-0000-000000000001'
+ usage:
+ allOf:
+ - $ref: '#/components/schemas/UsageTokenUsage'
+ description: Token usage for this run. Runs without recorded usage report zeros across all fields.
+
+ AgentUsageResponse:
+ type: object
+ required:
+ - totalUsage
+ - runs
+ properties:
+ totalUsage:
+ allOf:
+ - $ref: '#/components/schemas/UsageTokenUsage'
+ description: Token usage summed across the returned runs.
+ runs:
+ type: array
+ description: Per-run usage, one entry per run (or a single entry when `runId` is set).
+ items:
+ $ref: '#/components/schemas/RunUsage'
+
ApiKeyInfo:
type: object
required:
@@ -1442,6 +1514,49 @@ paths:
'500':
$ref: '#/components/responses/InternalError'
+ /v1/agents/{id}/usage:
+ get:
+ summary: Get agent usage
+ description: |
+ Retrieve token usage for an agent, broken down per run.
+ `totalUsage` sums input, output, and cache token counts across
+ every run on the agent, and `runs` lists the same breakdown for
+ each run. Token usage mirrors the `tokenUsage` shape on the team
+ usage events endpoint.
+
+ This endpoint is in early access. When it isn't enabled for the
+ account it returns `403 feature_unavailable`. An unknown `runId`
+ returns `404 run_not_found`.
+ operationId: getAgentUsage
+ parameters:
+ - $ref: '#/components/parameters/AgentId'
+ - name: runId
+ in: query
+ required: false
+ description: Scope usage to a single run. Omit to return usage for every run on the agent.
+ schema:
+ type: string
+ example: 'run-00000000-0000-0000-0000-000000000001'
+ responses:
+ '200':
+ description: Usage retrieved successfully.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AgentUsageResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '429':
+ $ref: '#/components/responses/RateLimited'
+ '500':
+ $ref: '#/components/responses/InternalError'
+
/v1/agents/{id}/archive:
post:
summary: Archive an agent