diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CallConnectorTool.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CallConnectorTool.g.cs new file mode 100644 index 0000000..b385ad4 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CallConnectorTool.g.cs @@ -0,0 +1,536 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_CallConnectorToolSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_CallConnectorToolSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_CallConnectorToolSecurityRequirement0, + }; + partial void PrepareCallConnectorToolArguments( + global::System.Net.Http.HttpClient httpClient, + ref string toolName, + ref string? credentialsName, + ref string connectorIdOrName, + global::Mistral.MCPToolCallRequest request); + partial void PrepareCallConnectorToolRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string toolName, + string? credentialsName, + string connectorIdOrName, + global::Mistral.MCPToolCallRequest request); + partial void ProcessCallConnectorToolResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallConnectorToolResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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 CallConnectorToolAsync( + string toolName, + string connectorIdOrName, + + global::Mistral.MCPToolCallRequest request, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallConnectorToolAsResponseAsync( + toolName: toolName, + connectorIdOrName: connectorIdOrName, + + request: request, + credentialsName: credentialsName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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> CallConnectorToolAsResponseAsync( + string toolName, + string connectorIdOrName, + + global::Mistral.MCPToolCallRequest request, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCallConnectorToolArguments( + httpClient: HttpClient, + toolName: ref toolName, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallConnectorToolSecurityRequirements, + operationName: "CallConnectorToolAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("credentials_name", credentialsName) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallConnectorToolRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + toolName: toolName!, + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName!, + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallConnectorTool", + methodName: "CallConnectorToolAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallConnectorTool", + methodName: "CallConnectorToolAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallConnectorTool", + methodName: "CallConnectorToolAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call\"", + 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::Mistral.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); + ProcessCallConnectorToolResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallConnectorTool", + methodName: "CallConnectorToolAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallConnectorTool", + methodName: "CallConnectorToolAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools/{toolName}/call\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessCallConnectorToolResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MCPToolCallResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MCPToolCallResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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(); + } + } + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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 CallConnectorToolAsync( + string toolName, + string connectorIdOrName, + string? credentialsName = default, + object? arguments = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.MCPToolCallRequest + { + Arguments = arguments, + }; + + return await CallConnectorToolAsync( + toolName: toolName, + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateANewConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateANewConnector.g.cs new file mode 100644 index 0000000..349a817 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateANewConnector.g.cs @@ -0,0 +1,535 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_CreateANewConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_CreateANewConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_CreateANewConnectorSecurityRequirement0, + }; + partial void PrepareCreateANewConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + global::Mistral.ConnectorMCPCreate request); + partial void PrepareCreateANewConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Mistral.ConnectorMCPCreate request); + partial void ProcessCreateANewConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateANewConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// 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 CreateANewConnectorAsync( + + global::Mistral.ConnectorMCPCreate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateANewConnectorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// 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> CreateANewConnectorAsResponseAsync( + + global::Mistral.ConnectorMCPCreate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateANewConnectorArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateANewConnectorSecurityRequirements, + operationName: "CreateANewConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: "/v1/connectors", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateANewConnectorRequest( + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateANewConnector", + methodName: "CreateANewConnectorAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateANewConnector", + methodName: "CreateANewConnectorAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateANewConnector", + methodName: "CreateANewConnectorAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.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); + ProcessCreateANewConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateANewConnector", + methodName: "CreateANewConnectorAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateANewConnector", + methodName: "CreateANewConnectorAsync", + pathTemplate: "\"/v1/connectors\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessCreateANewConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.Connector.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.Connector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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 a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. + /// + /// + /// The description of the connector. + /// + /// + /// The optional url of the icon you want to associate to the connector. + /// + /// + /// Visibility of the connector. Use 'shared_workspace' for workspace scoped connectors, or 'private' for private connectors.
+ /// Default Value: shared_org + /// + /// + /// The url of the MCP server. + /// + /// + /// Optional organization-level headers to be sent with the request to the mcp server. + /// + /// + /// Optional additional authentication data for the connector. + /// + /// + /// Optional system prompt for the connector. + /// + /// 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 CreateANewConnectorAsync( + string name, + string description, + string server, + string? iconUrl = default, + global::Mistral.ResourceVisibility? visibility = default, + object? headers = default, + global::Mistral.AuthData? authData = default, + string? systemPrompt = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.ConnectorMCPCreate + { + Name = name, + Description = description, + IconUrl = iconUrl, + Visibility = visibility, + Server = server, + Headers = headers, + AuthData = authData, + SystemPrompt = systemPrompt, + }; + + return await CreateANewConnectorAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..d8335ef --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,521 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_CreateOrUpdateOrganizationCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_CreateOrUpdateOrganizationCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_CreateOrUpdateOrganizationCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareCreateOrUpdateOrganizationCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void PrepareCreateOrUpdateOrganizationCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void ProcessCreateOrUpdateOrganizationCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateOrUpdateOrganizationCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateOrUpdateOrganizationCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateOrganizationCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateOrUpdateOrganizationCredentialsForAConnectorArguments( + httpClient: HttpClient, + connectorIdOrName: ref connectorIdOrName, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateOrUpdateOrganizationCredentialsForAConnectorSecurityRequirements, + operationName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/organization/credentials", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateOrUpdateOrganizationCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorIdOrName: connectorIdOrName!, + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateOrganizationCredentialsForAConnector", + methodName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateOrganizationCredentialsForAConnector", + methodName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateOrganizationCredentialsForAConnector", + methodName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.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); + ProcessCreateOrUpdateOrganizationCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateOrganizationCredentialsForAConnector", + methodName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateOrganizationCredentialsForAConnector", + methodName: "CreateOrUpdateOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessCreateOrUpdateOrganizationCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.CredentialsCreateOrUpdate + { + Name = name, + IsDefault = isDefault, + Credentials = credentials, + }; + + return await CreateOrUpdateOrganizationCredentialsForAConnectorAsync( + connectorIdOrName: connectorIdOrName, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..9ee93e6 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs @@ -0,0 +1,521 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_CreateOrUpdateUserCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_CreateOrUpdateUserCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_CreateOrUpdateUserCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareCreateOrUpdateUserCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void PrepareCreateOrUpdateUserCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void ProcessCreateOrUpdateUserCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateOrUpdateUserCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateUserCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateOrUpdateUserCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateUserCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateOrUpdateUserCredentialsForAConnectorArguments( + httpClient: HttpClient, + connectorIdOrName: ref connectorIdOrName, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateOrUpdateUserCredentialsForAConnectorSecurityRequirements, + operationName: "CreateOrUpdateUserCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/user/credentials", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateOrUpdateUserCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorIdOrName: connectorIdOrName!, + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateUserCredentialsForAConnector", + methodName: "CreateOrUpdateUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateUserCredentialsForAConnector", + methodName: "CreateOrUpdateUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateUserCredentialsForAConnector", + methodName: "CreateOrUpdateUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.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); + ProcessCreateOrUpdateUserCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateUserCredentialsForAConnector", + methodName: "CreateOrUpdateUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateUserCredentialsForAConnector", + methodName: "CreateOrUpdateUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessCreateOrUpdateUserCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateUserCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.CredentialsCreateOrUpdate + { + Name = name, + IsDefault = isDefault, + Credentials = credentials, + }; + + return await CreateOrUpdateUserCredentialsForAConnectorAsync( + connectorIdOrName: connectorIdOrName, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..38a1293 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,521 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_CreateOrUpdateWorkspaceCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_CreateOrUpdateWorkspaceCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_CreateOrUpdateWorkspaceCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareCreateOrUpdateWorkspaceCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void PrepareCreateOrUpdateWorkspaceCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string connectorIdOrName, + global::Mistral.CredentialsCreateOrUpdate request); + partial void ProcessCreateOrUpdateWorkspaceCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateOrUpdateWorkspaceCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateOrUpdateWorkspaceCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateWorkspaceCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateOrUpdateWorkspaceCredentialsForAConnectorArguments( + httpClient: HttpClient, + connectorIdOrName: ref connectorIdOrName, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateOrUpdateWorkspaceCredentialsForAConnectorSecurityRequirements, + operationName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/workspace/credentials", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateOrUpdateWorkspaceCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorIdOrName: connectorIdOrName!, + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateWorkspaceCredentialsForAConnector", + methodName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateWorkspaceCredentialsForAConnector", + methodName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateWorkspaceCredentialsForAConnector", + methodName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.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); + ProcessCreateOrUpdateWorkspaceCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateWorkspaceCredentialsForAConnector", + methodName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateOrUpdateWorkspaceCredentialsForAConnector", + methodName: "CreateOrUpdateWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessCreateOrUpdateWorkspaceCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.CredentialsCreateOrUpdate + { + Name = name, + IsDefault = isDefault, + Credentials = credentials, + }; + + return await CreateOrUpdateWorkspaceCredentialsForAConnectorAsync( + connectorIdOrName: connectorIdOrName, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteAConnector.g.cs new file mode 100644 index 0000000..83eb745 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteAConnector.g.cs @@ -0,0 +1,463 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_DeleteAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_DeleteAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_DeleteAConnectorSecurityRequirement0, + }; + partial void PrepareDeleteAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid connectorId); + partial void PrepareDeleteAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid connectorId); + partial void ProcessDeleteAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a connector.
+ /// Delete a connector by its ID. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteAConnectorAsync( + global::System.Guid connectorId, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAConnectorAsResponseAsync( + connectorId: connectorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete a connector.
+ /// Delete a connector by its ID. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> DeleteAConnectorAsResponseAsync( + global::System.Guid connectorId, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteAConnectorArguments( + httpClient: HttpClient, + connectorId: ref connectorId); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteAConnectorSecurityRequirements, + operationName: "DeleteAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorId}#id", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorId: connectorId!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAConnector", + methodName: "DeleteAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAConnector", + methodName: "DeleteAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAConnector", + methodName: "DeleteAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.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); + ProcessDeleteAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAConnector", + methodName: "DeleteAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteAConnector", + methodName: "DeleteAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessDeleteAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..b85f3d2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,472 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_DeleteOrganizationCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_DeleteOrganizationCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_DeleteOrganizationCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareDeleteOrganizationCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialsName, + ref string connectorIdOrName); + partial void PrepareDeleteOrganizationCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialsName, + string connectorIdOrName); + partial void ProcessDeleteOrganizationCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteOrganizationCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete organization credentials for a connector.
+ /// Delete credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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 DeleteOrganizationCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteOrganizationCredentialsForAConnectorAsResponseAsync( + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete organization credentials for a connector.
+ /// Delete credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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> DeleteOrganizationCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteOrganizationCredentialsForAConnectorArguments( + httpClient: HttpClient, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteOrganizationCredentialsForAConnectorSecurityRequirements, + operationName: "DeleteOrganizationCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteOrganizationCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialsName: credentialsName!, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteOrganizationCredentialsForAConnector", + methodName: "DeleteOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteOrganizationCredentialsForAConnector", + methodName: "DeleteOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteOrganizationCredentialsForAConnector", + methodName: "DeleteOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}\"", + 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::Mistral.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); + ProcessDeleteOrganizationCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteOrganizationCredentialsForAConnector", + methodName: "DeleteOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteOrganizationCredentialsForAConnector", + methodName: "DeleteOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials/{credentialsName}\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessDeleteOrganizationCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..db2af88 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs @@ -0,0 +1,472 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_DeleteUserCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_DeleteUserCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_DeleteUserCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareDeleteUserCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialsName, + ref string connectorIdOrName); + partial void PrepareDeleteUserCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialsName, + string connectorIdOrName); + partial void ProcessDeleteUserCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteUserCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete user credentials for a connector.
+ /// Delete credentials at the user level for a given connector. + ///
+ /// + /// + /// 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 DeleteUserCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteUserCredentialsForAConnectorAsResponseAsync( + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete user credentials for a connector.
+ /// Delete credentials at the user level for a given connector. + ///
+ /// + /// + /// 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> DeleteUserCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteUserCredentialsForAConnectorArguments( + httpClient: HttpClient, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteUserCredentialsForAConnectorSecurityRequirements, + operationName: "DeleteUserCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteUserCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialsName: credentialsName!, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteUserCredentialsForAConnector", + methodName: "DeleteUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteUserCredentialsForAConnector", + methodName: "DeleteUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteUserCredentialsForAConnector", + methodName: "DeleteUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}\"", + 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::Mistral.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); + ProcessDeleteUserCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteUserCredentialsForAConnector", + methodName: "DeleteUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteUserCredentialsForAConnector", + methodName: "DeleteUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials/{credentialsName}\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessDeleteUserCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..0fdfa3e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,472 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_DeleteWorkspaceCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_DeleteWorkspaceCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_DeleteWorkspaceCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareDeleteWorkspaceCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialsName, + ref string connectorIdOrName); + partial void PrepareDeleteWorkspaceCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialsName, + string connectorIdOrName); + partial void ProcessDeleteWorkspaceCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteWorkspaceCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete workspace credentials for a connector.
+ /// Delete credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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 DeleteWorkspaceCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteWorkspaceCredentialsForAConnectorAsResponseAsync( + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete workspace credentials for a connector.
+ /// Delete credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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> DeleteWorkspaceCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteWorkspaceCredentialsForAConnectorArguments( + httpClient: HttpClient, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteWorkspaceCredentialsForAConnectorSecurityRequirements, + operationName: "DeleteWorkspaceCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteWorkspaceCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialsName: credentialsName!, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceCredentialsForAConnector", + methodName: "DeleteWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceCredentialsForAConnector", + methodName: "DeleteWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceCredentialsForAConnector", + methodName: "DeleteWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}\"", + 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::Mistral.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); + ProcessDeleteWorkspaceCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceCredentialsForAConnector", + methodName: "DeleteWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DeleteWorkspaceCredentialsForAConnector", + methodName: "DeleteWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials/{credentialsName}\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessDeleteWorkspaceCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.MessageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.MessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.GetAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetAConnector.g.cs new file mode 100644 index 0000000..e4ac29f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetAConnector.g.cs @@ -0,0 +1,497 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_GetAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_GetAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_GetAConnectorSecurityRequirement0, + }; + partial void PrepareGetAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref bool? fetchCustomerData, + ref bool? fetchConnectionSecrets, + ref string connectorIdOrName); + partial void PrepareGetAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + bool? fetchCustomerData, + bool? fetchConnectionSecrets, + string connectorIdOrName); + partial void ProcessGetAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a connector.
+ /// Get a connector by its ID or name. + ///
+ /// + /// Fetch the customer data associated with the connector (e.g. customer secrets / config).
+ /// Default Value: false + /// + /// + /// Fetch the general connection secrets associated with the connector.
+ /// Default Value: false + /// + /// + /// 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 GetAConnectorAsync( + string connectorIdOrName, + bool? fetchCustomerData = default, + bool? fetchConnectionSecrets = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + fetchCustomerData: fetchCustomerData, + fetchConnectionSecrets: fetchConnectionSecrets, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get a connector.
+ /// Get a connector by its ID or name. + ///
+ /// + /// Fetch the customer data associated with the connector (e.g. customer secrets / config).
+ /// Default Value: false + /// + /// + /// Fetch the general connection secrets associated with the connector.
+ /// Default Value: false + /// + /// + /// 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> GetAConnectorAsResponseAsync( + string connectorIdOrName, + bool? fetchCustomerData = default, + bool? fetchConnectionSecrets = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetAConnectorArguments( + httpClient: HttpClient, + fetchCustomerData: ref fetchCustomerData, + fetchConnectionSecrets: ref fetchConnectionSecrets, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAConnectorSecurityRequirements, + operationName: "GetAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}#idOrName", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("fetch_customer_data", fetchCustomerData?.ToString().ToLowerInvariant()) + .AddOptionalParameter("fetch_connection_secrets", fetchConnectionSecrets?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + fetchCustomerData: fetchCustomerData, + fetchConnectionSecrets: fetchConnectionSecrets, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAConnector", + methodName: "GetAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}#idOrName\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAConnector", + methodName: "GetAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}#idOrName\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAConnector", + methodName: "GetAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}#idOrName\"", + 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::Mistral.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); + ProcessGetAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAConnector", + methodName: "GetAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}#idOrName\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAConnector", + methodName: "GetAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}#idOrName\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessGetAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.Connector.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.Connector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs new file mode 100644 index 0000000..2aee992 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs @@ -0,0 +1,426 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_GetAuthenticationMethodsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_GetAuthenticationMethodsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_GetAuthenticationMethodsForAConnectorSecurityRequirement0, + }; + partial void PrepareGetAuthenticationMethodsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string connectorIdOrName); + partial void PrepareGetAuthenticationMethodsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string connectorIdOrName); + partial void ProcessGetAuthenticationMethodsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAuthenticationMethodsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get authentication methods for a connector.
+ /// Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + ///
+ /// + /// 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> GetAuthenticationMethodsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAuthenticationMethodsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get authentication methods for a connector.
+ /// Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + ///
+ /// + /// 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>> GetAuthenticationMethodsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetAuthenticationMethodsForAConnectorArguments( + httpClient: HttpClient, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAuthenticationMethodsForAConnectorSecurityRequirements, + operationName: "GetAuthenticationMethodsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/authentication_methods", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetAuthenticationMethodsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAuthenticationMethodsForAConnector", + methodName: "GetAuthenticationMethodsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/authentication_methods\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAuthenticationMethodsForAConnector", + methodName: "GetAuthenticationMethodsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/authentication_methods\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAuthenticationMethodsForAConnector", + methodName: "GetAuthenticationMethodsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/authentication_methods\"", + 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::Mistral.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); + ProcessGetAuthenticationMethodsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAuthenticationMethodsForAConnector", + methodName: "GetAuthenticationMethodsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/authentication_methods\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAuthenticationMethodsForAConnector", + methodName: "GetAuthenticationMethodsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/authentication_methods\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetAuthenticationMethodsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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 = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs new file mode 100644 index 0000000..5f3a55e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs @@ -0,0 +1,485 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_GetTheAuthUrlForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_GetTheAuthUrlForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_GetTheAuthUrlForAConnectorSecurityRequirement0, + }; + partial void PrepareGetTheAuthUrlForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? appReturnUrl, + ref string? credentialsName, + ref string connectorIdOrName); + partial void PrepareGetTheAuthUrlForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? appReturnUrl, + string? credentialsName, + string connectorIdOrName); + partial void ProcessGetTheAuthUrlForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetTheAuthUrlForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get the auth URL for a connector.
+ /// Get the OAuth2 authorization URL for a connector to initiate user authentication. + ///
+ /// + /// + /// + /// 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 GetTheAuthUrlForAConnectorAsync( + string connectorIdOrName, + string? appReturnUrl = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTheAuthUrlForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + appReturnUrl: appReturnUrl, + credentialsName: credentialsName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get the auth URL for a connector.
+ /// Get the OAuth2 authorization URL for a connector to initiate user authentication. + ///
+ /// + /// + /// + /// 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> GetTheAuthUrlForAConnectorAsResponseAsync( + string connectorIdOrName, + string? appReturnUrl = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetTheAuthUrlForAConnectorArguments( + httpClient: HttpClient, + appReturnUrl: ref appReturnUrl, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTheAuthUrlForAConnectorSecurityRequirements, + operationName: "GetTheAuthUrlForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/auth_url", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("app_return_url", appReturnUrl) + .AddOptionalParameter("credentials_name", credentialsName) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetTheAuthUrlForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + appReturnUrl: appReturnUrl, + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTheAuthUrlForAConnector", + methodName: "GetTheAuthUrlForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/auth_url\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTheAuthUrlForAConnector", + methodName: "GetTheAuthUrlForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/auth_url\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTheAuthUrlForAConnector", + methodName: "GetTheAuthUrlForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/auth_url\"", + 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::Mistral.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); + ProcessGetTheAuthUrlForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTheAuthUrlForAConnector", + methodName: "GetTheAuthUrlForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/auth_url\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTheAuthUrlForAConnector", + methodName: "GetTheAuthUrlForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/auth_url\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessGetTheAuthUrlForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.AuthUrlResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.AuthUrlResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.ListAllConnectors.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListAllConnectors.g.cs new file mode 100644 index 0000000..885a122 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListAllConnectors.g.cs @@ -0,0 +1,493 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_ListAllConnectorsSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_ListAllConnectorsSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_ListAllConnectorsSecurityRequirement0, + }; + partial void PrepareListAllConnectorsArguments( + global::System.Net.Http.HttpClient httpClient, + global::Mistral.ConnectorsQueryFilters? queryFilters, + ref string? cursor, + ref int? pageSize); + partial void PrepareListAllConnectorsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Mistral.ConnectorsQueryFilters? queryFilters, + string? cursor, + int? pageSize); + partial void ProcessListAllConnectorsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListAllConnectorsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List all connectors.
+ /// List all your custom connectors with keyset pagination and filters. + ///
+ /// + /// Default Value: {"fetch_user_data":false,"fetch_customer_data":false,"fetch_connection_secrets":false,"fetch_execution_data":false} + /// + /// + /// + /// Default Value: 100 + /// + /// 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 ListAllConnectorsAsync( + global::Mistral.ConnectorsQueryFilters? queryFilters = default, + string? cursor = default, + int? pageSize = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAllConnectorsAsResponseAsync( + queryFilters: queryFilters, + cursor: cursor, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List all connectors.
+ /// List all your custom connectors with keyset pagination and filters. + ///
+ /// + /// Default Value: {"fetch_user_data":false,"fetch_customer_data":false,"fetch_connection_secrets":false,"fetch_execution_data":false} + /// + /// + /// + /// Default Value: 100 + /// + /// 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> ListAllConnectorsAsResponseAsync( + global::Mistral.ConnectorsQueryFilters? queryFilters = default, + string? cursor = default, + int? pageSize = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListAllConnectorsArguments( + httpClient: HttpClient, + queryFilters: queryFilters, + cursor: ref cursor, + pageSize: ref pageSize); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListAllConnectorsSecurityRequirements, + operationName: "ListAllConnectorsAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: "/v1/connectors", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("page_size", pageSize?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListAllConnectorsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + queryFilters: queryFilters, + cursor: cursor, + pageSize: pageSize); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAllConnectors", + methodName: "ListAllConnectorsAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAllConnectors", + methodName: "ListAllConnectorsAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAllConnectors", + methodName: "ListAllConnectorsAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.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); + ProcessListAllConnectorsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAllConnectors", + methodName: "ListAllConnectorsAsync", + pathTemplate: "\"/v1/connectors\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAllConnectors", + methodName: "ListAllConnectorsAsync", + pathTemplate: "\"/v1/connectors\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessListAllConnectorsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.PaginatedConnectors.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.PaginatedConnectors.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..952ab01 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,489 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_ListOrganizationCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_ListOrganizationCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_ListOrganizationCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareListOrganizationCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + global::Mistral.OutboundAuthenticationType? authType, + ref bool? fetchDefault, + ref string connectorIdOrName); + partial void PrepareListOrganizationCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Mistral.OutboundAuthenticationType? authType, + bool? fetchDefault, + string connectorIdOrName); + partial void ProcessListOrganizationCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListOrganizationCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List organization credentials for a connector.
+ /// List all credentials configured at the organization level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListOrganizationCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + authType: authType, + fetchDefault: fetchDefault, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List organization credentials for a connector.
+ /// List all credentials configured at the organization level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListOrganizationCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListOrganizationCredentialsForAConnectorArguments( + httpClient: HttpClient, + authType: authType, + fetchDefault: ref fetchDefault, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListOrganizationCredentialsForAConnectorSecurityRequirements, + operationName: "ListOrganizationCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/organization/credentials", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("auth_type", authType?.ToString()) + .AddOptionalParameter("fetch_default", fetchDefault?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListOrganizationCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + authType: authType, + fetchDefault: fetchDefault, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListOrganizationCredentialsForAConnector", + methodName: "ListOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListOrganizationCredentialsForAConnector", + methodName: "ListOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListOrganizationCredentialsForAConnector", + methodName: "ListOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.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); + ProcessListOrganizationCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListOrganizationCredentialsForAConnector", + methodName: "ListOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListOrganizationCredentialsForAConnector", + methodName: "ListOrganizationCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/organization/credentials\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessListOrganizationCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.CredentialsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.CredentialsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.ListToolsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListToolsForAConnector.g.cs new file mode 100644 index 0000000..2571727 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListToolsForAConnector.g.cs @@ -0,0 +1,533 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_ListToolsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_ListToolsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_ListToolsForAConnectorSecurityRequirement0, + }; + partial void PrepareListToolsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? page, + ref int? pageSize, + ref bool? refresh, + ref bool? pretty, + ref string? credentialsName, + ref string connectorIdOrName); + partial void PrepareListToolsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? page, + int? pageSize, + bool? refresh, + bool? pretty, + string? credentialsName, + string connectorIdOrName); + partial void ProcessListToolsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListToolsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List tools for a connector.
+ /// List all tools available for an MCP connector. + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: false + /// + /// + /// Return a simplified payload with only name, description, annotations, and a compact inputSchema.
+ /// Default Value: false + /// + /// + /// + /// 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, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> ListToolsForAConnectorAsync( + string connectorIdOrName, + int? page = default, + int? pageSize = default, + bool? refresh = default, + bool? pretty = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListToolsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + page: page, + pageSize: pageSize, + refresh: refresh, + pretty: pretty, + credentialsName: credentialsName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List tools for a connector.
+ /// List all tools available for an MCP connector. + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: false + /// + /// + /// Return a simplified payload with only name, description, annotations, and a compact inputSchema.
+ /// Default Value: false + /// + /// + /// + /// 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, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>> ListToolsForAConnectorAsResponseAsync( + string connectorIdOrName, + int? page = default, + int? pageSize = default, + bool? refresh = default, + bool? pretty = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListToolsForAConnectorArguments( + httpClient: HttpClient, + page: ref page, + pageSize: ref pageSize, + refresh: ref refresh, + pretty: ref pretty, + credentialsName: ref credentialsName, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListToolsForAConnectorSecurityRequirements, + operationName: "ListToolsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/tools", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("page", page?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("refresh", refresh?.ToString().ToLowerInvariant()) + .AddOptionalParameter("pretty", pretty?.ToString().ToLowerInvariant()) + .AddOptionalParameter("credentials_name", credentialsName) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListToolsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + page: page, + pageSize: pageSize, + refresh: refresh, + pretty: pretty, + credentialsName: credentialsName, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolsForAConnector", + methodName: "ListToolsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolsForAConnector", + methodName: "ListToolsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolsForAConnector", + methodName: "ListToolsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools\"", + 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::Mistral.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); + ProcessListToolsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolsForAConnector", + methodName: "ListToolsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListToolsForAConnector", + methodName: "ListToolsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/tools\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessListToolsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.ListUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..8ac2c59 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListUserCredentialsForAConnector.g.cs @@ -0,0 +1,489 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_ListUserCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_ListUserCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_ListUserCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareListUserCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + global::Mistral.OutboundAuthenticationType? authType, + ref bool? fetchDefault, + ref string connectorIdOrName); + partial void PrepareListUserCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Mistral.OutboundAuthenticationType? authType, + bool? fetchDefault, + string connectorIdOrName); + partial void ProcessListUserCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListUserCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List user credentials for a connector.
+ /// List all credentials configured at the user level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListUserCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListUserCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + authType: authType, + fetchDefault: fetchDefault, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List user credentials for a connector.
+ /// List all credentials configured at the user level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListUserCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListUserCredentialsForAConnectorArguments( + httpClient: HttpClient, + authType: authType, + fetchDefault: ref fetchDefault, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListUserCredentialsForAConnectorSecurityRequirements, + operationName: "ListUserCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/user/credentials", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("auth_type", authType?.ToString()) + .AddOptionalParameter("fetch_default", fetchDefault?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListUserCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + authType: authType, + fetchDefault: fetchDefault, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListUserCredentialsForAConnector", + methodName: "ListUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListUserCredentialsForAConnector", + methodName: "ListUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListUserCredentialsForAConnector", + methodName: "ListUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.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); + ProcessListUserCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListUserCredentialsForAConnector", + methodName: "ListUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListUserCredentialsForAConnector", + methodName: "ListUserCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/user/credentials\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessListUserCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.CredentialsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.CredentialsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..45dc7f3 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,489 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_ListWorkspaceCredentialsForAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_ListWorkspaceCredentialsForAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_ListWorkspaceCredentialsForAConnectorSecurityRequirement0, + }; + partial void PrepareListWorkspaceCredentialsForAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + global::Mistral.OutboundAuthenticationType? authType, + ref bool? fetchDefault, + ref string connectorIdOrName); + partial void PrepareListWorkspaceCredentialsForAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Mistral.OutboundAuthenticationType? authType, + bool? fetchDefault, + string connectorIdOrName); + partial void ProcessListWorkspaceCredentialsForAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListWorkspaceCredentialsForAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List workspace credentials for a connector.
+ /// List all credentials configured at the workspace level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListWorkspaceCredentialsForAConnectorAsResponseAsync( + connectorIdOrName: connectorIdOrName, + authType: authType, + fetchDefault: fetchDefault, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List workspace credentials for a connector.
+ /// List all credentials configured at the workspace level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListWorkspaceCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListWorkspaceCredentialsForAConnectorArguments( + httpClient: HttpClient, + authType: authType, + fetchDefault: ref fetchDefault, + connectorIdOrName: ref connectorIdOrName); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListWorkspaceCredentialsForAConnectorSecurityRequirements, + operationName: "ListWorkspaceCredentialsForAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorIdOrName}/workspace/credentials", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("auth_type", authType?.ToString()) + .AddOptionalParameter("fetch_default", fetchDefault?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListWorkspaceCredentialsForAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + authType: authType, + fetchDefault: fetchDefault, + connectorIdOrName: connectorIdOrName!); + + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceCredentialsForAConnector", + methodName: "ListWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceCredentialsForAConnector", + methodName: "ListWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceCredentialsForAConnector", + methodName: "ListWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.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); + ProcessListWorkspaceCredentialsForAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceCredentialsForAConnector", + methodName: "ListWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListWorkspaceCredentialsForAConnector", + methodName: "ListWorkspaceCredentialsForAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorIdOrName}/workspace/credentials\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessListWorkspaceCredentialsForAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.CredentialsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.CredentialsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.BetaConnectorsClient.UpdateAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.UpdateAConnector.g.cs new file mode 100644 index 0000000..df50899 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.UpdateAConnector.g.cs @@ -0,0 +1,551 @@ + +#nullable enable + +namespace Mistral +{ + public partial class BetaConnectorsClient + { + + + private static readonly global::Mistral.EndPointSecurityRequirement s_UpdateAConnectorSecurityRequirement0 = + new global::Mistral.EndPointSecurityRequirement + { + Authorizations = new global::Mistral.EndPointAuthorizationRequirement[] + { new global::Mistral.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "ApiKey", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Mistral.EndPointSecurityRequirement[] s_UpdateAConnectorSecurityRequirements = + new global::Mistral.EndPointSecurityRequirement[] + { s_UpdateAConnectorSecurityRequirement0, + }; + partial void PrepareUpdateAConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid connectorId, + global::Mistral.ConnectorMCPUpdate request); + partial void PrepareUpdateAConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid connectorId, + global::Mistral.ConnectorMCPUpdate request); + partial void ProcessUpdateAConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateAConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateAConnectorAsync( + global::System.Guid connectorId, + + global::Mistral.ConnectorMCPUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAConnectorAsResponseAsync( + connectorId: connectorId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateAConnectorAsResponseAsync( + global::System.Guid connectorId, + + global::Mistral.ConnectorMCPUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateAConnectorArguments( + httpClient: HttpClient, + connectorId: ref connectorId, + request: request); + + + var __authorizations = global::Mistral.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateAConnectorSecurityRequirements, + operationName: "UpdateAConnectorAsync"); + + using var __timeoutCancellationTokenSource = global::Mistral.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Mistral.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Mistral.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Mistral.PathBuilder( + path: $"/v1/connectors/{connectorId}#id", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Mistral.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::Mistral.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateAConnectorRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + connectorId: connectorId!, + 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::Mistral.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateAConnector", + methodName: "UpdateAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateAConnector", + methodName: "UpdateAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Mistral.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Mistral.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateAConnector", + methodName: "UpdateAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.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); + ProcessUpdateAConnectorResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Mistral.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateAConnector", + methodName: "UpdateAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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::Mistral.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Mistral.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateAConnector", + methodName: "UpdateAConnectorAsync", + pathTemplate: "$\"/v1/connectors/{connectorId}#id\"", + 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); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Mistral.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Mistral.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Mistral.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); + ProcessUpdateAConnectorResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Mistral.Connector.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Mistral.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::Mistral.Connector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Mistral.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Mistral.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::Mistral.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 a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// The name of the connector. + /// + /// + /// The description of the connector. + /// + /// + /// The optional url of the icon you want to associate to the connector. + /// + /// + /// Optional system prompt for the connector. + /// + /// + /// Optional new connection config. + /// + /// + /// Optional new connection secrets + /// + /// + /// New server url for your mcp connector. + /// + /// + /// New headers for your mcp connector. + /// + /// + /// New authentication data for your mcp connector. + /// + /// 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 UpdateAConnectorAsync( + global::System.Guid connectorId, + string? name = default, + string? description = default, + string? iconUrl = default, + string? systemPrompt = default, + object? connectionConfig = default, + object? connectionSecrets = default, + string? server = default, + object? headers = default, + global::Mistral.AuthData? authData = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Mistral.ConnectorMCPUpdate + { + Name = name, + Description = description, + IconUrl = iconUrl, + SystemPrompt = systemPrompt, + ConnectionConfig = connectionConfig, + ConnectionSecrets = connectionSecrets, + Server = server, + Headers = headers, + AuthData = authData, + }; + + return await UpdateAConnectorAsync( + connectorId: connectorId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.g.cs b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.g.cs new file mode 100644 index 0000000..82868cd --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.BetaConnectorsClient.g.cs @@ -0,0 +1,137 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// (beta) Connectors
+ /// 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 BetaConnectorsClient : global::Mistral.IBetaConnectorsClient, global::System.IDisposable + { + /// + /// Production server + /// + public const string DefaultBaseUrl = "https://api.mistral.ai/"; + + 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::Mistral.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mistral.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the BetaConnectorsClient. + /// 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 BetaConnectorsClient( + 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 BetaConnectorsClient 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 BetaConnectorsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Mistral.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the BetaConnectorsClient. + /// 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 BetaConnectorsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Mistral.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::Mistral.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/Mistral/Generated/Mistral.IBetaConnectorsClient.CallConnectorTool.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CallConnectorTool.g.cs new file mode 100644 index 0000000..5517567 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CallConnectorTool.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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 CallConnectorToolAsync( + string toolName, + string connectorIdOrName, + + global::Mistral.MCPToolCallRequest request, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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> CallConnectorToolAsResponseAsync( + string toolName, + string connectorIdOrName, + + global::Mistral.MCPToolCallRequest request, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Connector Tool
+ /// Call a tool on an MCP connector. + ///
+ /// + /// + /// + /// + /// 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 CallConnectorToolAsync( + string toolName, + string connectorIdOrName, + string? credentialsName = default, + object? arguments = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateANewConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateANewConnector.g.cs new file mode 100644 index 0000000..dd4a41e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateANewConnector.g.cs @@ -0,0 +1,77 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Create a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// 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 CreateANewConnectorAsync( + + global::Mistral.ConnectorMCPCreate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// 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> CreateANewConnectorAsResponseAsync( + + global::Mistral.ConnectorMCPCreate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create a new connector.
+ /// Create a new MCP connector. You can customize its visibility, url and auth type. + ///
+ /// + /// The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. + /// + /// + /// The description of the connector. + /// + /// + /// The optional url of the icon you want to associate to the connector. + /// + /// + /// Visibility of the connector. Use 'shared_workspace' for workspace scoped connectors, or 'private' for private connectors.
+ /// Default Value: shared_org + /// + /// + /// The url of the MCP server. + /// + /// + /// Optional organization-level headers to be sent with the request to the mcp server. + /// + /// + /// Optional additional authentication data for the connector. + /// + /// + /// Optional system prompt for the connector. + /// + /// 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 CreateANewConnectorAsync( + string name, + string description, + string server, + string? iconUrl = default, + global::Mistral.ResourceVisibility? visibility = default, + object? headers = default, + global::Mistral.AuthData? authData = default, + string? systemPrompt = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..9d31e95 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,62 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateOrganizationCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update organization credentials for a connector.
+ /// Create or update credentials at the organization level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..b18922b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateUserCredentialsForAConnector.g.cs @@ -0,0 +1,62 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateUserCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateUserCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update user credentials for a connector.
+ /// Create or update credentials at the user level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateUserCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..160b633 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.CreateOrUpdateWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,62 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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 CreateOrUpdateWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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> CreateOrUpdateWorkspaceCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + + global::Mistral.CredentialsCreateOrUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create or update workspace credentials for a connector.
+ /// Create or update credentials at the workspace level for a given connector. + ///
+ /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// + /// 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 CreateOrUpdateWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + string name, + bool? isDefault = default, + global::Mistral.ConnectionCredentials? credentials = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteAConnector.g.cs new file mode 100644 index 0000000..4dbbee1 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteAConnector.g.cs @@ -0,0 +1,32 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Delete a connector.
+ /// Delete a connector by its ID. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteAConnectorAsync( + global::System.Guid connectorId, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete a connector.
+ /// Delete a connector by its ID. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> DeleteAConnectorAsResponseAsync( + global::System.Guid connectorId, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..b2cd8ec --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Delete organization credentials for a connector.
+ /// Delete credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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 DeleteOrganizationCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete organization credentials for a connector.
+ /// Delete credentials at the organization level for a given connector. + ///
+ /// + /// + /// 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> DeleteOrganizationCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..f0ebbf5 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteUserCredentialsForAConnector.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Delete user credentials for a connector.
+ /// Delete credentials at the user level for a given connector. + ///
+ /// + /// + /// 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 DeleteUserCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete user credentials for a connector.
+ /// Delete credentials at the user level for a given connector. + ///
+ /// + /// + /// 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> DeleteUserCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..9747d48 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.DeleteWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Delete workspace credentials for a connector.
+ /// Delete credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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 DeleteWorkspaceCredentialsForAConnectorAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete workspace credentials for a connector.
+ /// Delete credentials at the workspace level for a given connector. + ///
+ /// + /// + /// 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> DeleteWorkspaceCredentialsForAConnectorAsResponseAsync( + string credentialsName, + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAConnector.g.cs new file mode 100644 index 0000000..9d7c752 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAConnector.g.cs @@ -0,0 +1,52 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Get a connector.
+ /// Get a connector by its ID or name. + ///
+ /// + /// Fetch the customer data associated with the connector (e.g. customer secrets / config).
+ /// Default Value: false + /// + /// + /// Fetch the general connection secrets associated with the connector.
+ /// Default Value: false + /// + /// + /// 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 GetAConnectorAsync( + string connectorIdOrName, + bool? fetchCustomerData = default, + bool? fetchConnectionSecrets = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get a connector.
+ /// Get a connector by its ID or name. + ///
+ /// + /// Fetch the customer data associated with the connector (e.g. customer secrets / config).
+ /// Default Value: false + /// + /// + /// Fetch the general connection secrets associated with the connector.
+ /// Default Value: false + /// + /// + /// 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> GetAConnectorAsResponseAsync( + string connectorIdOrName, + bool? fetchCustomerData = default, + bool? fetchConnectionSecrets = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs new file mode 100644 index 0000000..872349a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetAuthenticationMethodsForAConnector.g.cs @@ -0,0 +1,32 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Get authentication methods for a connector.
+ /// Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + ///
+ /// + /// 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> GetAuthenticationMethodsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get authentication methods for a connector.
+ /// Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + ///
+ /// + /// 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>> GetAuthenticationMethodsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs new file mode 100644 index 0000000..ff6f75d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.GetTheAuthUrlForAConnector.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Get the auth URL for a connector.
+ /// Get the OAuth2 authorization URL for a connector to initiate user authentication. + ///
+ /// + /// + /// + /// 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 GetTheAuthUrlForAConnectorAsync( + string connectorIdOrName, + string? appReturnUrl = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get the auth URL for a connector.
+ /// Get the OAuth2 authorization URL for a connector to initiate user authentication. + ///
+ /// + /// + /// + /// 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> GetTheAuthUrlForAConnectorAsResponseAsync( + string connectorIdOrName, + string? appReturnUrl = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListAllConnectors.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListAllConnectors.g.cs new file mode 100644 index 0000000..5a6008f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListAllConnectors.g.cs @@ -0,0 +1,48 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// List all connectors.
+ /// List all your custom connectors with keyset pagination and filters. + ///
+ /// + /// Default Value: {"fetch_user_data":false,"fetch_customer_data":false,"fetch_connection_secrets":false,"fetch_execution_data":false} + /// + /// + /// + /// Default Value: 100 + /// + /// 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 ListAllConnectorsAsync( + global::Mistral.ConnectorsQueryFilters? queryFilters = default, + string? cursor = default, + int? pageSize = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List all connectors.
+ /// List all your custom connectors with keyset pagination and filters. + ///
+ /// + /// Default Value: {"fetch_user_data":false,"fetch_customer_data":false,"fetch_connection_secrets":false,"fetch_execution_data":false} + /// + /// + /// + /// Default Value: 100 + /// + /// 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> ListAllConnectorsAsResponseAsync( + global::Mistral.ConnectorsQueryFilters? queryFilters = default, + string? cursor = default, + int? pageSize = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs new file mode 100644 index 0000000..eb8cbc4 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListOrganizationCredentialsForAConnector.g.cs @@ -0,0 +1,44 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// List organization credentials for a connector.
+ /// List all credentials configured at the organization level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListOrganizationCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List organization credentials for a connector.
+ /// List all credentials configured at the organization level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListOrganizationCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListToolsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListToolsForAConnector.g.cs new file mode 100644 index 0000000..e883cb5 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListToolsForAConnector.g.cs @@ -0,0 +1,70 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// List tools for a connector.
+ /// List all tools available for an MCP connector. + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: false + /// + /// + /// Return a simplified payload with only name, description, annotations, and a compact inputSchema.
+ /// Default Value: false + /// + /// + /// + /// 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, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> ListToolsForAConnectorAsync( + string connectorIdOrName, + int? page = default, + int? pageSize = default, + bool? refresh = default, + bool? pretty = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List tools for a connector.
+ /// List all tools available for an MCP connector. + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: false + /// + /// + /// Return a simplified payload with only name, description, annotations, and a compact inputSchema.
+ /// Default Value: false + /// + /// + /// + /// 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, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>> ListToolsForAConnectorAsResponseAsync( + string connectorIdOrName, + int? page = default, + int? pageSize = default, + bool? refresh = default, + bool? pretty = default, + string? credentialsName = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListUserCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListUserCredentialsForAConnector.g.cs new file mode 100644 index 0000000..8893fde --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListUserCredentialsForAConnector.g.cs @@ -0,0 +1,44 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// List user credentials for a connector.
+ /// List all credentials configured at the user level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListUserCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List user credentials for a connector.
+ /// List all credentials configured at the user level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListUserCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs new file mode 100644 index 0000000..d1161f7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.ListWorkspaceCredentialsForAConnector.g.cs @@ -0,0 +1,44 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// List workspace credentials for a connector.
+ /// List all credentials configured at the workspace level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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 ListWorkspaceCredentialsForAConnectorAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List workspace credentials for a connector.
+ /// List all credentials configured at the workspace level for a given connector. + ///
+ /// + /// + /// Default Value: false + /// + /// + /// 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> ListWorkspaceCredentialsForAConnectorAsResponseAsync( + string connectorIdOrName, + global::Mistral.OutboundAuthenticationType? authType = default, + bool? fetchDefault = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.UpdateAConnector.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.UpdateAConnector.g.cs new file mode 100644 index 0000000..21c25e6 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.UpdateAConnector.g.cs @@ -0,0 +1,86 @@ +#nullable enable + +namespace Mistral +{ + public partial interface IBetaConnectorsClient + { + /// + /// Update a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateAConnectorAsync( + global::System.Guid connectorId, + + global::Mistral.ConnectorMCPUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateAConnectorAsResponseAsync( + global::System.Guid connectorId, + + global::Mistral.ConnectorMCPUpdate request, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a connector.
+ /// Update a connector by its ID. + ///
+ /// + /// + /// The name of the connector. + /// + /// + /// The description of the connector. + /// + /// + /// The optional url of the icon you want to associate to the connector. + /// + /// + /// Optional system prompt for the connector. + /// + /// + /// Optional new connection config. + /// + /// + /// Optional new connection secrets + /// + /// + /// New server url for your mcp connector. + /// + /// + /// New headers for your mcp connector. + /// + /// + /// New authentication data for your mcp connector. + /// + /// 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 UpdateAConnectorAsync( + global::System.Guid connectorId, + string? name = default, + string? description = default, + string? iconUrl = default, + string? systemPrompt = default, + object? connectionConfig = default, + object? connectionSecrets = default, + string? server = default, + object? headers = default, + global::Mistral.AuthData? authData = default, + global::Mistral.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.g.cs b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.g.cs new file mode 100644 index 0000000..5045595 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.IBetaConnectorsClient.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// (beta) Connectors
+ /// 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 IBetaConnectorsClient : 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::Mistral.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.IMistralClient.g.cs b/src/libs/Mistral/Generated/Mistral.IMistralClient.g.cs index e301c88..c27211e 100644 --- a/src/libs/Mistral/Generated/Mistral.IMistralClient.g.cs +++ b/src/libs/Mistral/Generated/Mistral.IMistralClient.g.cs @@ -70,6 +70,11 @@ public partial interface IMistralClient : global::System.IDisposable /// public BetaAgentsClient BetaAgents { get; } + /// + /// (beta) Connectors. + /// + public BetaConnectorsClient BetaConnectors { get; } + /// /// (beta) Conversations API. /// diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguage.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguage.g.cs new file mode 100644 index 0000000..26da649 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguage.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class MCPSupportedLanguageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.MCPSupportedLanguage Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.MCPSupportedLanguageExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.MCPSupportedLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.MCPSupportedLanguage); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.MCPSupportedLanguage value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Mistral.MCPSupportedLanguageExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguageNullable.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguageNullable.g.cs new file mode 100644 index 0000000..5cc09f8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPSupportedLanguageNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class MCPSupportedLanguageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.MCPSupportedLanguage? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.MCPSupportedLanguageExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.MCPSupportedLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.MCPSupportedLanguage?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.MCPSupportedLanguage? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Mistral.MCPSupportedLanguageExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1Item.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1Item.g.cs new file mode 100644 index 0000000..533df79 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1Item.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class MCPUIToolMetaVisibilityVariant1ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.MCPUIToolMetaVisibilityVariant1Item Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.MCPUIToolMetaVisibilityVariant1ItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.MCPUIToolMetaVisibilityVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.MCPUIToolMetaVisibilityVariant1Item); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.MCPUIToolMetaVisibilityVariant1Item value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Mistral.MCPUIToolMetaVisibilityVariant1ItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullable.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullable.g.cs new file mode 100644 index 0000000..c63635c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class MCPUIToolMetaVisibilityVariant1ItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.MCPUIToolMetaVisibilityVariant1Item? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.MCPUIToolMetaVisibilityVariant1ItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.MCPUIToolMetaVisibilityVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.MCPUIToolMetaVisibilityVariant1Item?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.MCPUIToolMetaVisibilityVariant1Item? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Mistral.MCPUIToolMetaVisibilityVariant1ItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationType.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationType.g.cs new file mode 100644 index 0000000..023e539 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class OutboundAuthenticationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.OutboundAuthenticationType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.OutboundAuthenticationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.OutboundAuthenticationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.OutboundAuthenticationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.OutboundAuthenticationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Mistral.OutboundAuthenticationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationTypeNullable.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationTypeNullable.g.cs new file mode 100644 index 0000000..5fe206a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.OutboundAuthenticationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class OutboundAuthenticationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.OutboundAuthenticationType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.OutboundAuthenticationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.OutboundAuthenticationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.OutboundAuthenticationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.OutboundAuthenticationType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Mistral.OutboundAuthenticationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2.g.cs new file mode 100644 index 0000000..95f6447 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class ToolExecutionTaskSupport2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.ToolExecutionTaskSupport2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.ToolExecutionTaskSupport2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.ToolExecutionTaskSupport2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.ToolExecutionTaskSupport2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.ToolExecutionTaskSupport2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Mistral.ToolExecutionTaskSupport2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2Nullable.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2Nullable.g.cs new file mode 100644 index 0000000..330f155 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolExecutionTaskSupport2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class ToolExecutionTaskSupport2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.ToolExecutionTaskSupport2? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.ToolExecutionTaskSupport2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.ToolExecutionTaskSupport2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.ToolExecutionTaskSupport2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.ToolExecutionTaskSupport2? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Mistral.ToolExecutionTaskSupport2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolType.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolType.g.cs new file mode 100644 index 0000000..4052fc3 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class ToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.ToolType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.ToolTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.ToolType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.ToolType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.ToolType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Mistral.ToolTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolTypeNullable.g.cs b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolTypeNullable.g.cs new file mode 100644 index 0000000..ca4df3e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.JsonConverters.ToolTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Mistral.JsonConverters +{ + /// + public sealed class ToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Mistral.ToolType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Mistral.ToolTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Mistral.ToolType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Mistral.ToolType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Mistral.ToolType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Mistral.ToolTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Mistral/Generated/Mistral.JsonSerializerContext.g.cs b/src/libs/Mistral/Generated/Mistral.JsonSerializerContext.g.cs index d292974..36ae3ba 100644 --- a/src/libs/Mistral/Generated/Mistral.JsonSerializerContext.g.cs +++ b/src/libs/Mistral/Generated/Mistral.JsonSerializerContext.g.cs @@ -433,6 +433,26 @@ namespace Mistral typeof(global::Mistral.JsonConverters.WorkflowTypeNullableJsonConverter), + typeof(global::Mistral.JsonConverters.MCPSupportedLanguageJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPSupportedLanguageNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeJsonConverter), + + typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolExecutionTaskSupport2JsonConverter), + + typeof(global::Mistral.JsonConverters.ToolExecutionTaskSupport2NullableJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolTypeJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolTypeNullableJsonConverter), + typeof(global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityJsonConverter), typeof(global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityNullableJsonConverter), @@ -711,6 +731,8 @@ namespace Mistral typeof(global::Mistral.JsonConverters.AnyOfJsonConverter), + typeof(global::Mistral.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>), + typeof(global::Mistral.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ListDocumentOut), TypeInfoPropertyName = "ListDocumentOut_Mistral_ListDocumentOut")] @@ -1644,6 +1666,26 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Mistral.JsonConverters.WorkflowTypeNullableJsonConverter), + typeof(global::Mistral.JsonConverters.MCPSupportedLanguageJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPSupportedLanguageNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemJsonConverter), + + typeof(global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeJsonConverter), + + typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeNullableJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolExecutionTaskSupport2JsonConverter), + + typeof(global::Mistral.JsonConverters.ToolExecutionTaskSupport2NullableJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolTypeJsonConverter), + + typeof(global::Mistral.JsonConverters.ToolTypeNullableJsonConverter), + typeof(global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityJsonConverter), typeof(global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityNullableJsonConverter), @@ -1922,6 +1964,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Mistral.JsonConverters.AnyOfJsonConverter), + typeof(global::Mistral.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>), + typeof(global::Mistral.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ListDocumentOut), TypeInfoPropertyName = "ListDocumentOut_Mistral_ListDocumentOut")] @@ -2179,6 +2223,30 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.WorkflowUnarchiveResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.WorkflowUpdateRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.WorkflowUpdateResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.AuthUrlResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.AuthenticationConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.OutboundAuthenticationType), TypeInfoPropertyName = "OutboundAuthenticationType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ConnectionCredentials))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.OAuth2Token))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ConnectorAuthenticationHeader))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.CredentialsCreateOrUpdate))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.CredentialsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.MCPSupportedLanguage), TypeInfoPropertyName = "MCPSupportedLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.MCPTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ToolAnnotations))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.MCPToolMeta2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ToolExecution))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.MCPUIToolMeta))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.TurbineToolMeta))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.MCPUIToolMetaVisibilityVariant1Item), TypeInfoPropertyName = "MCPUIToolMetaVisibilityVariant1Item2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.PublicAuthenticationMethod))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ToolExecutionTaskSupport2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.ToolType), TypeInfoPropertyName = "ToolType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.TurbineToolLocale))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.FilesApiRoutesUploadFileRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.FilesApiRoutesUploadFileRequestVisibility), TypeInfoPropertyName = "FilesApiRoutesUploadFileRequestVisibility2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.LibrariesDocumentsUploadV1Request))] @@ -2221,6 +2289,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.StreamV1WorkflowsExecutionsExecutionIdStreamGetResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.GetStreamEventsV1WorkflowsEventsStreamGetResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.AnyOf), TypeInfoPropertyName = "AnyOfWorkflowExecutionResponseWorkflowExecutionSyncResponse2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mistral.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>), TypeInfoPropertyName = "AnyOfIListIntegrationsSchemasApiToolToolIListMCPToolIListObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::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))] @@ -2334,6 +2405,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [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))] @@ -2345,6 +2420,9 @@ 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::Mistral.AnyOf, global::System.Collections.Generic.List, 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 { } @@ -2597,6 +2675,16 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Mistral.JsonConverters.WorkflowExecutionStatusNullableJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.WorkflowTypeJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.WorkflowTypeNullableJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.MCPSupportedLanguageJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.MCPSupportedLanguageNullableJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.MCPUIToolMetaVisibilityVariant1ItemNullableJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.OutboundAuthenticationTypeJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.OutboundAuthenticationTypeNullableJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.ToolExecutionTaskSupport2JsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.ToolExecutionTaskSupport2NullableJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.ToolTypeJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.ToolTypeNullableJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.FilesApiRoutesUploadFileRequestVisibilityNullableJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.JobsApiRoutesFineTuningGetFineTuningJobsStatus2JsonConverter()); @@ -2736,6 +2824,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Mistral.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Mistral.JsonConverters.AnyOfJsonConverter()); + options.Converters.Add(new global::Mistral.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>()); options.Converters.Add(new global::Mistral.JsonConverters.UnixTimestampJsonConverter()); return options; diff --git a/src/libs/Mistral/Generated/Mistral.JsonSerializerContextTypes.g.cs b/src/libs/Mistral/Generated/Mistral.JsonSerializerContextTypes.g.cs index 71afbd7..f4567be 100644 --- a/src/libs/Mistral/Generated/Mistral.JsonSerializerContextTypes.g.cs +++ b/src/libs/Mistral/Generated/Mistral.JsonSerializerContextTypes.g.cs @@ -2960,171 +2960,279 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Mistral.FilesApiRoutesUploadFileRequest? Type733 { get; set; } + public global::Mistral.AuthUrlResponse? Type733 { get; set; } /// /// /// - public global::Mistral.FilesApiRoutesUploadFileRequestVisibility? Type734 { get; set; } + public global::Mistral.AuthenticationConfiguration? Type734 { get; set; } /// /// /// - public global::Mistral.LibrariesDocumentsUploadV1Request? Type735 { get; set; } + public global::Mistral.OutboundAuthenticationType? Type735 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type736 { get; set; } + public global::Mistral.ConnectionCredentials? Type736 { get; set; } /// /// /// - public global::Mistral.AnyOf? Type737 { get; set; } + public global::Mistral.OAuth2Token? Type737 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type738 { get; set; } + public global::Mistral.ConnectorAuthenticationHeader? Type738 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type739 { get; set; } + public global::Mistral.CredentialsCreateOrUpdate? Type739 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobsStatus2? Type740 { get; set; } + public global::Mistral.CredentialsResponse? Type740 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type741 { get; set; } + public global::System.Collections.Generic.IList? Type741 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesBatchGetBatchJobsOrderBy? Type742 { get; set; } + public global::System.Collections.Generic.IList? Type742 { get; set; } /// /// /// - public global::Mistral.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetOperator? Type743 { get; set; } + public global::Mistral.MCPSupportedLanguage? Type743 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type744 { get; set; } + public global::Mistral.MCPTool? Type744 { get; set; } /// /// /// - public global::Mistral.AnyOf, object>? Type745 { get; set; } + public global::Mistral.ToolAnnotations? Type745 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type746 { get; set; } + public global::Mistral.MCPToolMeta2? Type746 { get; set; } /// /// /// - public global::Mistral.GetStreamEventsV1WorkflowsEventsStreamGetScope? Type747 { get; set; } + public global::Mistral.ToolExecution? Type747 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type748 { get; set; } + public global::Mistral.MCPUIToolMeta? Type748 { get; set; } /// /// /// - public global::Mistral.RetrieveModelV1ModelsModelIdGetResponse? Type749 { get; set; } + public global::Mistral.TurbineToolMeta? Type749 { get; set; } /// /// /// - public global::Mistral.RetrieveModelV1ModelsModelIdGetResponseDiscriminator? Type750 { get; set; } + public global::System.Collections.Generic.IList? Type750 { get; set; } /// /// /// - public global::Mistral.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType? Type751 { get; set; } + public global::Mistral.MCPUIToolMetaVisibilityVariant1Item? Type751 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type752 { get; set; } + public global::Mistral.PublicAuthenticationMethod? Type752 { get; set; } /// /// /// - public global::Mistral.AnyOf? Type753 { get; set; } + public global::System.Collections.Generic.IList? Type753 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type754 { get; set; } + public global::Mistral.ToolExecutionTaskSupport2? Type754 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type755 { get; set; } + public global::Mistral.ToolType? Type755 { get; set; } /// /// /// - public global::Mistral.AnyOf? Type756 { get; set; } + public global::Mistral.TurbineToolLocale? Type756 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1? Type757 { get; set; } + public global::Mistral.FilesApiRoutesUploadFileRequest? Type757 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1Discriminator? Type758 { get; set; } + public global::Mistral.FilesApiRoutesUploadFileRequestVisibility? Type758 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1DiscriminatorJobType? Type759 { get; set; } + public global::Mistral.LibrariesDocumentsUploadV1Request? Type759 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponse? Type760 { get; set; } + public global::System.Collections.Generic.IList? Type760 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponseDiscriminator? Type761 { get; set; } + public global::Mistral.AnyOf? Type761 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponseDiscriminatorJobType? Type762 { get; set; } + public global::System.Collections.Generic.IList? Type762 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponse? Type763 { get; set; } + public global::System.Collections.Generic.IList? Type763 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponseDiscriminator? Type764 { get; set; } + public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobsStatus2? Type764 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponseDiscriminatorJobType? Type765 { get; set; } + public global::System.Collections.Generic.IList? Type765 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponse? Type766 { get; set; } + public global::Mistral.JobsApiRoutesBatchGetBatchJobsOrderBy? Type766 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponseDiscriminator? Type767 { get; set; } + public global::Mistral.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetOperator? Type767 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponseDiscriminatorJobType? Type768 { get; set; } + public global::System.Collections.Generic.IList? Type768 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponse? Type769 { get; set; } + public global::Mistral.AnyOf, object>? Type769 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponseDiscriminator? Type770 { get; set; } + public global::System.Collections.Generic.IList? Type770 { get; set; } /// /// /// - public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponseDiscriminatorModelType? Type771 { get; set; } + public global::Mistral.GetStreamEventsV1WorkflowsEventsStreamGetScope? Type771 { get; set; } /// /// /// - public global::Mistral.StreamV1WorkflowsExecutionsExecutionIdStreamGetResponse? Type772 { get; set; } + public global::System.Collections.Generic.IList? Type772 { get; set; } /// /// /// - public global::Mistral.GetStreamEventsV1WorkflowsEventsStreamGetResponse? Type773 { get; set; } + public global::Mistral.RetrieveModelV1ModelsModelIdGetResponse? Type773 { get; set; } /// /// /// - public global::Mistral.AnyOf? Type774 { get; set; } + public global::Mistral.RetrieveModelV1ModelsModelIdGetResponseDiscriminator? Type774 { get; set; } + /// + /// + /// + public global::Mistral.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType? Type775 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type776 { get; set; } + /// + /// + /// + public global::Mistral.AnyOf? Type777 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type778 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type779 { get; set; } + /// + /// + /// + public global::Mistral.AnyOf? Type780 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1? Type781 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1Discriminator? Type782 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCreateFineTuningJobResponseVariant1DiscriminatorJobType? Type783 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponse? Type784 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponseDiscriminator? Type785 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningGetFineTuningJobResponseDiscriminatorJobType? Type786 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponse? Type787 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponseDiscriminator? Type788 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningCancelFineTuningJobResponseDiscriminatorJobType? Type789 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponse? Type790 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponseDiscriminator? Type791 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningStartFineTuningJobResponseDiscriminatorJobType? Type792 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponse? Type793 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponseDiscriminator? Type794 { get; set; } + /// + /// + /// + public global::Mistral.JobsApiRoutesFineTuningUpdateFineTunedModelResponseDiscriminatorModelType? Type795 { get; set; } + /// + /// + /// + public global::Mistral.StreamV1WorkflowsExecutionsExecutionIdStreamGetResponse? Type796 { get; set; } + /// + /// + /// + public global::Mistral.GetStreamEventsV1WorkflowsEventsStreamGetResponse? Type797 { get; set; } + /// + /// + /// + public global::Mistral.AnyOf? Type798 { get; set; } + /// + /// + /// + public global::Mistral.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>? Type799 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type800 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type801 { get; set; } /// /// @@ -3577,46 +3685,74 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType112 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType113 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType114 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType115 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType116 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType117 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType118 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType119 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType113 { get; set; } + public global::System.Collections.Generic.List? ListType120 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType114 { get; set; } + public global::Mistral.AnyOf, object>? ListType121 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType115 { get; set; } + public global::System.Collections.Generic.List? ListType122 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType116 { get; set; } + public global::System.Collections.Generic.List? ListType123 { get; set; } /// /// /// - public global::Mistral.AnyOf, object>? ListType117 { get; set; } + public global::System.Collections.Generic.List>? ListType124 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType118 { get; set; } + public global::System.Collections.Generic.List? ListType125 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType119 { get; set; } + public global::System.Collections.Generic.List? ListType126 { get; set; } /// /// /// - public global::System.Collections.Generic.List>? ListType120 { get; set; } + public global::Mistral.AnyOf, global::System.Collections.Generic.List, global::System.Collections.Generic.List>? ListType127 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType121 { get; set; } + public global::System.Collections.Generic.List? ListType128 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType122 { get; set; } + public global::System.Collections.Generic.List? ListType129 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.MistralClient.g.cs b/src/libs/Mistral/Generated/Mistral.MistralClient.g.cs index c9cfabe..db612e1 100644 --- a/src/libs/Mistral/Generated/Mistral.MistralClient.g.cs +++ b/src/libs/Mistral/Generated/Mistral.MistralClient.g.cs @@ -85,6 +85,15 @@ public sealed partial class MistralClient : global::Mistral.IMistralClient, glob JsonSerializerContext = JsonSerializerContext, }; + /// + /// (beta) Connectors. + /// + public BetaConnectorsClient BetaConnectors => new BetaConnectorsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// (beta) Conversations API. /// diff --git a/src/libs/Mistral/Generated/Mistral.Models.AuthUrlResponse.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.AuthUrlResponse.Json.g.cs new file mode 100644 index 0000000..d205b3b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.AuthUrlResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class AuthUrlResponse + { + /// + /// 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::Mistral.AuthUrlResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.AuthUrlResponse), + jsonSerializerContext) as global::Mistral.AuthUrlResponse; + } + + /// + /// 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::Mistral.AuthUrlResponse? 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::Mistral.AuthUrlResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.AuthUrlResponse; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.AuthUrlResponse.g.cs b/src/libs/Mistral/Generated/Mistral.Models.AuthUrlResponse.g.cs new file mode 100644 index 0000000..60087c1 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.AuthUrlResponse.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class AuthUrlResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("auth_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AuthUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ttl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Ttl { 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 AuthUrlResponse( + string authUrl, + int ttl) + { + this.AuthUrl = authUrl ?? throw new global::System.ArgumentNullException(nameof(authUrl)); + this.Ttl = ttl; + } + + /// + /// Initializes a new instance of the class. + /// + public AuthUrlResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.Json.g.cs new file mode 100644 index 0000000..1d93c3e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class AuthenticationConfiguration + { + /// + /// 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::Mistral.AuthenticationConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.AuthenticationConfiguration), + jsonSerializerContext) as global::Mistral.AuthenticationConfiguration; + } + + /// + /// 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::Mistral.AuthenticationConfiguration? 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::Mistral.AuthenticationConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.AuthenticationConfiguration; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.g.cs b/src/libs/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.g.cs new file mode 100644 index 0000000..8931f96 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.AuthenticationConfiguration.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class AuthenticationConfiguration + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("authentication_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Mistral.OutboundAuthenticationType AuthenticationType { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_default")] + public bool? IsDefault { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// Default Value: false + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuthenticationConfiguration( + string name, + global::Mistral.OutboundAuthenticationType authenticationType, + bool? isDefault) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.AuthenticationType = authenticationType; + this.IsDefault = isDefault; + } + + /// + /// Initializes a new instance of the class. + /// + public AuthenticationConfiguration() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentials.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentials.Json.g.cs new file mode 100644 index 0000000..65b52fa --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentials.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectionCredentials + { + /// + /// 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::Mistral.ConnectionCredentials? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectionCredentials), + jsonSerializerContext) as global::Mistral.ConnectionCredentials; + } + + /// + /// 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::Mistral.ConnectionCredentials? 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::Mistral.ConnectionCredentials), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectionCredentials; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectionCredentials.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentials.g.cs new file mode 100644 index 0000000..13ccfae --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentials.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectionCredentials + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth")] + public global::Mistral.OAuth2Token? Oauth { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.Dictionary? Headers { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bearer_token")] + public string? BearerToken { 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 ConnectionCredentials( + global::Mistral.OAuth2Token? oauth, + global::System.Collections.Generic.Dictionary? headers, + string? bearerToken) + { + this.Oauth = oauth; + this.Headers = headers; + this.BearerToken = bearerToken; + } + + /// + /// Initializes a new instance of the class. + /// + public ConnectionCredentials() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.Json.g.cs new file mode 100644 index 0000000..970c2b2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectionCredentialsBearerToken + { + /// + /// 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::Mistral.ConnectionCredentialsBearerToken? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectionCredentialsBearerToken), + jsonSerializerContext) as global::Mistral.ConnectionCredentialsBearerToken; + } + + /// + /// 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::Mistral.ConnectionCredentialsBearerToken? 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::Mistral.ConnectionCredentialsBearerToken), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectionCredentialsBearerToken; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.g.cs new file mode 100644 index 0000000..90e8db0 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsBearerToken.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectionCredentialsBearerToken + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.Json.g.cs new file mode 100644 index 0000000..12a4629 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectionCredentialsHeaders + { + /// + /// 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::Mistral.ConnectionCredentialsHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectionCredentialsHeaders), + jsonSerializerContext) as global::Mistral.ConnectionCredentialsHeaders; + } + + /// + /// 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::Mistral.ConnectionCredentialsHeaders? 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::Mistral.ConnectionCredentialsHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectionCredentialsHeaders; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.g.cs new file mode 100644 index 0000000..321691c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectionCredentialsHeaders + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.Json.g.cs new file mode 100644 index 0000000..0bb4dc2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectionCredentialsHeaders2 + { + /// + /// 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::Mistral.ConnectionCredentialsHeaders2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectionCredentialsHeaders2), + jsonSerializerContext) as global::Mistral.ConnectionCredentialsHeaders2; + } + + /// + /// 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::Mistral.ConnectionCredentialsHeaders2? 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::Mistral.ConnectionCredentialsHeaders2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectionCredentialsHeaders2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.g.cs new file mode 100644 index 0000000..995e81f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsHeaders2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectionCredentialsHeaders2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.Json.g.cs new file mode 100644 index 0000000..25cc3e7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectionCredentialsOauth + { + /// + /// 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::Mistral.ConnectionCredentialsOauth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectionCredentialsOauth), + jsonSerializerContext) as global::Mistral.ConnectionCredentialsOauth; + } + + /// + /// 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::Mistral.ConnectionCredentialsOauth? 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::Mistral.ConnectionCredentialsOauth), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectionCredentialsOauth; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.g.cs new file mode 100644 index 0000000..6460fce --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectionCredentialsOauth.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectionCredentialsOauth + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.Json.g.cs new file mode 100644 index 0000000..fa57eb6 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorAuthenticationHeader + { + /// + /// 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::Mistral.ConnectorAuthenticationHeader? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorAuthenticationHeader), + jsonSerializerContext) as global::Mistral.ConnectorAuthenticationHeader; + } + + /// + /// 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::Mistral.ConnectorAuthenticationHeader? 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::Mistral.ConnectorAuthenticationHeader), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorAuthenticationHeader; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.g.cs new file mode 100644 index 0000000..2bf6c55 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorAuthenticationHeader.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorAuthenticationHeader + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool? IsRequired { get; set; } + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_secret")] + public bool? IsSecret { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: true + /// + /// + /// Default Value: true + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ConnectorAuthenticationHeader( + string name, + bool? isRequired, + bool? isSecret) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.IsRequired = isRequired; + this.IsSecret = isSecret; + } + + /// + /// Initializes a new instance of the class. + /// + public ConnectorAuthenticationHeader() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.Json.g.cs new file mode 100644 index 0000000..25d3171 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorCallToolV1CredentialsName + { + /// + /// 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::Mistral.ConnectorCallToolV1CredentialsName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorCallToolV1CredentialsName), + jsonSerializerContext) as global::Mistral.ConnectorCallToolV1CredentialsName; + } + + /// + /// 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::Mistral.ConnectorCallToolV1CredentialsName? 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::Mistral.ConnectorCallToolV1CredentialsName), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorCallToolV1CredentialsName; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.g.cs new file mode 100644 index 0000000..8fcd8e6 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorCallToolV1CredentialsName.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorCallToolV1CredentialsName + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.Json.g.cs new file mode 100644 index 0000000..375a57d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorGetAuthUrlV1AppReturnUrl + { + /// + /// 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::Mistral.ConnectorGetAuthUrlV1AppReturnUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorGetAuthUrlV1AppReturnUrl), + jsonSerializerContext) as global::Mistral.ConnectorGetAuthUrlV1AppReturnUrl; + } + + /// + /// 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::Mistral.ConnectorGetAuthUrlV1AppReturnUrl? 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::Mistral.ConnectorGetAuthUrlV1AppReturnUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorGetAuthUrlV1AppReturnUrl; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.g.cs new file mode 100644 index 0000000..1c06de3 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1AppReturnUrl.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorGetAuthUrlV1AppReturnUrl + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.Json.g.cs new file mode 100644 index 0000000..2f8ed5e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorGetAuthUrlV1CredentialsName + { + /// + /// 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::Mistral.ConnectorGetAuthUrlV1CredentialsName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorGetAuthUrlV1CredentialsName), + jsonSerializerContext) as global::Mistral.ConnectorGetAuthUrlV1CredentialsName; + } + + /// + /// 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::Mistral.ConnectorGetAuthUrlV1CredentialsName? 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::Mistral.ConnectorGetAuthUrlV1CredentialsName), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorGetAuthUrlV1CredentialsName; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.g.cs new file mode 100644 index 0000000..859a771 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorGetAuthUrlV1CredentialsName.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorGetAuthUrlV1CredentialsName + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.Json.g.cs new file mode 100644 index 0000000..9ba813d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListOrganizationCredentialsV1AuthType + { + /// + /// 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::Mistral.ConnectorListOrganizationCredentialsV1AuthType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListOrganizationCredentialsV1AuthType), + jsonSerializerContext) as global::Mistral.ConnectorListOrganizationCredentialsV1AuthType; + } + + /// + /// 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::Mistral.ConnectorListOrganizationCredentialsV1AuthType? 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::Mistral.ConnectorListOrganizationCredentialsV1AuthType), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListOrganizationCredentialsV1AuthType; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.g.cs new file mode 100644 index 0000000..d364d5c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListOrganizationCredentialsV1AuthType.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListOrganizationCredentialsV1AuthType + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.Json.g.cs new file mode 100644 index 0000000..3203f4f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListToolsV1CredentialsName + { + /// + /// 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::Mistral.ConnectorListToolsV1CredentialsName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListToolsV1CredentialsName), + jsonSerializerContext) as global::Mistral.ConnectorListToolsV1CredentialsName; + } + + /// + /// 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::Mistral.ConnectorListToolsV1CredentialsName? 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::Mistral.ConnectorListToolsV1CredentialsName), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListToolsV1CredentialsName; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.g.cs new file mode 100644 index 0000000..c0339ec --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1CredentialsName.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListToolsV1CredentialsName + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.Json.g.cs new file mode 100644 index 0000000..c63077b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListToolsV1ResponseVariant3Item + { + /// + /// 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::Mistral.ConnectorListToolsV1ResponseVariant3Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListToolsV1ResponseVariant3Item), + jsonSerializerContext) as global::Mistral.ConnectorListToolsV1ResponseVariant3Item; + } + + /// + /// 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::Mistral.ConnectorListToolsV1ResponseVariant3Item? 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::Mistral.ConnectorListToolsV1ResponseVariant3Item), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListToolsV1ResponseVariant3Item; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.g.cs new file mode 100644 index 0000000..1456c0d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListToolsV1ResponseVariant3Item.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListToolsV1ResponseVariant3Item + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.Json.g.cs new file mode 100644 index 0000000..6a2550a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListUserCredentialsV1AuthType + { + /// + /// 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::Mistral.ConnectorListUserCredentialsV1AuthType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListUserCredentialsV1AuthType), + jsonSerializerContext) as global::Mistral.ConnectorListUserCredentialsV1AuthType; + } + + /// + /// 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::Mistral.ConnectorListUserCredentialsV1AuthType? 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::Mistral.ConnectorListUserCredentialsV1AuthType), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListUserCredentialsV1AuthType; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.g.cs new file mode 100644 index 0000000..72df378 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListUserCredentialsV1AuthType.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListUserCredentialsV1AuthType + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.Json.g.cs new file mode 100644 index 0000000..e8633bf --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListV1Cursor + { + /// + /// 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::Mistral.ConnectorListV1Cursor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListV1Cursor), + jsonSerializerContext) as global::Mistral.ConnectorListV1Cursor; + } + + /// + /// 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::Mistral.ConnectorListV1Cursor? 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::Mistral.ConnectorListV1Cursor), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListV1Cursor; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.g.cs new file mode 100644 index 0000000..be391e3 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListV1Cursor.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListV1Cursor + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.Json.g.cs new file mode 100644 index 0000000..4c6d450 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ConnectorListWorkspaceCredentialsV1AuthType + { + /// + /// 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::Mistral.ConnectorListWorkspaceCredentialsV1AuthType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ConnectorListWorkspaceCredentialsV1AuthType), + jsonSerializerContext) as global::Mistral.ConnectorListWorkspaceCredentialsV1AuthType; + } + + /// + /// 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::Mistral.ConnectorListWorkspaceCredentialsV1AuthType? 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::Mistral.ConnectorListWorkspaceCredentialsV1AuthType), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ConnectorListWorkspaceCredentialsV1AuthType; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.g.cs new file mode 100644 index 0000000..cd1babb --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ConnectorListWorkspaceCredentialsV1AuthType.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ConnectorListWorkspaceCredentialsV1AuthType + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.Json.g.cs new file mode 100644 index 0000000..68b6ca9 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class CredentialsCreateOrUpdate + { + /// + /// 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::Mistral.CredentialsCreateOrUpdate? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.CredentialsCreateOrUpdate), + jsonSerializerContext) as global::Mistral.CredentialsCreateOrUpdate; + } + + /// + /// 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::Mistral.CredentialsCreateOrUpdate? 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::Mistral.CredentialsCreateOrUpdate), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.CredentialsCreateOrUpdate; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.g.cs new file mode 100644 index 0000000..142af47 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdate.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Request to create or update non-OAuth2 credentials for a connector. + /// + public sealed partial class CredentialsCreateOrUpdate + { + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_default")] + public bool? IsDefault { get; set; } + + /// + /// The credential data (headers, bearer_token). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("credentials")] + public global::Mistral.ConnectionCredentials? Credentials { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Name of the credentials. Use this name to access or modify your credentials. + /// + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + /// + /// The credential data (headers, bearer_token). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialsCreateOrUpdate( + string name, + bool? isDefault, + global::Mistral.ConnectionCredentials? credentials) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.IsDefault = isDefault; + this.Credentials = credentials; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialsCreateOrUpdate() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.Json.g.cs new file mode 100644 index 0000000..bc4dce7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class CredentialsCreateOrUpdateCredentials + { + /// + /// 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::Mistral.CredentialsCreateOrUpdateCredentials? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.CredentialsCreateOrUpdateCredentials), + jsonSerializerContext) as global::Mistral.CredentialsCreateOrUpdateCredentials; + } + + /// + /// 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::Mistral.CredentialsCreateOrUpdateCredentials? 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::Mistral.CredentialsCreateOrUpdateCredentials), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.CredentialsCreateOrUpdateCredentials; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.g.cs new file mode 100644 index 0000000..db43421 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateCredentials.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// The credential data (headers, bearer_token). + /// + public sealed partial class CredentialsCreateOrUpdateCredentials + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.Json.g.cs new file mode 100644 index 0000000..b76a073 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class CredentialsCreateOrUpdateIsDefault + { + /// + /// 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::Mistral.CredentialsCreateOrUpdateIsDefault? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.CredentialsCreateOrUpdateIsDefault), + jsonSerializerContext) as global::Mistral.CredentialsCreateOrUpdateIsDefault; + } + + /// + /// 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::Mistral.CredentialsCreateOrUpdateIsDefault? 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::Mistral.CredentialsCreateOrUpdateIsDefault), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.CredentialsCreateOrUpdateIsDefault; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.g.cs new file mode 100644 index 0000000..2c5a153 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsCreateOrUpdateIsDefault.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + /// + public sealed partial class CredentialsCreateOrUpdateIsDefault + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.CredentialsResponse.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsResponse.Json.g.cs new file mode 100644 index 0000000..eceede5 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class CredentialsResponse + { + /// + /// 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::Mistral.CredentialsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.CredentialsResponse), + jsonSerializerContext) as global::Mistral.CredentialsResponse; + } + + /// + /// 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::Mistral.CredentialsResponse? 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::Mistral.CredentialsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.CredentialsResponse; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.CredentialsResponse.g.cs b/src/libs/Mistral/Generated/Mistral.Models.CredentialsResponse.g.cs new file mode 100644 index 0000000..54b7744 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.CredentialsResponse.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class CredentialsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("credentials")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Credentials { get; set; } + + /// + /// Default Value: [] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connector_preset_credentials_for_auth")] + public global::System.Collections.Generic.IList? ConnectorPresetCredentialsForAuth { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: [] + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialsResponse( + global::System.Collections.Generic.IList credentials, + global::System.Collections.Generic.IList? connectorPresetCredentialsForAuth) + { + this.Credentials = credentials ?? throw new global::System.ArgumentNullException(nameof(credentials)); + this.ConnectorPresetCredentialsForAuth = connectorPresetCredentialsForAuth; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPSupportedLanguage.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPSupportedLanguage.g.cs new file mode 100644 index 0000000..f5896e0 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPSupportedLanguage.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public enum MCPSupportedLanguage + { + /// + /// + /// + Ar, + /// + /// + /// + De, + /// + /// + /// + En, + /// + /// + /// + Es, + /// + /// + /// + Fr, + /// + /// + /// + It, + /// + /// + /// + Nl, + /// + /// + /// + Pl, + /// + /// + /// + PtBr, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MCPSupportedLanguageExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MCPSupportedLanguage value) + { + return value switch + { + MCPSupportedLanguage.Ar => "ar", + MCPSupportedLanguage.De => "de", + MCPSupportedLanguage.En => "en", + MCPSupportedLanguage.Es => "es", + MCPSupportedLanguage.Fr => "fr", + MCPSupportedLanguage.It => "it", + MCPSupportedLanguage.Nl => "nl", + MCPSupportedLanguage.Pl => "pl", + MCPSupportedLanguage.PtBr => "pt-BR", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MCPSupportedLanguage? ToEnum(string value) + { + return value switch + { + "ar" => MCPSupportedLanguage.Ar, + "de" => MCPSupportedLanguage.De, + "en" => MCPSupportedLanguage.En, + "es" => MCPSupportedLanguage.Es, + "fr" => MCPSupportedLanguage.Fr, + "it" => MCPSupportedLanguage.It, + "nl" => MCPSupportedLanguage.Nl, + "pl" => MCPSupportedLanguage.Pl, + "pt-BR" => MCPSupportedLanguage.PtBr, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPTool.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPTool.Json.g.cs new file mode 100644 index 0000000..a38ec15 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPTool.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPTool + { + /// + /// 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::Mistral.MCPTool? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPTool), + jsonSerializerContext) as global::Mistral.MCPTool; + } + + /// + /// 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::Mistral.MCPTool? 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::Mistral.MCPTool), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPTool; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPTool.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPTool.g.cs new file mode 100644 index 0000000..98fc9ce --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPTool.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPTool + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("inputSchema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object InputSchema { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("outputSchema")] + public object? OutputSchema { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("icons")] + public global::System.Collections.Generic.IList? Icons { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + public global::Mistral.ToolAnnotations? Annotations { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("_meta")] + public global::Mistral.MCPToolMeta2? Meta { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + public global::Mistral.ToolExecution? Execution { 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 MCPTool( + string name, + object inputSchema, + string? title, + string? description, + object? outputSchema, + global::System.Collections.Generic.IList? icons, + global::Mistral.ToolAnnotations? annotations, + global::Mistral.MCPToolMeta2? meta, + global::Mistral.ToolExecution? execution) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Title = title; + this.Description = description; + this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); + this.OutputSchema = outputSchema; + this.Icons = icons; + this.Annotations = annotations; + this.Meta = meta; + this.Execution = execution; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPTool() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolAnnotations.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolAnnotations.Json.g.cs new file mode 100644 index 0000000..c84eedd --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolAnnotations.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolAnnotations + { + /// + /// 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::Mistral.MCPToolAnnotations? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolAnnotations), + jsonSerializerContext) as global::Mistral.MCPToolAnnotations; + } + + /// + /// 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::Mistral.MCPToolAnnotations? 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::Mistral.MCPToolAnnotations), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolAnnotations; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolAnnotations.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolAnnotations.g.cs new file mode 100644 index 0000000..c3332c7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolAnnotations.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolAnnotations + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolDescription.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolDescription.Json.g.cs new file mode 100644 index 0000000..7b1f733 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolDescription + { + /// + /// 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::Mistral.MCPToolDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolDescription), + jsonSerializerContext) as global::Mistral.MCPToolDescription; + } + + /// + /// 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::Mistral.MCPToolDescription? 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::Mistral.MCPToolDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolDescription; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolDescription.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolDescription.g.cs new file mode 100644 index 0000000..e6f6c93 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolDescription.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolDescription + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolExecution.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolExecution.Json.g.cs new file mode 100644 index 0000000..22864d2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolExecution.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolExecution + { + /// + /// 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::Mistral.MCPToolExecution? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolExecution), + jsonSerializerContext) as global::Mistral.MCPToolExecution; + } + + /// + /// 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::Mistral.MCPToolExecution? 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::Mistral.MCPToolExecution), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolExecution; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolExecution.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolExecution.g.cs new file mode 100644 index 0000000..9dcae0a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolExecution.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolExecution + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolIcons.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolIcons.Json.g.cs new file mode 100644 index 0000000..9dc719e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolIcons.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolIcons + { + /// + /// 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::Mistral.MCPToolIcons? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolIcons), + jsonSerializerContext) as global::Mistral.MCPToolIcons; + } + + /// + /// 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::Mistral.MCPToolIcons? 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::Mistral.MCPToolIcons), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolIcons; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolIcons.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolIcons.g.cs new file mode 100644 index 0000000..bed4974 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolIcons.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolIcons + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolInputSchema.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolInputSchema.Json.g.cs new file mode 100644 index 0000000..c892523 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolInputSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolInputSchema + { + /// + /// 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::Mistral.MCPToolInputSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolInputSchema), + jsonSerializerContext) as global::Mistral.MCPToolInputSchema; + } + + /// + /// 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::Mistral.MCPToolInputSchema? 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::Mistral.MCPToolInputSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolInputSchema; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolInputSchema.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolInputSchema.g.cs new file mode 100644 index 0000000..72457b8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolInputSchema.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolInputSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta.Json.g.cs new file mode 100644 index 0000000..1b2ae98 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolMeta + { + /// + /// 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::Mistral.MCPToolMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolMeta), + jsonSerializerContext) as global::Mistral.MCPToolMeta; + } + + /// + /// 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::Mistral.MCPToolMeta? 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::Mistral.MCPToolMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolMeta; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolMeta.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta.g.cs new file mode 100644 index 0000000..ddc0c39 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta2.Json.g.cs new file mode 100644 index 0000000..22788b5 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolMeta2 + { + /// + /// 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::Mistral.MCPToolMeta2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolMeta2), + jsonSerializerContext) as global::Mistral.MCPToolMeta2; + } + + /// + /// 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::Mistral.MCPToolMeta2? 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::Mistral.MCPToolMeta2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolMeta2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolMeta2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta2.g.cs new file mode 100644 index 0000000..507b761 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMeta2.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Typed _meta for MCP tools.
+ /// Only the 'ui' field is typed. Other fields are allowed via extra="allow". + ///
+ public sealed partial class MCPToolMeta2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ui")] + public global::Mistral.MCPUIToolMeta? Ui { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ai.mistral/turbine")] + public global::Mistral.TurbineToolMeta? AiMistralTurbine { 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 MCPToolMeta2( + global::Mistral.MCPUIToolMeta? ui, + global::Mistral.TurbineToolMeta? aiMistralTurbine) + { + this.Ui = ui; + this.AiMistralTurbine = aiMistralTurbine; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPToolMeta2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.Json.g.cs new file mode 100644 index 0000000..c472b84 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolMetaAiMistralTurbine + { + /// + /// 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::Mistral.MCPToolMetaAiMistralTurbine? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolMetaAiMistralTurbine), + jsonSerializerContext) as global::Mistral.MCPToolMetaAiMistralTurbine; + } + + /// + /// 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::Mistral.MCPToolMetaAiMistralTurbine? 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::Mistral.MCPToolMetaAiMistralTurbine), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolMetaAiMistralTurbine; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.g.cs new file mode 100644 index 0000000..bdfa150 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaAiMistralTurbine.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolMetaAiMistralTurbine + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaUi.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaUi.Json.g.cs new file mode 100644 index 0000000..a0aeaa8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaUi.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolMetaUi + { + /// + /// 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::Mistral.MCPToolMetaUi? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolMetaUi), + jsonSerializerContext) as global::Mistral.MCPToolMetaUi; + } + + /// + /// 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::Mistral.MCPToolMetaUi? 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::Mistral.MCPToolMetaUi), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolMetaUi; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolMetaUi.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaUi.g.cs new file mode 100644 index 0000000..bc7776c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolMetaUi.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolMetaUi + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.Json.g.cs new file mode 100644 index 0000000..78a32bc --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolOutputSchema + { + /// + /// 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::Mistral.MCPToolOutputSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolOutputSchema), + jsonSerializerContext) as global::Mistral.MCPToolOutputSchema; + } + + /// + /// 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::Mistral.MCPToolOutputSchema? 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::Mistral.MCPToolOutputSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolOutputSchema; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.g.cs new file mode 100644 index 0000000..3b08acf --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolOutputSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.Json.g.cs new file mode 100644 index 0000000..828f10d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolOutputSchema2 + { + /// + /// 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::Mistral.MCPToolOutputSchema2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolOutputSchema2), + jsonSerializerContext) as global::Mistral.MCPToolOutputSchema2; + } + + /// + /// 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::Mistral.MCPToolOutputSchema2? 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::Mistral.MCPToolOutputSchema2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolOutputSchema2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.g.cs new file mode 100644 index 0000000..cf965b3 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolOutputSchema2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolOutputSchema2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPToolTitle.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolTitle.Json.g.cs new file mode 100644 index 0000000..1fa01e8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolTitle.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPToolTitle + { + /// + /// 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::Mistral.MCPToolTitle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPToolTitle), + jsonSerializerContext) as global::Mistral.MCPToolTitle; + } + + /// + /// 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::Mistral.MCPToolTitle? 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::Mistral.MCPToolTitle), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPToolTitle; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPToolTitle.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPToolTitle.g.cs new file mode 100644 index 0000000..6597c2f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPToolTitle.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPToolTitle + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMeta.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMeta.Json.g.cs new file mode 100644 index 0000000..8b5907c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPUIToolMeta + { + /// + /// 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::Mistral.MCPUIToolMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPUIToolMeta), + jsonSerializerContext) as global::Mistral.MCPUIToolMeta; + } + + /// + /// 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::Mistral.MCPUIToolMeta? 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::Mistral.MCPUIToolMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPUIToolMeta; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPUIToolMeta.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMeta.g.cs new file mode 100644 index 0000000..bf4a12c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMeta.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// UI metadata for tools that reference UI resources. + /// + public sealed partial class MCPUIToolMeta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resourceUri")] + public string? ResourceUri { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("visibility")] + public global::System.Collections.Generic.IList? Visibility { 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 MCPUIToolMeta( + string? resourceUri, + global::System.Collections.Generic.IList? visibility) + { + this.ResourceUri = resourceUri; + this.Visibility = visibility; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPUIToolMeta() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.Json.g.cs new file mode 100644 index 0000000..227eb29 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPUIToolMetaResourceUri + { + /// + /// 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::Mistral.MCPUIToolMetaResourceUri? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPUIToolMetaResourceUri), + jsonSerializerContext) as global::Mistral.MCPUIToolMetaResourceUri; + } + + /// + /// 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::Mistral.MCPUIToolMetaResourceUri? 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::Mistral.MCPUIToolMetaResourceUri), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPUIToolMetaResourceUri; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.g.cs new file mode 100644 index 0000000..cda107d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaResourceUri.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPUIToolMetaResourceUri + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.Json.g.cs new file mode 100644 index 0000000..d495263 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class MCPUIToolMetaVisibility + { + /// + /// 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::Mistral.MCPUIToolMetaVisibility? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.MCPUIToolMetaVisibility), + jsonSerializerContext) as global::Mistral.MCPUIToolMetaVisibility; + } + + /// + /// 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::Mistral.MCPUIToolMetaVisibility? 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::Mistral.MCPUIToolMetaVisibility), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.MCPUIToolMetaVisibility; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.g.cs new file mode 100644 index 0000000..b193004 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibility.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class MCPUIToolMetaVisibility + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibilityVariant1Item.g.cs b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibilityVariant1Item.g.cs new file mode 100644 index 0000000..2ec85d6 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.MCPUIToolMetaVisibilityVariant1Item.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public enum MCPUIToolMetaVisibilityVariant1Item + { + /// + /// + /// + App, + /// + /// + /// + Model, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MCPUIToolMetaVisibilityVariant1ItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MCPUIToolMetaVisibilityVariant1Item value) + { + return value switch + { + MCPUIToolMetaVisibilityVariant1Item.App => "app", + MCPUIToolMetaVisibilityVariant1Item.Model => "model", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MCPUIToolMetaVisibilityVariant1Item? ToEnum(string value) + { + return value switch + { + "app" => MCPUIToolMetaVisibilityVariant1Item.App, + "model" => MCPUIToolMetaVisibilityVariant1Item.Model, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OAuth2Token.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2Token.Json.g.cs new file mode 100644 index 0000000..1d95e40 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2Token.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class OAuth2Token + { + /// + /// 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::Mistral.OAuth2Token? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.OAuth2Token), + jsonSerializerContext) as global::Mistral.OAuth2Token; + } + + /// + /// 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::Mistral.OAuth2Token? 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::Mistral.OAuth2Token), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.OAuth2Token; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.OAuth2Token.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2Token.g.cs new file mode 100644 index 0000000..769d824 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2Token.g.cs @@ -0,0 +1,92 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class OAuth2Token + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("access_token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AccessToken { get; set; } + + /// + /// Default Value: Bearer + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_type")] + public string? TokenType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int? ExpiresIn { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scope")] + public string? Scope { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refresh_token")] + public string? RefreshToken { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + public global::System.DateTime? ExpiresAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: Bearer + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OAuth2Token( + string accessToken, + string? tokenType, + int? expiresIn, + string? scope, + string? refreshToken, + global::System.DateTime? expiresAt) + { + this.AccessToken = accessToken ?? throw new global::System.ArgumentNullException(nameof(accessToken)); + this.TokenType = tokenType; + this.ExpiresIn = expiresIn; + this.Scope = scope; + this.RefreshToken = refreshToken; + this.ExpiresAt = expiresAt; + } + + /// + /// Initializes a new instance of the class. + /// + public OAuth2Token() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.Json.g.cs new file mode 100644 index 0000000..467eecf --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class OAuth2TokenExpiresAt + { + /// + /// 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::Mistral.OAuth2TokenExpiresAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.OAuth2TokenExpiresAt), + jsonSerializerContext) as global::Mistral.OAuth2TokenExpiresAt; + } + + /// + /// 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::Mistral.OAuth2TokenExpiresAt? 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::Mistral.OAuth2TokenExpiresAt), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.OAuth2TokenExpiresAt; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.g.cs new file mode 100644 index 0000000..08f00e8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresAt.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class OAuth2TokenExpiresAt + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.Json.g.cs new file mode 100644 index 0000000..7269f3b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class OAuth2TokenExpiresIn + { + /// + /// 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::Mistral.OAuth2TokenExpiresIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.OAuth2TokenExpiresIn), + jsonSerializerContext) as global::Mistral.OAuth2TokenExpiresIn; + } + + /// + /// 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::Mistral.OAuth2TokenExpiresIn? 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::Mistral.OAuth2TokenExpiresIn), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.OAuth2TokenExpiresIn; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.g.cs new file mode 100644 index 0000000..6580eca --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenExpiresIn.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class OAuth2TokenExpiresIn + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.Json.g.cs new file mode 100644 index 0000000..c0788a9 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class OAuth2TokenRefreshToken + { + /// + /// 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::Mistral.OAuth2TokenRefreshToken? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.OAuth2TokenRefreshToken), + jsonSerializerContext) as global::Mistral.OAuth2TokenRefreshToken; + } + + /// + /// 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::Mistral.OAuth2TokenRefreshToken? 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::Mistral.OAuth2TokenRefreshToken), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.OAuth2TokenRefreshToken; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.g.cs new file mode 100644 index 0000000..fa1c71b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenRefreshToken.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class OAuth2TokenRefreshToken + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenScope.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenScope.Json.g.cs new file mode 100644 index 0000000..7e4e1bf --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenScope.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class OAuth2TokenScope + { + /// + /// 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::Mistral.OAuth2TokenScope? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.OAuth2TokenScope), + jsonSerializerContext) as global::Mistral.OAuth2TokenScope; + } + + /// + /// 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::Mistral.OAuth2TokenScope? 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::Mistral.OAuth2TokenScope), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.OAuth2TokenScope; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.OAuth2TokenScope.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenScope.g.cs new file mode 100644 index 0000000..6c88cb2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OAuth2TokenScope.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class OAuth2TokenScope + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.OutboundAuthenticationType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.OutboundAuthenticationType.g.cs new file mode 100644 index 0000000..286eb21 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.OutboundAuthenticationType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public enum OutboundAuthenticationType + { + /// + /// + /// + Bearer, + /// + /// + /// + None, + /// + /// + /// + Oauth2, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OutboundAuthenticationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OutboundAuthenticationType value) + { + return value switch + { + OutboundAuthenticationType.Bearer => "bearer", + OutboundAuthenticationType.None => "none", + OutboundAuthenticationType.Oauth2 => "oauth2", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OutboundAuthenticationType? ToEnum(string value) + { + return value switch + { + "bearer" => OutboundAuthenticationType.Bearer, + "none" => OutboundAuthenticationType.None, + "oauth2" => OutboundAuthenticationType.Oauth2, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.Json.g.cs new file mode 100644 index 0000000..6c9a911 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class PublicAuthenticationMethod + { + /// + /// 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::Mistral.PublicAuthenticationMethod? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.PublicAuthenticationMethod), + jsonSerializerContext) as global::Mistral.PublicAuthenticationMethod; + } + + /// + /// 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::Mistral.PublicAuthenticationMethod? 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::Mistral.PublicAuthenticationMethod), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.PublicAuthenticationMethod; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.g.cs b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.g.cs new file mode 100644 index 0000000..bcb93dc --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethod.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Public view of an authentication method, without secrets. + /// + public sealed partial class PublicAuthenticationMethod + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("method_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Mistral.JsonConverters.OutboundAuthenticationTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Mistral.OutboundAuthenticationType MethodType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.IList? Headers { 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 PublicAuthenticationMethod( + global::Mistral.OutboundAuthenticationType methodType, + global::System.Collections.Generic.IList? headers) + { + this.MethodType = methodType; + this.Headers = headers; + } + + /// + /// Initializes a new instance of the class. + /// + public PublicAuthenticationMethod() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.Json.g.cs new file mode 100644 index 0000000..0a12056 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class PublicAuthenticationMethodHeaders + { + /// + /// 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::Mistral.PublicAuthenticationMethodHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.PublicAuthenticationMethodHeaders), + jsonSerializerContext) as global::Mistral.PublicAuthenticationMethodHeaders; + } + + /// + /// 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::Mistral.PublicAuthenticationMethodHeaders? 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::Mistral.PublicAuthenticationMethodHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.PublicAuthenticationMethodHeaders; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.g.cs b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.g.cs new file mode 100644 index 0000000..dc70615 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.PublicAuthenticationMethodHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class PublicAuthenticationMethodHeaders + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotations.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotations.Json.g.cs new file mode 100644 index 0000000..1272d07 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotations.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotations + { + /// + /// 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::Mistral.ToolAnnotations? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotations), + jsonSerializerContext) as global::Mistral.ToolAnnotations; + } + + /// + /// 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::Mistral.ToolAnnotations? 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::Mistral.ToolAnnotations), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotations; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotations.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotations.g.cs new file mode 100644 index 0000000..59208f7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotations.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Additional properties describing a Tool to clients.
+ /// NOTE: all properties in ToolAnnotations are **hints**.
+ /// They are not guaranteed to provide a faithful description of
+ /// tool behavior (including descriptive properties like `title`).
+ /// Clients should never make tool use decisions based on ToolAnnotations
+ /// received from untrusted servers. + ///
+ public sealed partial class ToolAnnotations + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("readOnlyHint")] + public bool? ReadOnlyHint { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("destructiveHint")] + public bool? DestructiveHint { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("idempotentHint")] + public bool? IdempotentHint { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("openWorldHint")] + public bool? OpenWorldHint { 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 ToolAnnotations( + string? title, + bool? readOnlyHint, + bool? destructiveHint, + bool? idempotentHint, + bool? openWorldHint) + { + this.Title = title; + this.ReadOnlyHint = readOnlyHint; + this.DestructiveHint = destructiveHint; + this.IdempotentHint = idempotentHint; + this.OpenWorldHint = openWorldHint; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolAnnotations() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.Json.g.cs new file mode 100644 index 0000000..a9471d4 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotationsDestructiveHint + { + /// + /// 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::Mistral.ToolAnnotationsDestructiveHint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotationsDestructiveHint), + jsonSerializerContext) as global::Mistral.ToolAnnotationsDestructiveHint; + } + + /// + /// 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::Mistral.ToolAnnotationsDestructiveHint? 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::Mistral.ToolAnnotationsDestructiveHint), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotationsDestructiveHint; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.g.cs new file mode 100644 index 0000000..cab7cee --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsDestructiveHint.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolAnnotationsDestructiveHint + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.Json.g.cs new file mode 100644 index 0000000..df76829 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotationsIdempotentHint + { + /// + /// 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::Mistral.ToolAnnotationsIdempotentHint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotationsIdempotentHint), + jsonSerializerContext) as global::Mistral.ToolAnnotationsIdempotentHint; + } + + /// + /// 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::Mistral.ToolAnnotationsIdempotentHint? 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::Mistral.ToolAnnotationsIdempotentHint), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotationsIdempotentHint; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.g.cs new file mode 100644 index 0000000..d614ed2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsIdempotentHint.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolAnnotationsIdempotentHint + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.Json.g.cs new file mode 100644 index 0000000..927d15e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotationsOpenWorldHint + { + /// + /// 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::Mistral.ToolAnnotationsOpenWorldHint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotationsOpenWorldHint), + jsonSerializerContext) as global::Mistral.ToolAnnotationsOpenWorldHint; + } + + /// + /// 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::Mistral.ToolAnnotationsOpenWorldHint? 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::Mistral.ToolAnnotationsOpenWorldHint), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotationsOpenWorldHint; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.g.cs new file mode 100644 index 0000000..3282b9d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsOpenWorldHint.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolAnnotationsOpenWorldHint + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.Json.g.cs new file mode 100644 index 0000000..2972343 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotationsReadOnlyHint + { + /// + /// 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::Mistral.ToolAnnotationsReadOnlyHint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotationsReadOnlyHint), + jsonSerializerContext) as global::Mistral.ToolAnnotationsReadOnlyHint; + } + + /// + /// 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::Mistral.ToolAnnotationsReadOnlyHint? 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::Mistral.ToolAnnotationsReadOnlyHint), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotationsReadOnlyHint; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.g.cs new file mode 100644 index 0000000..9ebbaab --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsReadOnlyHint.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolAnnotationsReadOnlyHint + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.Json.g.cs new file mode 100644 index 0000000..013c4d9 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolAnnotationsTitle + { + /// + /// 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::Mistral.ToolAnnotationsTitle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolAnnotationsTitle), + jsonSerializerContext) as global::Mistral.ToolAnnotationsTitle; + } + + /// + /// 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::Mistral.ToolAnnotationsTitle? 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::Mistral.ToolAnnotationsTitle), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolAnnotationsTitle; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.g.cs new file mode 100644 index 0000000..faa2740 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolAnnotationsTitle.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolAnnotationsTitle + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolExecution.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolExecution.Json.g.cs new file mode 100644 index 0000000..2de4d3c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolExecution.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolExecution + { + /// + /// 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::Mistral.ToolExecution? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolExecution), + jsonSerializerContext) as global::Mistral.ToolExecution; + } + + /// + /// 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::Mistral.ToolExecution? 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::Mistral.ToolExecution), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolExecution; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolExecution.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolExecution.g.cs new file mode 100644 index 0000000..fb91e21 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolExecution.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// Execution-related properties for a tool. + /// + public sealed partial class ToolExecution + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("taskSupport")] + public global::Mistral.ToolExecutionTaskSupport2? TaskSupport { 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 ToolExecution( + global::Mistral.ToolExecutionTaskSupport2? taskSupport) + { + this.TaskSupport = taskSupport; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolExecution() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.Json.g.cs new file mode 100644 index 0000000..7234ce0 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class ToolExecutionTaskSupport + { + /// + /// 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::Mistral.ToolExecutionTaskSupport? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.ToolExecutionTaskSupport), + jsonSerializerContext) as global::Mistral.ToolExecutionTaskSupport; + } + + /// + /// 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::Mistral.ToolExecutionTaskSupport? 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::Mistral.ToolExecutionTaskSupport), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.ToolExecutionTaskSupport; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.g.cs new file mode 100644 index 0000000..433fb73 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class ToolExecutionTaskSupport + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport2.g.cs new file mode 100644 index 0000000..948fd7b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolExecutionTaskSupport2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public enum ToolExecutionTaskSupport2 + { + /// + /// + /// + Forbidden, + /// + /// + /// + Optional, + /// + /// + /// + Required, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolExecutionTaskSupport2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolExecutionTaskSupport2 value) + { + return value switch + { + ToolExecutionTaskSupport2.Forbidden => "forbidden", + ToolExecutionTaskSupport2.Optional => "optional", + ToolExecutionTaskSupport2.Required => "required", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolExecutionTaskSupport2? ToEnum(string value) + { + return value switch + { + "forbidden" => ToolExecutionTaskSupport2.Forbidden, + "optional" => ToolExecutionTaskSupport2.Optional, + "required" => ToolExecutionTaskSupport2.Required, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.ToolType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.ToolType.g.cs new file mode 100644 index 0000000..fddfb9d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.ToolType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public enum ToolType + { + /// + /// + /// + Code, + /// + /// + /// + Event, + /// + /// + /// + Image, + /// + /// + /// + Rag, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolType value) + { + return value switch + { + ToolType.Code => "code", + ToolType.Event => "event", + ToolType.Image => "image", + ToolType.Rag => "rag", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolType? ToEnum(string value) + { + return value switch + { + "code" => ToolType.Code, + "event" => ToolType.Event, + "image" => ToolType.Image, + "rag" => ToolType.Rag, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocale.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocale.Json.g.cs new file mode 100644 index 0000000..711a528 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocale.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocale + { + /// + /// 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::Mistral.TurbineToolLocale? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocale), + jsonSerializerContext) as global::Mistral.TurbineToolLocale; + } + + /// + /// 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::Mistral.TurbineToolLocale? 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::Mistral.TurbineToolLocale), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocale; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocale.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocale.g.cs new file mode 100644 index 0000000..a52a8b8 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocale.g.cs @@ -0,0 +1,80 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocale + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public global::System.Collections.Generic.Dictionary? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public global::System.Collections.Generic.Dictionary? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage_sentence")] + public global::System.Collections.Generic.Dictionary? UsageSentence { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("working_description")] + public global::System.Collections.Generic.Dictionary? WorkingDescription { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("done_description")] + public global::System.Collections.Generic.Dictionary? DoneDescription { 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 TurbineToolLocale( + global::System.Collections.Generic.Dictionary? name, + global::System.Collections.Generic.Dictionary? description, + global::System.Collections.Generic.Dictionary? usageSentence, + global::System.Collections.Generic.Dictionary? workingDescription, + global::System.Collections.Generic.Dictionary? doneDescription) + { + this.Name = name; + this.Description = description; + this.UsageSentence = usageSentence; + this.WorkingDescription = workingDescription; + this.DoneDescription = doneDescription; + } + + /// + /// Initializes a new instance of the class. + /// + public TurbineToolLocale() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.Json.g.cs new file mode 100644 index 0000000..4234a1c --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleDescription + { + /// + /// 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::Mistral.TurbineToolLocaleDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleDescription), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleDescription; + } + + /// + /// 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::Mistral.TurbineToolLocaleDescription? 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::Mistral.TurbineToolLocaleDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleDescription; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.g.cs new file mode 100644 index 0000000..e626c7e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleDescription + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.Json.g.cs new file mode 100644 index 0000000..758b6e9 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleDescription2 + { + /// + /// 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::Mistral.TurbineToolLocaleDescription2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleDescription2), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleDescription2; + } + + /// + /// 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::Mistral.TurbineToolLocaleDescription2? 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::Mistral.TurbineToolLocaleDescription2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleDescription2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.g.cs new file mode 100644 index 0000000..480d369 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDescription2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleDescription2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.Json.g.cs new file mode 100644 index 0000000..654cf19 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleDoneDescription + { + /// + /// 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::Mistral.TurbineToolLocaleDoneDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleDoneDescription), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleDoneDescription; + } + + /// + /// 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::Mistral.TurbineToolLocaleDoneDescription? 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::Mistral.TurbineToolLocaleDoneDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleDoneDescription; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.g.cs new file mode 100644 index 0000000..8ece8a5 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleDoneDescription + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.Json.g.cs new file mode 100644 index 0000000..ac5f11e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleDoneDescription2 + { + /// + /// 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::Mistral.TurbineToolLocaleDoneDescription2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleDoneDescription2), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleDoneDescription2; + } + + /// + /// 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::Mistral.TurbineToolLocaleDoneDescription2? 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::Mistral.TurbineToolLocaleDoneDescription2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleDoneDescription2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.g.cs new file mode 100644 index 0000000..f9df917 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleDoneDescription2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleDoneDescription2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.Json.g.cs new file mode 100644 index 0000000..8497608 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleName + { + /// + /// 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::Mistral.TurbineToolLocaleName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleName), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleName; + } + + /// + /// 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::Mistral.TurbineToolLocaleName? 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::Mistral.TurbineToolLocaleName), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleName; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.g.cs new file mode 100644 index 0000000..3b53e93 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleName + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.Json.g.cs new file mode 100644 index 0000000..d1c8f3e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleName2 + { + /// + /// 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::Mistral.TurbineToolLocaleName2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleName2), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleName2; + } + + /// + /// 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::Mistral.TurbineToolLocaleName2? 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::Mistral.TurbineToolLocaleName2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleName2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.g.cs new file mode 100644 index 0000000..aacb3a2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleName2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleName2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.Json.g.cs new file mode 100644 index 0000000..ce54d8a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleUsageSentence + { + /// + /// 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::Mistral.TurbineToolLocaleUsageSentence? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleUsageSentence), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleUsageSentence; + } + + /// + /// 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::Mistral.TurbineToolLocaleUsageSentence? 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::Mistral.TurbineToolLocaleUsageSentence), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleUsageSentence; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.g.cs new file mode 100644 index 0000000..07bcaa1 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleUsageSentence + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.Json.g.cs new file mode 100644 index 0000000..f150a3b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleUsageSentence2 + { + /// + /// 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::Mistral.TurbineToolLocaleUsageSentence2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleUsageSentence2), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleUsageSentence2; + } + + /// + /// 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::Mistral.TurbineToolLocaleUsageSentence2? 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::Mistral.TurbineToolLocaleUsageSentence2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleUsageSentence2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.g.cs new file mode 100644 index 0000000..72b20af --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleUsageSentence2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleUsageSentence2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.Json.g.cs new file mode 100644 index 0000000..dbb5c6a --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleWorkingDescription + { + /// + /// 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::Mistral.TurbineToolLocaleWorkingDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleWorkingDescription), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleWorkingDescription; + } + + /// + /// 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::Mistral.TurbineToolLocaleWorkingDescription? 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::Mistral.TurbineToolLocaleWorkingDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleWorkingDescription; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.g.cs new file mode 100644 index 0000000..ac779b7 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleWorkingDescription + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.Json.g.cs new file mode 100644 index 0000000..8d0add2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolLocaleWorkingDescription2 + { + /// + /// 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::Mistral.TurbineToolLocaleWorkingDescription2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolLocaleWorkingDescription2), + jsonSerializerContext) as global::Mistral.TurbineToolLocaleWorkingDescription2; + } + + /// + /// 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::Mistral.TurbineToolLocaleWorkingDescription2? 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::Mistral.TurbineToolLocaleWorkingDescription2), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolLocaleWorkingDescription2; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.g.cs new file mode 100644 index 0000000..803f30e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolLocaleWorkingDescription2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolLocaleWorkingDescription2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMeta.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMeta.Json.g.cs new file mode 100644 index 0000000..a364c94 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolMeta + { + /// + /// 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::Mistral.TurbineToolMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolMeta), + jsonSerializerContext) as global::Mistral.TurbineToolMeta; + } + + /// + /// 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::Mistral.TurbineToolMeta? 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::Mistral.TurbineToolMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolMeta; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolMeta.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMeta.g.cs new file mode 100644 index 0000000..c962d8e --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMeta.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolMeta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("locale")] + public global::Mistral.TurbineToolLocale? Locale { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_type")] + public global::Mistral.ToolType? ToolType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timeout")] + public double? Timeout { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("private_execution")] + public bool? PrivateExecution { 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 TurbineToolMeta( + global::Mistral.TurbineToolLocale? locale, + global::Mistral.ToolType? toolType, + double? timeout, + bool? privateExecution) + { + this.Locale = locale; + this.ToolType = toolType; + this.Timeout = timeout; + this.PrivateExecution = privateExecution; + } + + /// + /// Initializes a new instance of the class. + /// + public TurbineToolMeta() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.Json.g.cs new file mode 100644 index 0000000..68209a2 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolMetaLocale + { + /// + /// 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::Mistral.TurbineToolMetaLocale? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolMetaLocale), + jsonSerializerContext) as global::Mistral.TurbineToolMetaLocale; + } + + /// + /// 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::Mistral.TurbineToolMetaLocale? 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::Mistral.TurbineToolMetaLocale), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolMetaLocale; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.g.cs new file mode 100644 index 0000000..f868c6d --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaLocale.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolMetaLocale + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.Json.g.cs new file mode 100644 index 0000000..2335d34 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolMetaPrivateExecution + { + /// + /// 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::Mistral.TurbineToolMetaPrivateExecution? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolMetaPrivateExecution), + jsonSerializerContext) as global::Mistral.TurbineToolMetaPrivateExecution; + } + + /// + /// 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::Mistral.TurbineToolMetaPrivateExecution? 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::Mistral.TurbineToolMetaPrivateExecution), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolMetaPrivateExecution; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.g.cs new file mode 100644 index 0000000..c775da1 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaPrivateExecution.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolMetaPrivateExecution + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.Json.g.cs new file mode 100644 index 0000000..8da4b5b --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolMetaTimeout + { + /// + /// 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::Mistral.TurbineToolMetaTimeout? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolMetaTimeout), + jsonSerializerContext) as global::Mistral.TurbineToolMetaTimeout; + } + + /// + /// 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::Mistral.TurbineToolMetaTimeout? 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::Mistral.TurbineToolMetaTimeout), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolMetaTimeout; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.g.cs new file mode 100644 index 0000000..ce408eb --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaTimeout.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolMetaTimeout + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.Json.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.Json.g.cs new file mode 100644 index 0000000..b252d05 --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Mistral +{ + public sealed partial class TurbineToolMetaToolType + { + /// + /// 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::Mistral.TurbineToolMetaToolType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Mistral.TurbineToolMetaToolType), + jsonSerializerContext) as global::Mistral.TurbineToolMetaToolType; + } + + /// + /// 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::Mistral.TurbineToolMetaToolType? 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::Mistral.TurbineToolMetaToolType), + jsonSerializerContext).ConfigureAwait(false)) as global::Mistral.TurbineToolMetaToolType; + } + + /// + /// 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/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.g.cs b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.g.cs new file mode 100644 index 0000000..2040c4f --- /dev/null +++ b/src/libs/Mistral/Generated/Mistral.Models.TurbineToolMetaToolType.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Mistral +{ + /// + /// + /// + public sealed partial class TurbineToolMetaToolType + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Mistral/openapi.yaml b/src/libs/Mistral/openapi.yaml index 85d3e2a..dad4726 100644 --- a/src/libs/Mistral/openapi.yaml +++ b/src/libs/Mistral/openapi.yaml @@ -6688,6 +6688,702 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors: + post: + operationId: connector_create_v1 + summary: Create a new connector. + description: Create a new MCP connector. You can customize its visibility, url and auth type. + tags: + - beta.connectors + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorMCPCreate' + required: true + responses: + '201': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/Connector' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + get: + operationId: connector_list_v1 + summary: List all connectors. + description: List all your custom connectors with keyset pagination and filters. + tags: + - beta.connectors + parameters: + - name: query_filters + in: query + required: false + schema: + $ref: '#/components/schemas/ConnectorsQueryFilters' + default: + fetch_user_data: false + fetch_customer_data: false + fetch_connection_secrets: false + fetch_execution_data: false + - name: cursor + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Cursor + - name: page_size + in: query + required: false + schema: + type: integer + title: Page Size + maximum: 1000 + minimum: 1 + default: 100 + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedConnectors' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/auth_url: + get: + operationId: connector_get_auth_url_v1 + summary: Get the auth URL for a connector. + description: Get the OAuth2 authorization URL for a connector to initiate user authentication. + tags: + - beta.connectors + parameters: + - name: app_return_url + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: App Return Url + - name: credentials_name + in: query + required: false + schema: + anyOf: + - type: string + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - type: 'null' + title: Credentials Name + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/AuthUrlResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/tools/{tool_name}/call: + post: + operationId: connector_call_tool_v1 + summary: Call Connector Tool + description: Call a tool on an MCP connector. + tags: + - beta.connectors + parameters: + - name: tool_name + in: path + required: true + schema: + type: string + title: Tool Name + - name: credentials_name + in: query + required: false + schema: + anyOf: + - type: string + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - type: 'null' + title: Credentials Name + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MCPToolCallRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MCPToolCallResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/tools: + get: + operationId: connector_list_tools_v1 + summary: List tools for a connector. + description: List all tools available for an MCP connector. + tags: + - beta.connectors + parameters: + - name: page + in: query + required: false + schema: + type: integer + title: Page + default: 1 + - name: page_size + in: query + required: false + schema: + type: integer + title: Page Size + default: 100 + - name: refresh + in: query + required: false + schema: + type: boolean + title: Refresh + default: false + - name: pretty + in: query + description: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + required: false + schema: + type: boolean + title: Pretty + description: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + default: false + - name: credentials_name + in: query + required: false + schema: + anyOf: + - type: string + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - type: 'null' + title: Credentials Name + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + anyOf: + - type: array + items: + $ref: '#/components/schemas/integrations__schemas__api__tool__Tool' + - type: array + items: + $ref: '#/components/schemas/MCPTool' + - type: array + items: + type: object + additionalProperties: true + title: Response Connector List Tools V1 + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/authentication_methods: + get: + operationId: connector_get_authentication_methods_v1 + summary: Get authentication methods for a connector. + description: Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + tags: + - beta.connectors + parameters: + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PublicAuthenticationMethod' + title: Response Connector Get Authentication Methods V1 + /v1/connectors/{connector_id_or_name}/organization/credentials: + get: + operationId: connector_list_organization_credentials_v1 + summary: List organization credentials for a connector. + description: List all credentials configured at the organization level for a given connector. + tags: + - beta.connectors + parameters: + - name: auth_type + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OutboundAuthenticationType' + - type: 'null' + title: Auth Type + - name: fetch_default + in: query + required: false + schema: + type: boolean + title: Fetch Default + default: false + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + post: + operationId: connector_create_or_update_organization_credentials_v1 + summary: Create or update organization credentials for a connector. + description: Create or update credentials at the organization level for a given connector. + tags: + - beta.connectors + parameters: + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsCreateOrUpdate' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/workspace/credentials: + get: + operationId: connector_list_workspace_credentials_v1 + summary: List workspace credentials for a connector. + description: List all credentials configured at the workspace level for a given connector. + tags: + - beta.connectors + parameters: + - name: auth_type + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OutboundAuthenticationType' + - type: 'null' + title: Auth Type + - name: fetch_default + in: query + required: false + schema: + type: boolean + title: Fetch Default + default: false + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + post: + operationId: connector_create_or_update_workspace_credentials_v1 + summary: Create or update workspace credentials for a connector. + description: Create or update credentials at the workspace level for a given connector. + tags: + - beta.connectors + parameters: + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsCreateOrUpdate' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/user/credentials: + get: + operationId: connector_list_user_credentials_v1 + summary: List user credentials for a connector. + description: List all credentials configured at the user level for a given connector. + tags: + - beta.connectors + parameters: + - name: auth_type + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/OutboundAuthenticationType' + - type: 'null' + title: Auth Type + - name: fetch_default + in: query + required: false + schema: + type: boolean + title: Fetch Default + default: false + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + post: + operationId: connector_create_or_update_user_credentials_v1 + summary: Create or update user credentials for a connector. + description: Create or update credentials at the user level for a given connector. + tags: + - beta.connectors + parameters: + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsCreateOrUpdate' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/organization/credentials/{credentials_name}: + delete: + operationId: connector_delete_organization_credentials_v1 + summary: Delete organization credentials for a connector. + description: Delete credentials at the organization level for a given connector. + tags: + - beta.connectors + parameters: + - name: credentials_name + in: path + required: true + schema: + type: string + title: Credentials Name + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/workspace/credentials/{credentials_name}: + delete: + operationId: connector_delete_workspace_credentials_v1 + summary: Delete workspace credentials for a connector. + description: Delete credentials at the workspace level for a given connector. + tags: + - beta.connectors + parameters: + - name: credentials_name + in: path + required: true + schema: + type: string + title: Credentials Name + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}/user/credentials/{credentials_name}: + delete: + operationId: connector_delete_user_credentials_v1 + summary: Delete user credentials for a connector. + description: Delete credentials at the user level for a given connector. + tags: + - beta.connectors + parameters: + - name: credentials_name + in: path + required: true + schema: + type: string + title: Credentials Name + pattern: ^[a-zA-Z0-9_-]{1,64}$ + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id_or_name}#idOrName: + get: + operationId: connector_get_v1 + summary: Get a connector. + description: Get a connector by its ID or name. + tags: + - beta.connectors + parameters: + - name: fetch_customer_data + in: query + description: Fetch the customer data associated with the connector (e.g. customer secrets / config). + required: false + schema: + type: boolean + title: Fetch Customer Data + description: Fetch the customer data associated with the connector (e.g. customer secrets / config). + default: false + - name: fetch_connection_secrets + in: query + description: Fetch the general connection secrets associated with the connector. + required: false + schema: + type: boolean + title: Fetch Connection Secrets + description: Fetch the general connection secrets associated with the connector. + default: false + - name: connector_id_or_name + in: path + required: true + schema: + type: string + title: Connector Id Or Name + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/Connector' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /v1/connectors/{connector_id}#id: + patch: + operationId: connector_update_v1 + summary: Update a connector. + description: Update a connector by its ID. + tags: + - beta.connectors + parameters: + - name: connector_id + in: path + required: true + schema: + type: string + title: Connector Id + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorMCPUpdate' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/Connector' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + delete: + operationId: connector_delete_v1 + summary: Delete a connector. + description: Delete a connector by its ID. + tags: + - beta.connectors + parameters: + - name: connector_id + in: path + required: true + schema: + type: string + title: Connector Id + format: uuid + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' components: schemas: BaseModelCard: @@ -19640,6 +20336,415 @@ components: - customer_id - workspace_id - active + AuthUrlResponse: + type: object + properties: + auth_url: + type: string + title: Auth Url + ttl: + type: integer + title: Ttl + title: AuthUrlResponse + required: + - auth_url + - ttl + AuthenticationConfiguration: + type: object + properties: + name: + type: string + title: Name + authentication_type: + $ref: '#/components/schemas/OutboundAuthenticationType' + is_default: + type: boolean + title: Is Default + default: false + title: AuthenticationConfiguration + required: + - name + - authentication_type + ConnectionCredentials: + type: object + properties: + oauth: + anyOf: + - $ref: '#/components/schemas/OAuth2Token' + - type: 'null' + headers: + anyOf: + - type: object + additionalProperties: + type: string + - type: 'null' + title: Headers + bearer_token: + anyOf: + - type: string + - type: 'null' + title: Bearer Token + title: ConnectionCredentials + ConnectorAuthenticationHeader: + type: object + properties: + name: + type: string + title: Name + is_required: + type: boolean + title: Is Required + default: true + is_secret: + type: boolean + title: Is Secret + default: true + title: ConnectorAuthenticationHeader + required: + - name + CredentialsCreateOrUpdate: + type: object + properties: + name: + type: string + title: Name + description: Name of the credentials. Use this name to access or modify your + credentials. + is_default: + anyOf: + - type: boolean + - type: 'null' + title: Is Default + description: 'Controls whether this credential is the default for its auth method. + On creation: if no credential exists yet for this auth method, the credential + is automatically set as default when is_default is true or omitted; setting + is_default to false is rejected because a default must exist. If other credentials + already exist, setting is_default to true promotes this credential (demoting + the previous default); false or omitted creates it as non-default. On update: + true promotes this credential, false is rejected if it is currently the default + (promote another credential first), omitted leaves the default status unchanged.' + credentials: + anyOf: + - $ref: '#/components/schemas/ConnectionCredentials' + - type: 'null' + description: The credential data (headers, bearer_token). + title: CredentialsCreateOrUpdate + required: + - name + description: Request to create or update non-OAuth2 credentials for a connector. + CredentialsResponse: + type: object + properties: + credentials: + type: array + items: + $ref: '#/components/schemas/AuthenticationConfiguration' + title: Credentials + connector_preset_credentials_for_auth: + type: array + items: + $ref: '#/components/schemas/OutboundAuthenticationType' + title: Connector Preset Credentials For Auth + default: [] + title: CredentialsResponse + required: + - credentials + MCPSupportedLanguage: + type: string + title: MCPSupportedLanguage + enum: + - en + - fr + - de + - es + - pl + - it + - ar + - pt-BR + - nl + MCPTool: + type: object + properties: + name: + type: string + title: Name + title: + anyOf: + - type: string + - type: 'null' + title: Title + description: + anyOf: + - type: string + - type: 'null' + title: Description + inputSchema: + type: object + title: Inputschema + additionalProperties: true + outputSchema: + anyOf: + - type: object + additionalProperties: true + - type: 'null' + title: Outputschema + icons: + anyOf: + - type: array + items: + $ref: '#/components/schemas/MCPServerIcon' + - type: 'null' + title: Icons + annotations: + anyOf: + - $ref: '#/components/schemas/ToolAnnotations' + - type: 'null' + _meta: + anyOf: + - $ref: '#/components/schemas/MCPToolMeta' + - type: 'null' + execution: + anyOf: + - $ref: '#/components/schemas/ToolExecution' + - type: 'null' + title: MCPTool + required: + - name + - inputSchema + additionalProperties: true + MCPToolMeta: + type: object + properties: + ui: + anyOf: + - $ref: '#/components/schemas/MCPUIToolMeta' + - type: 'null' + ai.mistral/turbine: + anyOf: + - $ref: '#/components/schemas/TurbineToolMeta' + - type: 'null' + title: MCPToolMeta + additionalProperties: true + description: 'Typed _meta for MCP tools. + + + Only the ''ui'' field is typed. Other fields are allowed via extra="allow".' + MCPUIToolMeta: + type: object + properties: + resourceUri: + anyOf: + - type: string + - type: 'null' + title: Resourceuri + visibility: + anyOf: + - type: array + items: + type: string + enum: + - model + - app + - type: 'null' + title: Visibility + title: MCPUIToolMeta + additionalProperties: true + description: UI metadata for tools that reference UI resources. + OAuth2Token: + type: object + properties: + access_token: + type: string + title: Access Token + token_type: + type: string + title: Token Type + default: Bearer + const: Bearer + expires_in: + anyOf: + - type: integer + - type: 'null' + title: Expires In + scope: + anyOf: + - type: string + - type: 'null' + title: Scope + refresh_token: + anyOf: + - type: string + - type: 'null' + title: Refresh Token + expires_at: + anyOf: + - type: string + format: date-time + - type: 'null' + title: Expires At + title: OAuth2Token + required: + - access_token + OutboundAuthenticationType: + type: string + title: OutboundAuthenticationType + enum: + - oauth2 + - bearer + - none + PublicAuthenticationMethod: + type: object + properties: + method_type: + $ref: '#/components/schemas/OutboundAuthenticationType' + headers: + anyOf: + - type: array + items: + $ref: '#/components/schemas/ConnectorAuthenticationHeader' + - type: 'null' + title: Headers + title: PublicAuthenticationMethod + required: + - method_type + description: Public view of an authentication method, without secrets. + ToolAnnotations: + type: object + properties: + title: + anyOf: + - type: string + - type: 'null' + title: Title + readOnlyHint: + anyOf: + - type: boolean + - type: 'null' + title: Readonlyhint + destructiveHint: + anyOf: + - type: boolean + - type: 'null' + title: Destructivehint + idempotentHint: + anyOf: + - type: boolean + - type: 'null' + title: Idempotenthint + openWorldHint: + anyOf: + - type: boolean + - type: 'null' + title: Openworldhint + title: ToolAnnotations + additionalProperties: true + description: 'Additional properties describing a Tool to clients. + + + NOTE: all properties in ToolAnnotations are **hints**. + + They are not guaranteed to provide a faithful description of + + tool behavior (including descriptive properties like `title`). + + + Clients should never make tool use decisions based on ToolAnnotations + + received from untrusted servers.' + ToolExecution: + type: object + properties: + taskSupport: + anyOf: + - type: string + enum: + - forbidden + - optional + - required + - type: 'null' + title: Tasksupport + title: ToolExecution + additionalProperties: true + description: Execution-related properties for a tool. + ToolType: + type: string + title: ToolType + enum: + - rag + - image + - code + - event + TurbineToolLocale: + type: object + properties: + name: + anyOf: + - type: object + propertyNames: + $ref: '#/components/schemas/MCPSupportedLanguage' + additionalProperties: + type: string + - type: 'null' + title: Name + description: + anyOf: + - type: object + propertyNames: + $ref: '#/components/schemas/MCPSupportedLanguage' + additionalProperties: + type: string + - type: 'null' + title: Description + usage_sentence: + anyOf: + - type: object + propertyNames: + $ref: '#/components/schemas/MCPSupportedLanguage' + additionalProperties: + type: string + - type: 'null' + title: Usage Sentence + working_description: + anyOf: + - type: object + propertyNames: + $ref: '#/components/schemas/MCPSupportedLanguage' + additionalProperties: + type: string + - type: 'null' + title: Working Description + done_description: + anyOf: + - type: object + propertyNames: + $ref: '#/components/schemas/MCPSupportedLanguage' + additionalProperties: + type: string + - type: 'null' + title: Done Description + title: TurbineToolLocale + TurbineToolMeta: + type: object + properties: + locale: + anyOf: + - $ref: '#/components/schemas/TurbineToolLocale' + - type: 'null' + tool_type: + anyOf: + - $ref: '#/components/schemas/ToolType' + - type: 'null' + timeout: + anyOf: + - type: number + - type: 'null' + title: Timeout + private_execution: + anyOf: + - type: boolean + - type: 'null' + title: Private Execution + title: TurbineToolMeta securitySchemes: ApiKey: type: http @@ -19744,6 +20849,9 @@ tags: - name: beta.workflows.workers x-displayName: Workers description: Worker connection info. +- name: beta.connectors + x-displayName: (beta) Connectors + description: (beta) Connectors security: - ApiKey: [] servers: