diff --git a/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateToolEnvVar.g.cs new file mode 100644 index 0000000..99dbbd4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateToolEnvVar.g.cs @@ -0,0 +1,630 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateToolEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateToolEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateToolEnvVarSecurityRequirement0, + }; + partial void PrepareCreateToolEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + ref string identifier, + global::PromptLayer.CreateToolEnvVarRequest request); + partial void PrepareCreateToolEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string identifier, + global::PromptLayer.CreateToolEnvVarRequest request); + partial void ProcessCreateToolEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateToolEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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 CreateToolEnvVarAsync( + string identifier, + + global::PromptLayer.CreateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateToolEnvVarAsResponseAsync( + identifier: identifier, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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> CreateToolEnvVarAsResponseAsync( + string identifier, + + global::PromptLayer.CreateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateToolEnvVarArguments( + httpClient: HttpClient, + identifier: ref identifier, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateToolEnvVarSecurityRequirements, + operationName: "CreateToolEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tool-registry/{identifier}/env-vars", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateToolEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + identifier: identifier!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateToolEnvVar", + methodName: "CreateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateToolEnvVar", + methodName: "CreateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateToolEnvVar", + methodName: "CreateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessCreateToolEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateToolEnvVar", + methodName: "CreateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateToolEnvVar", + methodName: "CreateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Tool not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.CreateToolEnvVarResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.CreateToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.CreateToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // An environment variable with that key already exists on this tool. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::PromptLayer.CreateToolEnvVarResponse3? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::PromptLayer.CreateToolEnvVarResponse3.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::PromptLayer.CreateToolEnvVarResponse3.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessCreateToolEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateToolEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.CreateToolEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + /// 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 CreateToolEnvVarAsync( + string identifier, + string key, + string? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateToolEnvVarRequest + { + Key = key, + Value = value, + }; + + return await CreateToolEnvVarAsync( + identifier: identifier, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..eda4077 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.CreateWorkspaceEnvVar.g.cs @@ -0,0 +1,575 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateWorkspaceEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateWorkspaceEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateWorkspaceEnvVarSecurityRequirement0, + }; + partial void PrepareCreateWorkspaceEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + global::PromptLayer.CreateWorkspaceEnvVarRequest request); + partial void PrepareCreateWorkspaceEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::PromptLayer.CreateWorkspaceEnvVarRequest request); + partial void ProcessCreateWorkspaceEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateWorkspaceEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Workspace Env Var + /// + /// + /// 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 CreateWorkspaceEnvVarAsync( + + global::PromptLayer.CreateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateWorkspaceEnvVarAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Workspace Env Var + /// + /// + /// 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> CreateWorkspaceEnvVarAsResponseAsync( + + global::PromptLayer.CreateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateWorkspaceEnvVarArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateWorkspaceEnvVarSecurityRequirements, + operationName: "CreateWorkspaceEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: "/api/public/v2/env-vars", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateWorkspaceEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateWorkspaceEnvVar", + methodName: "CreateWorkspaceEnvVarAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateWorkspaceEnvVar", + methodName: "CreateWorkspaceEnvVarAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateWorkspaceEnvVar", + methodName: "CreateWorkspaceEnvVarAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessCreateWorkspaceEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateWorkspaceEnvVar", + methodName: "CreateWorkspaceEnvVarAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateWorkspaceEnvVar", + methodName: "CreateWorkspaceEnvVarAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // An environment variable with that key already exists in this workspace. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::PromptLayer.CreateWorkspaceEnvVarResponse2? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::PromptLayer.CreateWorkspaceEnvVarResponse2.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::PromptLayer.CreateWorkspaceEnvVarResponse2.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessCreateWorkspaceEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateWorkspaceEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.CreateWorkspaceEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Workspace Env Var + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + /// 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 CreateWorkspaceEnvVarAsync( + string key, + string? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateWorkspaceEnvVarRequest + { + Key = key, + Value = value, + }; + + return await CreateWorkspaceEnvVarAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteToolEnvVar.g.cs new file mode 100644 index 0000000..9ed97a4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteToolEnvVar.g.cs @@ -0,0 +1,548 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_DeleteToolEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_DeleteToolEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_DeleteToolEnvVarSecurityRequirement0, + }; + partial void PrepareDeleteToolEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + ref string identifier, + ref int varId); + partial void PrepareDeleteToolEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string identifier, + int varId); + partial void ProcessDeleteToolEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteToolEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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 DeleteToolEnvVarAsync( + string identifier, + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteToolEnvVarAsResponseAsync( + identifier: identifier, + varId: varId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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> DeleteToolEnvVarAsResponseAsync( + string identifier, + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteToolEnvVarArguments( + httpClient: HttpClient, + identifier: ref identifier, + varId: ref varId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteToolEnvVarSecurityRequirements, + operationName: "DeleteToolEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteToolEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + identifier: identifier!, + varId: varId!); + + 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::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteToolEnvVar", + methodName: "DeleteToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteToolEnvVar", + methodName: "DeleteToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteToolEnvVar", + methodName: "DeleteToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessDeleteToolEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteToolEnvVar", + methodName: "DeleteToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteToolEnvVar", + methodName: "DeleteToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Tool or env var not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.DeleteToolEnvVarResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.DeleteToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.DeleteToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessDeleteToolEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.DeleteToolEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.DeleteToolEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..aab3c8c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.DeleteWorkspaceEnvVar.g.cs @@ -0,0 +1,535 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_DeleteWorkspaceEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_DeleteWorkspaceEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_DeleteWorkspaceEnvVarSecurityRequirement0, + }; + partial void PrepareDeleteWorkspaceEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + ref int varId); + partial void PrepareDeleteWorkspaceEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int varId); + partial void ProcessDeleteWorkspaceEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteWorkspaceEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Workspace Env Var + /// + /// + /// 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 DeleteWorkspaceEnvVarAsync( + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteWorkspaceEnvVarAsResponseAsync( + varId: varId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Workspace Env Var + /// + /// + /// 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> DeleteWorkspaceEnvVarAsResponseAsync( + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteWorkspaceEnvVarArguments( + httpClient: HttpClient, + varId: ref varId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteWorkspaceEnvVarSecurityRequirements, + operationName: "DeleteWorkspaceEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/env-vars/{varId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteWorkspaceEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + varId: varId!); + + 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::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceEnvVar", + methodName: "DeleteWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceEnvVar", + methodName: "DeleteWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceEnvVar", + methodName: "DeleteWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessDeleteWorkspaceEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceEnvVar", + methodName: "DeleteWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceEnvVar", + methodName: "DeleteWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Workspace env var not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.DeleteWorkspaceEnvVarResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.DeleteWorkspaceEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.DeleteWorkspaceEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessDeleteWorkspaceEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.DeleteWorkspaceEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.DeleteWorkspaceEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListToolEnvVars.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListToolEnvVars.g.cs new file mode 100644 index 0000000..417496b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListToolEnvVars.g.cs @@ -0,0 +1,539 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListToolEnvVarsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListToolEnvVarsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListToolEnvVarsSecurityRequirement0, + }; + partial void PrepareListToolEnvVarsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string identifier); + partial void PrepareListToolEnvVarsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string identifier); + partial void ProcessListToolEnvVarsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListToolEnvVarsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Tool Env Vars + /// + /// + /// Tool ID (numeric) or name + /// + /// 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 ListToolEnvVarsAsync( + string identifier, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListToolEnvVarsAsResponseAsync( + identifier: identifier, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tool Env Vars + /// + /// + /// Tool ID (numeric) or name + /// + /// 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> ListToolEnvVarsAsResponseAsync( + string identifier, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListToolEnvVarsArguments( + httpClient: HttpClient, + identifier: ref identifier); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListToolEnvVarsSecurityRequirements, + operationName: "ListToolEnvVarsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tool-registry/{identifier}/env-vars", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.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::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListToolEnvVarsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + identifier: identifier!); + + 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::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolEnvVars", + methodName: "ListToolEnvVarsAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolEnvVars", + methodName: "ListToolEnvVarsAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolEnvVars", + methodName: "ListToolEnvVarsAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + 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::PromptLayer.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); + ProcessListToolEnvVarsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolEnvVars", + methodName: "ListToolEnvVarsAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolEnvVars", + methodName: "ListToolEnvVarsAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars\"", + 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); + } + // Tool not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ListToolEnvVarsResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ListToolEnvVarsResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ListToolEnvVarsResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessListToolEnvVarsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListToolEnvVarsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.ListToolEnvVarsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListWorkspaceEnvVars.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListWorkspaceEnvVars.g.cs new file mode 100644 index 0000000..7df68a6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.ListWorkspaceEnvVars.g.cs @@ -0,0 +1,489 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListWorkspaceEnvVarsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListWorkspaceEnvVarsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListWorkspaceEnvVarsSecurityRequirement0, + }; + partial void PrepareListWorkspaceEnvVarsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareListWorkspaceEnvVarsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessListWorkspaceEnvVarsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListWorkspaceEnvVarsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Workspace Env Vars + /// + /// 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 ListWorkspaceEnvVarsAsync( + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListWorkspaceEnvVarsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Workspace Env Vars + /// + /// 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> ListWorkspaceEnvVarsAsResponseAsync( + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListWorkspaceEnvVarsArguments( + httpClient: HttpClient); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListWorkspaceEnvVarsSecurityRequirements, + operationName: "ListWorkspaceEnvVarsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: "/api/public/v2/env-vars", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.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::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListWorkspaceEnvVarsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceEnvVars", + methodName: "ListWorkspaceEnvVarsAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceEnvVars", + methodName: "ListWorkspaceEnvVarsAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceEnvVars", + methodName: "ListWorkspaceEnvVarsAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + 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::PromptLayer.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); + ProcessListWorkspaceEnvVarsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceEnvVars", + methodName: "ListWorkspaceEnvVarsAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + 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::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceEnvVars", + methodName: "ListWorkspaceEnvVarsAsync", + pathTemplate: "\"/api/public/v2/env-vars\"", + 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); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessListWorkspaceEnvVarsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListWorkspaceEnvVarsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.ListWorkspaceEnvVarsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateToolEnvVar.g.cs new file mode 100644 index 0000000..e5821ae --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateToolEnvVar.g.cs @@ -0,0 +1,600 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateToolEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateToolEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateToolEnvVarSecurityRequirement0, + }; + partial void PrepareUpdateToolEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + ref string identifier, + ref int varId, + global::PromptLayer.UpdateToolEnvVarRequest request); + partial void PrepareUpdateToolEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string identifier, + int varId, + global::PromptLayer.UpdateToolEnvVarRequest request); + partial void ProcessUpdateToolEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateToolEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// 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 UpdateToolEnvVarAsync( + string identifier, + int varId, + + global::PromptLayer.UpdateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateToolEnvVarAsResponseAsync( + identifier: identifier, + varId: varId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// 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> UpdateToolEnvVarAsResponseAsync( + string identifier, + int varId, + + global::PromptLayer.UpdateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateToolEnvVarArguments( + httpClient: HttpClient, + identifier: ref identifier, + varId: ref varId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateToolEnvVarSecurityRequirements, + operationName: "UpdateToolEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateToolEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + identifier: identifier!, + varId: varId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateToolEnvVar", + methodName: "UpdateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateToolEnvVar", + methodName: "UpdateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateToolEnvVar", + methodName: "UpdateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessUpdateToolEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateToolEnvVar", + methodName: "UpdateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateToolEnvVar", + methodName: "UpdateToolEnvVarAsync", + pathTemplate: "$\"/api/public/v2/tool-registry/{identifier}/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Tool or env var not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.UpdateToolEnvVarResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.UpdateToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.UpdateToolEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessUpdateToolEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateToolEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.UpdateToolEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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(); + } + } + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// New value for the environment variable. Must be non-empty. + /// + /// 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 UpdateToolEnvVarAsync( + string identifier, + int varId, + string value, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateToolEnvVarRequest + { + Value = value, + }; + + return await UpdateToolEnvVarAsync( + identifier: identifier, + varId: varId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..58be5a8 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.UpdateWorkspaceEnvVar.g.cs @@ -0,0 +1,582 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class EnvVarsClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateWorkspaceEnvVarSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateWorkspaceEnvVarSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateWorkspaceEnvVarSecurityRequirement0, + }; + partial void PrepareUpdateWorkspaceEnvVarArguments( + global::System.Net.Http.HttpClient httpClient, + ref int varId, + global::PromptLayer.UpdateWorkspaceEnvVarRequest request); + partial void PrepareUpdateWorkspaceEnvVarRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int varId, + global::PromptLayer.UpdateWorkspaceEnvVarRequest request); + partial void ProcessUpdateWorkspaceEnvVarResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateWorkspaceEnvVarResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Workspace Env Var + /// + /// + /// + /// 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 UpdateWorkspaceEnvVarAsync( + int varId, + + global::PromptLayer.UpdateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateWorkspaceEnvVarAsResponseAsync( + varId: varId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Workspace Env Var + /// + /// + /// + /// 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> UpdateWorkspaceEnvVarAsResponseAsync( + int varId, + + global::PromptLayer.UpdateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateWorkspaceEnvVarArguments( + httpClient: HttpClient, + varId: ref varId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateWorkspaceEnvVarSecurityRequirements, + operationName: "UpdateWorkspaceEnvVarAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/env-vars/{varId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateWorkspaceEnvVarRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + varId: varId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateWorkspaceEnvVar", + methodName: "UpdateWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateWorkspaceEnvVar", + methodName: "UpdateWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateWorkspaceEnvVar", + methodName: "UpdateWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.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); + ProcessUpdateWorkspaceEnvVarResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateWorkspaceEnvVar", + methodName: "UpdateWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateWorkspaceEnvVar", + methodName: "UpdateWorkspaceEnvVarAsync", + pathTemplate: "$\"/api/public/v2/env-vars/{varId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Workspace env var not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.UpdateWorkspaceEnvVarResponse2? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.UpdateWorkspaceEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.UpdateWorkspaceEnvVarResponse2.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.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)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessUpdateWorkspaceEnvVarResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateWorkspaceEnvVarResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.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::PromptLayer.UpdateWorkspaceEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.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::PromptLayer.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(); + } + } + /// + /// Update Workspace Env Var + /// + /// + /// + /// New value for the environment variable. Must be non-empty. + /// + /// 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 UpdateWorkspaceEnvVarAsync( + int varId, + string value, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateWorkspaceEnvVarRequest + { + Value = value, + }; + + return await UpdateWorkspaceEnvVarAsync( + varId: varId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.g.cs new file mode 100644 index 0000000..95d24bf --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.EnvVarsClient.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class EnvVarsClient : global::PromptLayer.IEnvVarsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.promptlayer.com/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::PromptLayer.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::PromptLayer.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the EnvVarsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public EnvVarsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the EnvVarsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public EnvVarsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::PromptLayer.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the EnvVarsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public EnvVarsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::PromptLayer.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::PromptLayer.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateToolEnvVar.g.cs new file mode 100644 index 0000000..83d4cd8 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateToolEnvVar.g.cs @@ -0,0 +1,61 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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 CreateToolEnvVarAsync( + string identifier, + + global::PromptLayer.CreateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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> CreateToolEnvVarAsResponseAsync( + string identifier, + + global::PromptLayer.CreateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + /// 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 CreateToolEnvVarAsync( + string identifier, + string key, + string? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..1a50bec --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.CreateWorkspaceEnvVar.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Create Workspace Env Var + /// + /// + /// 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 CreateWorkspaceEnvVarAsync( + + global::PromptLayer.CreateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Workspace Env Var + /// + /// + /// 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> CreateWorkspaceEnvVarAsResponseAsync( + + global::PromptLayer.CreateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Workspace Env Var + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + /// 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 CreateWorkspaceEnvVarAsync( + string key, + string? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteToolEnvVar.g.cs new file mode 100644 index 0000000..02b2f7d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteToolEnvVar.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Delete Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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 DeleteToolEnvVarAsync( + string identifier, + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// 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> DeleteToolEnvVarAsResponseAsync( + string identifier, + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..2455cf2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.DeleteWorkspaceEnvVar.g.cs @@ -0,0 +1,30 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Delete Workspace Env Var + /// + /// + /// 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 DeleteWorkspaceEnvVarAsync( + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Workspace Env Var + /// + /// + /// 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> DeleteWorkspaceEnvVarAsResponseAsync( + int varId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListToolEnvVars.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListToolEnvVars.g.cs new file mode 100644 index 0000000..d1b5e6e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListToolEnvVars.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// List Tool Env Vars + /// + /// + /// Tool ID (numeric) or name + /// + /// 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 ListToolEnvVarsAsync( + string identifier, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tool Env Vars + /// + /// + /// Tool ID (numeric) or name + /// + /// 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> ListToolEnvVarsAsResponseAsync( + string identifier, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListWorkspaceEnvVars.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListWorkspaceEnvVars.g.cs new file mode 100644 index 0000000..94aca20 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.ListWorkspaceEnvVars.g.cs @@ -0,0 +1,26 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// List Workspace Env Vars + /// + /// 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 ListWorkspaceEnvVarsAsync( + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Workspace Env Vars + /// + /// 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> ListWorkspaceEnvVarsAsResponseAsync( + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateToolEnvVar.g.cs new file mode 100644 index 0000000..0fbc046 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateToolEnvVar.g.cs @@ -0,0 +1,63 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// 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 UpdateToolEnvVarAsync( + string identifier, + int varId, + + global::PromptLayer.UpdateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// 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> UpdateToolEnvVarAsResponseAsync( + string identifier, + int varId, + + global::PromptLayer.UpdateToolEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Tool Env Var + /// + /// + /// Tool ID (numeric) or name + /// + /// + /// + /// New value for the environment variable. Must be non-empty. + /// + /// 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 UpdateToolEnvVarAsync( + string identifier, + int varId, + string value, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..52a231b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.UpdateWorkspaceEnvVar.g.cs @@ -0,0 +1,51 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface IEnvVarsClient + { + /// + /// Update Workspace Env Var + /// + /// + /// + /// 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 UpdateWorkspaceEnvVarAsync( + int varId, + + global::PromptLayer.UpdateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Workspace Env Var + /// + /// + /// + /// 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> UpdateWorkspaceEnvVarAsResponseAsync( + int varId, + + global::PromptLayer.UpdateWorkspaceEnvVarRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Workspace Env Var + /// + /// + /// + /// New value for the environment variable. Must be non-empty. + /// + /// 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 UpdateWorkspaceEnvVarAsync( + int varId, + string value, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.g.cs new file mode 100644 index 0000000..b22ad65 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.IEnvVarsClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IEnvVarsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::PromptLayer.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs index 27c3cba..cd0d9b6 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs @@ -49,6 +49,11 @@ public partial interface IPromptLayerClient : global::System.IDisposable /// public DatasetsClient Datasets { get; } + /// + /// + /// + public EnvVarsClient EnvVars { get; } + /// /// /// diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs index d924381..10aabb8 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs @@ -755,6 +755,22 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_a2e389e01f671d8d")] @@ -1224,6 +1240,10 @@ namespace PromptLayer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TestExecuteToolRequestExecution))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TestExecuteToolRequestExecutionType), TypeInfoPropertyName = "TestExecuteToolRequestExecutionType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TestExecuteToolRequestExecutionLanguage), TypeInfoPropertyName = "TestExecuteToolRequestExecutionLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateWorkspaceEnvVarRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateWorkspaceEnvVarRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolEnvVarRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateToolEnvVarRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListDatasetsStatus), TypeInfoPropertyName = "ListDatasetsStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListDatasetsSortBy), TypeInfoPropertyName = "ListDatasetsSortBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListDatasetsSortOrder), TypeInfoPropertyName = "ListDatasetsSortOrder2")] @@ -1253,10 +1273,6 @@ namespace PromptLayer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolRegistriesSortOrder), TypeInfoPropertyName = "ListToolRegistriesSortOrder2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTablesOrder), TypeInfoPropertyName = "ListTablesOrder2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetsOrder), TypeInfoPropertyName = "ListTableSheetsOrder2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetRowsOrder), TypeInfoPropertyName = "ListTableSheetRowsOrder2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf), TypeInfoPropertyName = "OneOfHTTPValidationErrorErrorResponse2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreatePromptLabelResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse))] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -2010,6 +2026,22 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_a2e389e01f671d8d")] @@ -2017,6 +2049,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>?), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_47a8c666c2b64908")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf?), TypeInfoPropertyName = "GetReportScoreResponseScoreDetailsVariant4_819979ee8daaec57")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_13c51ceff6c2844e")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetRowsOrder), TypeInfoPropertyName = "ListTableSheetRowsOrder2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf), TypeInfoPropertyName = "OneOfHTTPValidationErrorErrorResponse2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreatePromptLabelResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackGroupResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackScoreResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteReportsByNameResponse))] @@ -2113,6 +2149,30 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CloseTraceResponseClosure))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CloseTraceResponseClosureStatus), TypeInfoPropertyName = "CloseTraceResponseClosureStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CloseTraceResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListWorkspaceEnvVarsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolEnvVarsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolEnvVarsResponseToolEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolEnvVarsResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolEnvVarResponseToolEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolEnvVarResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolEnvVarResponse3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateToolEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateToolEnvVarResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteToolEnvVarResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteToolEnvVarResponse2))] [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))] @@ -2197,6 +2257,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -2610,6 +2672,14 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.UnixTimestampJsonConverter()); return options; diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs index 5b5729a..986b1ea 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs @@ -1872,519 +1872,631 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::PromptLayer.ListDatasetsStatus? Type461 { get; set; } + public global::PromptLayer.CreateWorkspaceEnvVarRequest? Type461 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsSortBy? Type462 { get; set; } + public global::PromptLayer.UpdateWorkspaceEnvVarRequest? Type462 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsSortOrder? Type463 { get; set; } + public global::PromptLayer.CreateToolEnvVarRequest? Type463 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsStatus? Type464 { get; set; } + public global::PromptLayer.UpdateToolEnvVarRequest? Type464 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsSortBy? Type465 { get; set; } + public global::PromptLayer.ListDatasetsStatus? Type465 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsSortOrder? Type466 { get; set; } + public global::PromptLayer.ListDatasetsSortBy? Type466 { get; set; } /// /// /// - public global::PromptLayer.AnyOf>? Type467 { get; set; } + public global::PromptLayer.ListDatasetsSortOrder? Type467 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetStatus? Type468 { get; set; } + public global::PromptLayer.ListEvaluationsStatus? Type468 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetSortBy? Type469 { get; set; } + public global::PromptLayer.ListEvaluationsSortBy? Type469 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetSortOrder? Type470 { get; set; } + public global::PromptLayer.ListEvaluationsSortOrder? Type470 { get; set; } /// /// /// - public long? Type471 { get; set; } + public global::PromptLayer.AnyOf>? Type471 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsSortBy? Type472 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetStatus? Type472 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsSortOrder? Type473 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetSortBy? Type473 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterType2? Type474 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetSortOrder? Type474 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type475 { get; set; } + public long? Type475 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem? Type476 { get; set; } + public global::PromptLayer.ListWorkflowsSortBy? Type476 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortBy? Type477 { get; set; } + public global::PromptLayer.ListWorkflowsSortOrder? Type477 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortOrder? Type478 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterType2? Type478 { get; set; } /// /// /// - public global::PromptLayer.OneOf>? Type479 { get; set; } + public global::System.Collections.Generic.IList? Type479 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesContentType? Type480 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem? Type480 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesContentEncoding? Type481 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortBy? Type481 { get; set; } /// /// /// - public global::PromptLayer.ListSkillCollectionsPublicSortBy? Type482 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortOrder? Type482 { get; set; } /// /// /// - public global::PromptLayer.ListSkillCollectionsPublicSortOrder? Type483 { get; set; } + public global::PromptLayer.OneOf>? Type483 { get; set; } /// /// /// - public global::PromptLayer.GetSkillCollectionPublicFormat? Type484 { get; set; } + public global::PromptLayer.IngestOtlpTracesContentType? Type484 { get; set; } /// /// /// - public global::PromptLayer.GetRequestSearchSuggestionsField? Type485 { get; set; } + public global::PromptLayer.IngestOtlpTracesContentEncoding? Type485 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesSortBy? Type486 { get; set; } + public global::PromptLayer.ListSkillCollectionsPublicSortBy? Type486 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesSortOrder? Type487 { get; set; } + public global::PromptLayer.ListSkillCollectionsPublicSortOrder? Type487 { get; set; } /// /// /// - public global::PromptLayer.ListTablesOrder? Type488 { get; set; } + public global::PromptLayer.GetSkillCollectionPublicFormat? Type488 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetsOrder? Type489 { get; set; } + public global::PromptLayer.GetRequestSearchSuggestionsField? Type489 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetRowsOrder? Type490 { get; set; } + public global::PromptLayer.ListToolRegistriesSortBy? Type490 { get; set; } /// /// /// - public global::PromptLayer.OneOf? Type491 { get; set; } + public global::PromptLayer.ListToolRegistriesSortOrder? Type491 { get; set; } /// /// /// - public global::PromptLayer.CreatePromptLabelResponse? Type492 { get; set; } + public global::PromptLayer.ListTablesOrder? Type492 { get; set; } /// /// /// - public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse? Type493 { get; set; } + public global::PromptLayer.ListTableSheetsOrder? Type493 { get; set; } /// /// /// - public global::PromptLayer.TrackGroupResponse? Type494 { get; set; } + public global::PromptLayer.ListTableSheetRowsOrder? Type494 { get; set; } /// /// /// - public global::PromptLayer.TrackScoreResponse? Type495 { get; set; } + public global::PromptLayer.OneOf? Type495 { get; set; } /// /// /// - public global::PromptLayer.DeleteReportsByNameResponse? Type496 { get; set; } + public global::PromptLayer.CreatePromptLabelResponse? Type496 { get; set; } /// /// /// - public global::PromptLayer.CreateEvaluationPipelineResponse2? Type497 { get; set; } + public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse? Type497 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse? Type498 { get; set; } + public global::PromptLayer.TrackGroupResponse? Type498 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse2? Type499 { get; set; } + public global::PromptLayer.TrackScoreResponse? Type499 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse3? Type500 { get; set; } + public global::PromptLayer.DeleteReportsByNameResponse? Type500 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse4? Type501 { get; set; } + public global::PromptLayer.CreateEvaluationPipelineResponse2? Type501 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse? Type502 { get; set; } + public global::PromptLayer.AddReportColumnResponse? Type502 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse2? Type503 { get; set; } + public global::PromptLayer.AddReportColumnResponse2? Type503 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse3? Type504 { get; set; } + public global::PromptLayer.AddReportColumnResponse3? Type504 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse4? Type505 { get; set; } + public global::PromptLayer.AddReportColumnResponse4? Type505 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse5? Type506 { get; set; } + public global::PromptLayer.RunReportResponse? Type506 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponse? Type507 { get; set; } + public global::PromptLayer.RunReportResponse2? Type507 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseReport? Type508 { get; set; } + public global::PromptLayer.RunReportResponse3? Type508 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStatus? Type509 { get; set; } + public global::PromptLayer.RunReportResponse4? Type509 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStats? Type510 { get; set; } + public global::PromptLayer.RunReportResponse5? Type510 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStatsStatusCounts? Type511 { get; set; } + public global::PromptLayer.GetReportResponse? Type511 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type512 { get; set; } + public global::PromptLayer.GetReportResponseReport? Type512 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseReportColumn? Type513 { get; set; } + public global::PromptLayer.GetReportResponseStatus? Type513 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponse? Type514 { get; set; } + public global::PromptLayer.GetReportResponseStats? Type514 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScore? Type515 { get; set; } + public global::PromptLayer.GetReportResponseStatsStatusCounts? Type515 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreScoreType? Type516 { get; set; } + public global::System.Collections.Generic.IList? Type516 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1? Type517 { get; set; } + public global::PromptLayer.GetReportResponseReportColumn? Type517 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2? Type518 { get; set; } + public global::PromptLayer.GetReportScoreResponse? Type518 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type519 { get; set; } + public global::PromptLayer.GetReportScoreResponseScore? Type519 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column? Type520 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreScoreType? Type520 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3? Type521 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1? Type521 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4? Type522 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2? Type522 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsResponse? Type523 { get; set; } + public global::System.Collections.Generic.IList? Type523 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type524 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column? Type524 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsResponse? Type525 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3? Type525 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type526 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4? Type526 { get; set; } /// /// /// - public global::PromptLayer.AnyOf? Type527 { get; set; } + public global::PromptLayer.ListDatasetsResponse? Type527 { get; set; } /// /// /// - public global::PromptLayer.OneOf, object>? Type528 { get; set; } + public global::System.Collections.Generic.IList? Type528 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type529 { get; set; } + public global::PromptLayer.ListEvaluationsResponse? Type529 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12? Type530 { get; set; } + public global::System.Collections.Generic.IList? Type530 { get; set; } /// /// /// - public global::PromptLayer.OneOf, object>? Type531 { get; set; } + public global::PromptLayer.AnyOf? Type531 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type532 { get; set; } + public global::PromptLayer.OneOf, object>? Type532 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant14? Type533 { get; set; } + public global::System.Collections.Generic.Dictionary? Type533 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse? Type534 { get; set; } + public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12? Type534 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type535 { get; set; } + public global::PromptLayer.OneOf, object>? Type535 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponseItem? Type536 { get; set; } + public global::System.Collections.Generic.Dictionary? Type536 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse2? Type537 { get; set; } + public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant14? Type537 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse3? Type538 { get; set; } + public global::PromptLayer.ListWorkflowsResponse? Type538 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponse? Type539 { get; set; } + public global::System.Collections.Generic.IList? Type539 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type540 { get; set; } + public global::PromptLayer.ListWorkflowsResponseItem? Type540 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponseNode? Type541 { get; set; } + public global::PromptLayer.ListWorkflowsResponse2? Type541 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type542 { get; set; } + public global::PromptLayer.ListWorkflowsResponse3? Type542 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponseEdge? Type543 { get; set; } + public global::PromptLayer.GetWorkflowResponse? Type543 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowLabelsResponse? Type544 { get; set; } + public global::System.Collections.Generic.IList? Type544 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type545 { get; set; } + public global::PromptLayer.GetWorkflowResponseNode? Type545 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowLabelsResponseReleaseLabel? Type546 { get; set; } + public global::System.Collections.Generic.IList? Type546 { get; set; } /// /// /// - public global::PromptLayer.AnyOf? Type547 { get; set; } + public global::PromptLayer.GetWorkflowResponseEdge? Type547 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesResponse2? Type548 { get; set; } + public global::PromptLayer.GetWorkflowLabelsResponse? Type548 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesResponse? Type549 { get; set; } + public global::System.Collections.Generic.IList? Type549 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type550 { get; set; } + public global::PromptLayer.GetWorkflowLabelsResponseReleaseLabel? Type550 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesResponseToolRegistrie? Type551 { get; set; } + public global::PromptLayer.AnyOf? Type551 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryResponse? Type552 { get; set; } + public global::PromptLayer.IngestOtlpTracesResponse2? Type552 { get; set; } /// /// /// - public global::PromptLayer.GetToolRegistryResponse? Type553 { get; set; } + public global::PromptLayer.ListToolRegistriesResponse? Type553 { get; set; } /// /// /// - public global::PromptLayer.GetToolRegistryResponseToolRegistry? Type554 { get; set; } + public global::System.Collections.Generic.IList? Type554 { get; set; } /// /// /// - public global::PromptLayer.CreateTableResponse? Type555 { get; set; } + public global::PromptLayer.ListToolRegistriesResponseToolRegistrie? Type555 { get; set; } /// /// /// - public global::PromptLayer.ListTablesResponse? Type556 { get; set; } + public global::PromptLayer.CreateToolRegistryResponse? Type556 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type557 { get; set; } + public global::PromptLayer.GetToolRegistryResponse? Type557 { get; set; } /// /// /// - public global::PromptLayer.GetTableResponse? Type558 { get; set; } + public global::PromptLayer.GetToolRegistryResponseToolRegistry? Type558 { get; set; } /// /// /// - public global::PromptLayer.UpdateTableResponse? Type559 { get; set; } + public global::PromptLayer.CreateTableResponse? Type559 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetsResponse? Type560 { get; set; } + public global::PromptLayer.ListTablesResponse? Type560 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type561 { get; set; } + public global::System.Collections.Generic.IList? Type561 { get; set; } /// /// /// - public global::PromptLayer.CreateTableSheetResponse? Type562 { get; set; } + public global::PromptLayer.GetTableResponse? Type562 { get; set; } /// /// /// - public global::PromptLayer.GetTableSheetOperationResponse? Type563 { get; set; } + public global::PromptLayer.UpdateTableResponse? Type563 { get; set; } /// /// /// - public global::PromptLayer.GetTableSheetResponse? Type564 { get; set; } + public global::PromptLayer.ListTableSheetsResponse? Type564 { get; set; } /// /// /// - public global::PromptLayer.UpdateTableSheetResponse? Type565 { get; set; } + public global::System.Collections.Generic.IList? Type565 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetColumnsResponse? Type566 { get; set; } + public global::PromptLayer.CreateTableSheetResponse? Type566 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type567 { get; set; } + public global::PromptLayer.GetTableSheetOperationResponse? Type567 { get; set; } /// /// /// - public global::PromptLayer.CreateTableSheetColumnResponse? Type568 { get; set; } + public global::PromptLayer.GetTableSheetResponse? Type568 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type569 { get; set; } + public global::PromptLayer.UpdateTableSheetResponse? Type569 { get; set; } /// /// /// - public global::PromptLayer.UpdateTableSheetColumnResponse? Type570 { get; set; } + public global::PromptLayer.ListTableSheetColumnsResponse? Type570 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetRowsResponse? Type571 { get; set; } + public global::System.Collections.Generic.IList? Type571 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type572 { get; set; } + public global::PromptLayer.CreateTableSheetColumnResponse? Type572 { get; set; } /// /// /// - public global::PromptLayer.ListTableSheetRowsResponseDataItem? Type573 { get; set; } + public global::System.Collections.Generic.IList? Type573 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type574 { get; set; } + public global::PromptLayer.UpdateTableSheetColumnResponse? Type574 { get; set; } /// /// /// - public global::PromptLayer.AddTableSheetRowsResponse? Type575 { get; set; } + public global::PromptLayer.ListTableSheetRowsResponse? Type575 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type576 { get; set; } + public global::System.Collections.Generic.IList? Type576 { get; set; } /// /// /// - public global::PromptLayer.AddTableSheetRowsResponseRow? Type577 { get; set; } + public global::PromptLayer.ListTableSheetRowsResponseDataItem? Type577 { get; set; } /// /// /// - public global::PromptLayer.GetTableSheetCellResponse? Type578 { get; set; } + public global::System.Collections.Generic.Dictionary? Type578 { get; set; } /// /// /// - public global::PromptLayer.UpdateTableSheetCellResponse? Type579 { get; set; } + public global::PromptLayer.AddTableSheetRowsResponse? Type579 { get; set; } /// /// /// - public global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse? Type580 { get; set; } + public global::System.Collections.Generic.IList? Type580 { get; set; } /// /// /// - public global::PromptLayer.CreateTableSheetCellRecalculationResponse? Type581 { get; set; } + public global::PromptLayer.AddTableSheetRowsResponseRow? Type581 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionResponse? Type582 { get; set; } + public global::PromptLayer.GetTableSheetCellResponse? Type582 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponse? Type583 { get; set; } + public global::PromptLayer.UpdateTableSheetCellResponse? Type583 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponseResult? Type584 { get; set; } + public global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse? Type584 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponseResultStatus? Type585 { get; set; } + public global::PromptLayer.CreateTableSheetCellRecalculationResponse? Type585 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponse? Type586 { get; set; } + public global::PromptLayer.CreateToolVersionResponse? Type586 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponseClosure? Type587 { get; set; } + public global::PromptLayer.TestExecuteToolResponse? Type587 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponseClosureStatus? Type588 { get; set; } + public global::PromptLayer.TestExecuteToolResponseResult? Type588 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponse2? Type589 { get; set; } + public global::PromptLayer.TestExecuteToolResponseResultStatus? Type589 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponse? Type590 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponseClosure? Type591 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponseClosureStatus? Type592 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponse2? Type593 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkspaceEnvVarsResponse? Type594 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type595 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar? Type596 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateWorkspaceEnvVarResponse? Type597 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar? Type598 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateWorkspaceEnvVarResponse2? Type599 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateWorkspaceEnvVarResponse? Type600 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar? Type601 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateWorkspaceEnvVarResponse2? Type602 { get; set; } + /// + /// + /// + public global::PromptLayer.DeleteWorkspaceEnvVarResponse? Type603 { get; set; } + /// + /// + /// + public global::PromptLayer.DeleteWorkspaceEnvVarResponse2? Type604 { get; set; } + /// + /// + /// + public global::PromptLayer.ListToolEnvVarsResponse? Type605 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type606 { get; set; } + /// + /// + /// + public global::PromptLayer.ListToolEnvVarsResponseToolEnvVar? Type607 { get; set; } + /// + /// + /// + public global::PromptLayer.ListToolEnvVarsResponse2? Type608 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolEnvVarResponse? Type609 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolEnvVarResponseToolEnvVar? Type610 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolEnvVarResponse2? Type611 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolEnvVarResponse3? Type612 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateToolEnvVarResponse? Type613 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar? Type614 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateToolEnvVarResponse2? Type615 { get; set; } + /// + /// + /// + public global::PromptLayer.DeleteToolEnvVarResponse? Type616 { get; set; } + /// + /// + /// + public global::PromptLayer.DeleteToolEnvVarResponse2? Type617 { get; set; } /// /// @@ -2722,5 +2834,13 @@ public sealed partial class JsonSerializerContextTypes /// /// public global::System.Collections.Generic.List? ListType83 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType84 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType85 { get; set; } } } \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.Json.g.cs new file mode 100644 index 0000000..44503ff --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateToolEnvVarRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateToolEnvVarRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateToolEnvVarRequest), + jsonSerializerContext) as global::PromptLayer.CreateToolEnvVarRequest; + } + + /// + /// 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::PromptLayer.CreateToolEnvVarRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateToolEnvVarRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateToolEnvVarRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.g.cs new file mode 100644 index 0000000..f4c2fdf --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarRequest.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateToolEnvVarRequest + { + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { get; set; } + + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + public string? Value { 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. + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateToolEnvVarRequest( + string key, + string? value) + { + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateToolEnvVarRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..8b34b34 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateToolEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateToolEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.CreateToolEnvVarResponse; + } + + /// + /// 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::PromptLayer.CreateToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateToolEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateToolEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.g.cs new file mode 100644 index 0000000..60b4645 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateToolEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_env_var")] + public global::PromptLayer.CreateToolEnvVarResponseToolEnvVar? ToolEnvVar { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateToolEnvVarResponse( + bool? success, + global::PromptLayer.CreateToolEnvVarResponseToolEnvVar? toolEnvVar) + { + this.Success = success; + this.ToolEnvVar = toolEnvVar; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateToolEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..511a1d7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateToolEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateToolEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.CreateToolEnvVarResponse2; + } + + /// + /// 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::PromptLayer.CreateToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateToolEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateToolEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.g.cs new file mode 100644 index 0000000..0d86c23 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateToolEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateToolEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateToolEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.Json.g.cs new file mode 100644 index 0000000..c9242ce --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateToolEnvVarResponse3 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateToolEnvVarResponse3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateToolEnvVarResponse3), + jsonSerializerContext) as global::PromptLayer.CreateToolEnvVarResponse3; + } + + /// + /// 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::PromptLayer.CreateToolEnvVarResponse3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateToolEnvVarResponse3), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateToolEnvVarResponse3; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.g.cs new file mode 100644 index 0000000..fc3fa42 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponse3.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateToolEnvVarResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateToolEnvVarResponse3( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateToolEnvVarResponse3() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.Json.g.cs new file mode 100644 index 0000000..ab29b45 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateToolEnvVarResponseToolEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateToolEnvVarResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateToolEnvVarResponseToolEnvVar), + jsonSerializerContext) as global::PromptLayer.CreateToolEnvVarResponseToolEnvVar; + } + + /// + /// 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::PromptLayer.CreateToolEnvVarResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateToolEnvVarResponseToolEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateToolEnvVarResponseToolEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.g.cs new file mode 100644 index 0000000..5d85690 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateToolEnvVarResponseToolEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateToolEnvVarResponseToolEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateToolEnvVarResponseToolEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateToolEnvVarResponseToolEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.Json.g.cs new file mode 100644 index 0000000..bbafecb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateWorkspaceEnvVarRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateWorkspaceEnvVarRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateWorkspaceEnvVarRequest), + jsonSerializerContext) as global::PromptLayer.CreateWorkspaceEnvVarRequest; + } + + /// + /// 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::PromptLayer.CreateWorkspaceEnvVarRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateWorkspaceEnvVarRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateWorkspaceEnvVarRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.g.cs new file mode 100644 index 0000000..96ae5a0 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarRequest.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateWorkspaceEnvVarRequest + { + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { get; set; } + + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + public string? Value { 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. + /// + /// + /// Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores. + /// + /// + /// Value to store. May be empty to create a placeholder that the user will fill in later. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateWorkspaceEnvVarRequest( + string key, + string? value) + { + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateWorkspaceEnvVarRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..d4e7c86 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateWorkspaceEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.CreateWorkspaceEnvVarResponse; + } + + /// + /// 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::PromptLayer.CreateWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateWorkspaceEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.g.cs new file mode 100644 index 0000000..ef9ef0b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateWorkspaceEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_env_var")] + public global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar? WorkspaceEnvVar { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateWorkspaceEnvVarResponse( + bool? success, + global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar? workspaceEnvVar) + { + this.Success = success; + this.WorkspaceEnvVar = workspaceEnvVar; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateWorkspaceEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..0417348 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateWorkspaceEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.CreateWorkspaceEnvVarResponse2; + } + + /// + /// 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::PromptLayer.CreateWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateWorkspaceEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.g.cs new file mode 100644 index 0000000..bce802c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateWorkspaceEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateWorkspaceEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateWorkspaceEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs new file mode 100644 index 0000000..c94240d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateWorkspaceEnvVarResponseWorkspaceEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar), + jsonSerializerContext) as global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar; + } + + /// + /// 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::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateWorkspaceEnvVarResponseWorkspaceEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..dc067dd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateWorkspaceEnvVarResponseWorkspaceEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateWorkspaceEnvVarResponseWorkspaceEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateWorkspaceEnvVarResponseWorkspaceEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..4d30146 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class DeleteToolEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.DeleteToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.DeleteToolEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.DeleteToolEnvVarResponse; + } + + /// + /// 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::PromptLayer.DeleteToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.DeleteToolEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.DeleteToolEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.g.cs new file mode 100644 index 0000000..0cab7a4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class DeleteToolEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeleteToolEnvVarResponse( + bool? success) + { + this.Success = success; + } + + /// + /// Initializes a new instance of the class. + /// + public DeleteToolEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..b583325 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class DeleteToolEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.DeleteToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.DeleteToolEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.DeleteToolEnvVarResponse2; + } + + /// + /// 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::PromptLayer.DeleteToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.DeleteToolEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.DeleteToolEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.g.cs new file mode 100644 index 0000000..3375f63 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteToolEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class DeleteToolEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeleteToolEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public DeleteToolEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..f69f211 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class DeleteWorkspaceEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.DeleteWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.DeleteWorkspaceEnvVarResponse; + } + + /// + /// 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::PromptLayer.DeleteWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.DeleteWorkspaceEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.g.cs new file mode 100644 index 0000000..e281178 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class DeleteWorkspaceEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeleteWorkspaceEnvVarResponse( + bool? success) + { + this.Success = success; + } + + /// + /// Initializes a new instance of the class. + /// + public DeleteWorkspaceEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..f5a4a2b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class DeleteWorkspaceEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.DeleteWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.DeleteWorkspaceEnvVarResponse2; + } + + /// + /// 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::PromptLayer.DeleteWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.DeleteWorkspaceEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.DeleteWorkspaceEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.g.cs new file mode 100644 index 0000000..aa2328a --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.DeleteWorkspaceEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class DeleteWorkspaceEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeleteWorkspaceEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public DeleteWorkspaceEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.Json.g.cs new file mode 100644 index 0000000..974e636 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListToolEnvVarsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListToolEnvVarsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListToolEnvVarsResponse), + jsonSerializerContext) as global::PromptLayer.ListToolEnvVarsResponse; + } + + /// + /// 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::PromptLayer.ListToolEnvVarsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListToolEnvVarsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListToolEnvVarsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.g.cs new file mode 100644 index 0000000..62e70bc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListToolEnvVarsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_env_vars")] + public global::System.Collections.Generic.IList? ToolEnvVars { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListToolEnvVarsResponse( + bool? success, + global::System.Collections.Generic.IList? toolEnvVars) + { + this.Success = success; + this.ToolEnvVars = toolEnvVars; + } + + /// + /// Initializes a new instance of the class. + /// + public ListToolEnvVarsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.Json.g.cs new file mode 100644 index 0000000..4ccf7db --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListToolEnvVarsResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListToolEnvVarsResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListToolEnvVarsResponse2), + jsonSerializerContext) as global::PromptLayer.ListToolEnvVarsResponse2; + } + + /// + /// 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::PromptLayer.ListToolEnvVarsResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListToolEnvVarsResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListToolEnvVarsResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.g.cs new file mode 100644 index 0000000..ca1fdc3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListToolEnvVarsResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListToolEnvVarsResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public ListToolEnvVarsResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.Json.g.cs new file mode 100644 index 0000000..e70f25e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListToolEnvVarsResponseToolEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListToolEnvVarsResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListToolEnvVarsResponseToolEnvVar), + jsonSerializerContext) as global::PromptLayer.ListToolEnvVarsResponseToolEnvVar; + } + + /// + /// 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::PromptLayer.ListToolEnvVarsResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListToolEnvVarsResponseToolEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListToolEnvVarsResponseToolEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.g.cs new file mode 100644 index 0000000..f508eeb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListToolEnvVarsResponseToolEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListToolEnvVarsResponseToolEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListToolEnvVarsResponseToolEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public ListToolEnvVarsResponseToolEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.Json.g.cs new file mode 100644 index 0000000..7dcf8b4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListWorkspaceEnvVarsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListWorkspaceEnvVarsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListWorkspaceEnvVarsResponse), + jsonSerializerContext) as global::PromptLayer.ListWorkspaceEnvVarsResponse; + } + + /// + /// 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::PromptLayer.ListWorkspaceEnvVarsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListWorkspaceEnvVarsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListWorkspaceEnvVarsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.g.cs new file mode 100644 index 0000000..b99e331 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListWorkspaceEnvVarsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_env_vars")] + public global::System.Collections.Generic.IList? WorkspaceEnvVars { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListWorkspaceEnvVarsResponse( + bool? success, + global::System.Collections.Generic.IList? workspaceEnvVars) + { + this.Success = success; + this.WorkspaceEnvVars = workspaceEnvVars; + } + + /// + /// Initializes a new instance of the class. + /// + public ListWorkspaceEnvVarsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.Json.g.cs new file mode 100644 index 0000000..45685c1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListWorkspaceEnvVarsResponseWorkspaceEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar), + jsonSerializerContext) as global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar; + } + + /// + /// 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::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListWorkspaceEnvVarsResponseWorkspaceEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..94a6305 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListWorkspaceEnvVarsResponseWorkspaceEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListWorkspaceEnvVarsResponseWorkspaceEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListWorkspaceEnvVarsResponseWorkspaceEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public ListWorkspaceEnvVarsResponseWorkspaceEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.Json.g.cs new file mode 100644 index 0000000..b61ed82 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateToolEnvVarRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateToolEnvVarRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateToolEnvVarRequest), + jsonSerializerContext) as global::PromptLayer.UpdateToolEnvVarRequest; + } + + /// + /// 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::PromptLayer.UpdateToolEnvVarRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateToolEnvVarRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateToolEnvVarRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.g.cs new file mode 100644 index 0000000..e79d5c1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarRequest.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateToolEnvVarRequest + { + /// + /// New value for the environment variable. Must be non-empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Value { 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. + /// + /// + /// New value for the environment variable. Must be non-empty. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateToolEnvVarRequest( + string value) + { + this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateToolEnvVarRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..916eec1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateToolEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateToolEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.UpdateToolEnvVarResponse; + } + + /// + /// 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::PromptLayer.UpdateToolEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateToolEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateToolEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.g.cs new file mode 100644 index 0000000..aac0cf3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateToolEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_env_var")] + public global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar? ToolEnvVar { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateToolEnvVarResponse( + bool? success, + global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar? toolEnvVar) + { + this.Success = success; + this.ToolEnvVar = toolEnvVar; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateToolEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..ca4efce --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateToolEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateToolEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.UpdateToolEnvVarResponse2; + } + + /// + /// 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::PromptLayer.UpdateToolEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateToolEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateToolEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.g.cs new file mode 100644 index 0000000..93d7dd3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateToolEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateToolEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateToolEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.Json.g.cs new file mode 100644 index 0000000..86a733c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateToolEnvVarResponseToolEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar), + jsonSerializerContext) as global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar; + } + + /// + /// 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::PromptLayer.UpdateToolEnvVarResponseToolEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateToolEnvVarResponseToolEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.g.cs new file mode 100644 index 0000000..fb1e4ca --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateToolEnvVarResponseToolEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateToolEnvVarResponseToolEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateToolEnvVarResponseToolEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateToolEnvVarResponseToolEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.Json.g.cs new file mode 100644 index 0000000..aa40389 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateWorkspaceEnvVarRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateWorkspaceEnvVarRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarRequest), + jsonSerializerContext) as global::PromptLayer.UpdateWorkspaceEnvVarRequest; + } + + /// + /// 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::PromptLayer.UpdateWorkspaceEnvVarRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateWorkspaceEnvVarRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.g.cs new file mode 100644 index 0000000..b9b8de0 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarRequest.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateWorkspaceEnvVarRequest + { + /// + /// New value for the environment variable. Must be non-empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Value { 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. + /// + /// + /// New value for the environment variable. Must be non-empty. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateWorkspaceEnvVarRequest( + string value) + { + this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateWorkspaceEnvVarRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.Json.g.cs new file mode 100644 index 0000000..dc93e04 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateWorkspaceEnvVarResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse), + jsonSerializerContext) as global::PromptLayer.UpdateWorkspaceEnvVarResponse; + } + + /// + /// 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::PromptLayer.UpdateWorkspaceEnvVarResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateWorkspaceEnvVarResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.g.cs new file mode 100644 index 0000000..715f66d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateWorkspaceEnvVarResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_env_var")] + public global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar? WorkspaceEnvVar { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateWorkspaceEnvVarResponse( + bool? success, + global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar? workspaceEnvVar) + { + this.Success = success; + this.WorkspaceEnvVar = workspaceEnvVar; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateWorkspaceEnvVarResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.Json.g.cs new file mode 100644 index 0000000..015005d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateWorkspaceEnvVarResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse2), + jsonSerializerContext) as global::PromptLayer.UpdateWorkspaceEnvVarResponse2; + } + + /// + /// 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::PromptLayer.UpdateWorkspaceEnvVarResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateWorkspaceEnvVarResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.g.cs new file mode 100644 index 0000000..f16c099 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponse2.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateWorkspaceEnvVarResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateWorkspaceEnvVarResponse2( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateWorkspaceEnvVarResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs new file mode 100644 index 0000000..4dc6c7c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateWorkspaceEnvVarResponseWorkspaceEnvVar + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar), + jsonSerializerContext) as global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar; + } + + /// + /// 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::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs new file mode 100644 index 0000000..946aba6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateWorkspaceEnvVarResponseWorkspaceEnvVar.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateWorkspaceEnvVarResponseWorkspaceEnvVar + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public int? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value_suffix")] + public string? ValueSuffix { get; set; } + + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_empty")] + public bool? IsEmpty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Present on workspace-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Present on tool-scoped env vars. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_registry_id")] + public int? ToolRegistryId { 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. + /// + /// + /// + /// + /// Last 4 characters of the stored value. Null or empty when the value is empty. + /// + /// + /// True when the value has not been set yet (placeholder created by the AI assistant). + /// + /// + /// + /// + /// Present on workspace-scoped env vars. + /// + /// + /// Present on tool-scoped env vars. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateWorkspaceEnvVarResponseWorkspaceEnvVar( + int? id, + string? key, + string? valueSuffix, + bool? isEmpty, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + int? workspaceId, + int? toolRegistryId) + { + this.Id = id; + this.Key = key; + this.ValueSuffix = valueSuffix; + this.IsEmpty = isEmpty; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.WorkspaceId = workspaceId; + this.ToolRegistryId = toolRegistryId; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateWorkspaceEnvVarResponseWorkspaceEnvVar() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs index 8b29437..f2c1cc2 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs @@ -48,6 +48,15 @@ public sealed partial class PromptLayerClient : global::PromptLayer.IPromptLayer JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public EnvVarsClient EnvVars => new EnvVarsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/PromptLayer/openapi.json b/src/libs/PromptLayer/openapi.json index a4b7ed4..48f399b 100644 --- a/src/libs/PromptLayer/openapi.json +++ b/src/libs/PromptLayer/openapi.json @@ -12059,6 +12059,776 @@ } } } + }, + "/api/public/v2/env-vars": { + "get": { + "tags": [ + "env-vars" + ], + "summary": "List Workspace Env Vars", + "operationId": "list_workspace_env_vars", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "workspace_env_vars": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "post": { + "tags": [ + "env-vars" + ], + "summary": "Create Workspace Env Var", + "operationId": "create_workspace_env_var", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "description": "Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores." + }, + "value": { + "type": "string", + "maxLength": 8192, + "description": "Value to store. May be empty to create a placeholder that the user will fill in later." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "workspace_env_var": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + }, + "409": { + "description": "An environment variable with that key already exists in this workspace.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/env-vars/{var_id}": { + "patch": { + "tags": [ + "env-vars" + ], + "summary": "Update Workspace Env Var", + "operationId": "update_workspace_env_var", + "parameters": [ + { + "name": "var_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "minLength": 1, + "maxLength": 8192, + "description": "New value for the environment variable. Must be non-empty." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "workspace_env_var": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + }, + "404": { + "description": "Workspace env var not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "delete": { + "tags": [ + "env-vars" + ], + "summary": "Delete Workspace Env Var", + "operationId": "delete_workspace_env_var", + "parameters": [ + { + "name": "var_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + }, + "404": { + "description": "Workspace env var not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tool-registry/{identifier}/env-vars": { + "get": { + "tags": [ + "env-vars", + "tool-registry" + ], + "summary": "List Tool Env Vars", + "operationId": "list_tool_env_vars", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "tool_env_vars": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Tool not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "post": { + "tags": [ + "env-vars", + "tool-registry" + ], + "summary": "Create Tool Env Var", + "operationId": "create_tool_env_var", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "description": "Environment variable name. Must start with a letter or underscore and contain only letters, digits, and underscores." + }, + "value": { + "type": "string", + "maxLength": 8192, + "description": "Value to store. May be empty to create a placeholder that the user will fill in later." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "tool_env_var": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + }, + "404": { + "description": "Tool not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "409": { + "description": "An environment variable with that key already exists on this tool.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tool-registry/{identifier}/env-vars/{var_id}": { + "patch": { + "tags": [ + "env-vars", + "tool-registry" + ], + "summary": "Update Tool Env Var", + "operationId": "update_tool_env_var", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + }, + { + "name": "var_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "minLength": 1, + "maxLength": 8192, + "description": "New value for the environment variable. Must be non-empty." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "tool_env_var": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value_suffix": { + "type": "string", + "nullable": true, + "description": "Last 4 characters of the stored value. Null or empty when the value is empty." + }, + "is_empty": { + "type": "boolean", + "description": "True when the value has not been set yet (placeholder created by the AI assistant)." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "workspace_id": { + "type": "integer", + "description": "Present on workspace-scoped env vars." + }, + "tool_registry_id": { + "type": "integer", + "description": "Present on tool-scoped env vars." + } + } + } + } + } + } + } + }, + "404": { + "description": "Tool or env var not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "delete": { + "tags": [ + "env-vars", + "tool-registry" + ], + "summary": "Delete Tool Env Var", + "operationId": "delete_tool_env_var", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + }, + { + "name": "var_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + }, + "404": { + "description": "Tool or env var not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } } }, "components": {