diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs index cf4f047..53ea7a6 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.ReingestAllStores.g.cs @@ -126,13 +126,13 @@ partial void ProcessReingestAllStoresResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs index 185525f..7906455 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.AdminClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class AdminClient : global::Mixedbread.IAdminClient, globa /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs index c6d6c34..e42ac1e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.CreateApiKey.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateApiKeyResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs index c895603..a3107d9 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.DeleteApiKey.g.cs @@ -102,13 +102,13 @@ partial void ProcessDeleteApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessDeleteApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKeyDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKeyDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessDeleteApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKeyDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKeyDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs index 5aaf644..f649336 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.ListApiKeys.g.cs @@ -116,13 +116,13 @@ partial void ProcessListApiKeysResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -166,7 +166,7 @@ partial void ProcessListApiKeysResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKeyListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKeyListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -196,7 +196,7 @@ partial void ProcessListApiKeysResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKeyListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKeyListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs index 64169db..51486e7 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RerollApiKey.g.cs @@ -103,13 +103,13 @@ partial void ProcessRerollApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -153,7 +153,7 @@ partial void ProcessRerollApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKeyCreated.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -183,7 +183,7 @@ partial void ProcessRerollApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKeyCreated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs index 4698fe4..44fc6ea 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RetrieveApiKey.g.cs @@ -102,13 +102,13 @@ partial void ProcessRetrieveApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRetrieveApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRetrieveApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs index 896c8b9..f30fcc8 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.RevokeApiKey.g.cs @@ -102,13 +102,13 @@ partial void ProcessRevokeApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRevokeApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRevokeApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs index 4b97a0d..7a5519f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.UpdateApiKey.g.cs @@ -80,7 +80,7 @@ partial void ProcessUpdateApiKeyResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessUpdateApiKeyResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessUpdateApiKeyResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ApiKey.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessUpdateApiKeyResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs index fc4a1df..356ef57 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ApiKeysClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class ApiKeysClient : global::Mixedbread.IApiKeysClient, g /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs index f256fb3..3308bbd 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetBillingSummary.g.cs @@ -101,7 +101,7 @@ partial void ProcessGetBillingSummaryResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.BillingPeriodSummary.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.BillingPeriodSummary.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -131,7 +131,7 @@ partial void ProcessGetBillingSummaryResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.BillingPeriodSummary.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.BillingPeriodSummary.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs index 47c77cd..7934d2a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetParsingCostHistogram.g.cs @@ -101,7 +101,7 @@ partial void ProcessGetParsingCostHistogramResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -131,7 +131,7 @@ partial void ProcessGetParsingCostHistogramResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs index 21338b8..457796a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.GetStoreCostHistogram.g.cs @@ -97,13 +97,13 @@ partial void ProcessGetStoreCostHistogramResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -147,7 +147,7 @@ partial void ProcessGetStoreCostHistogramResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.CostHistogramResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessGetStoreCostHistogramResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.CostHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs index 0dfa9de..f31f64d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.ListStoreCostInfo.g.cs @@ -101,7 +101,7 @@ partial void ProcessListStoreCostInfoResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreCostListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreCostListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -131,7 +131,7 @@ partial void ProcessListStoreCostInfoResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreCostListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreCostListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs index b22751e..205ea97 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.BillingClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class BillingClient : global::Mixedbread.IBillingClient, g /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs index bebe97e..727f90a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.CompletionsClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class CompletionsClient : global::Mixedbread.ICompletionsC /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs index 2e86e2c..9932208 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.AuthorizeDataSource.g.cs @@ -108,13 +108,13 @@ partial void ProcessAuthorizeDataSourceResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs index aededbd..c71687d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateConnector.g.cs @@ -80,7 +80,7 @@ partial void ProcessCreateConnectorResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessCreateConnectorResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessCreateConnectorResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessCreateConnectorResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs index 558cf83..7c0240a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.CreateDataSource.g.cs @@ -70,7 +70,7 @@ partial void ProcessCreateDataSourceResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -107,13 +107,13 @@ partial void ProcessCreateDataSourceResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -157,7 +157,7 @@ partial void ProcessCreateDataSourceResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -187,7 +187,7 @@ partial void ProcessCreateDataSourceResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs index 4496a6b..26c617c 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteConnector.g.cs @@ -111,13 +111,13 @@ partial void ProcessDeleteConnectorResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -161,7 +161,7 @@ partial void ProcessDeleteConnectorResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceConnectorDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceConnectorDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -191,7 +191,7 @@ partial void ProcessDeleteConnectorResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceConnectorDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceConnectorDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs index a9cd384..0d4bd84 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.DeleteDataSource.g.cs @@ -100,13 +100,13 @@ partial void ProcessDeleteDataSourceResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -150,7 +150,7 @@ partial void ProcessDeleteDataSourceResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -180,7 +180,7 @@ partial void ProcessDeleteDataSourceResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs index 49dc7e6..d058abd 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetConnector.g.cs @@ -111,13 +111,13 @@ partial void ProcessGetConnectorResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -161,7 +161,7 @@ partial void ProcessGetConnectorResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -191,7 +191,7 @@ partial void ProcessGetConnectorResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs index cfb9cf9..236f69e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.GetDataSource.g.cs @@ -102,13 +102,13 @@ partial void ProcessGetDataSourceResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessGetDataSourceResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessGetDataSourceResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs index 99948af..f3502f9 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListConnectors.g.cs @@ -143,13 +143,13 @@ partial void ProcessListConnectorsResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -193,7 +193,7 @@ partial void ProcessListConnectorsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ConnectorListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ConnectorListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -223,7 +223,7 @@ partial void ProcessListConnectorsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ConnectorListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ConnectorListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs index 5c95263..d5fc8c4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.ListDataSources.g.cs @@ -132,13 +132,13 @@ partial void ProcessListDataSourcesResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessListDataSourcesResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -212,7 +212,7 @@ partial void ProcessListDataSourcesResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs index 6302e98..fc70a4e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.Oauth2Callback.g.cs @@ -136,13 +136,13 @@ partial void ProcessOauth2CallbackResponse( if (ReadResponseAsString) { __content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions); + __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext); } else { __content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions); + __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -240,13 +240,13 @@ partial void ProcessOauth2CallbackResponse( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs index 841e7ea..30d60c1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateConnector.g.cs @@ -88,7 +88,7 @@ partial void ProcessUpdateConnectorResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -127,13 +127,13 @@ partial void ProcessUpdateConnectorResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessUpdateConnectorResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSourceConnector.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -207,7 +207,7 @@ partial void ProcessUpdateConnectorResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSourceConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs index bc79cc0..7475b12 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.UpdateDataSource.g.cs @@ -78,7 +78,7 @@ partial void ProcessUpdateDataSourceResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -116,13 +116,13 @@ partial void ProcessUpdateDataSourceResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -166,7 +166,7 @@ partial void ProcessUpdateDataSourceResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.DataSource.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.DataSource.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -196,7 +196,7 @@ partial void ProcessUpdateDataSourceResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.DataSource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs index b5e0766..613304d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.DataSourcesClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class DataSourcesClient : global::Mixedbread.IDataSourcesC /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs index f0ee0f8..3e389a4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateExtractionJob.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateExtractionJobResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateExtractionJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateExtractionJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateExtractionJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs index cad5516..fb09c97 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.CreateSchema.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateSchemaResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateSchemaResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateSchemaResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.CreatedJsonSchema.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.CreatedJsonSchema.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateSchemaResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.CreatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.CreatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs index 0e3bec2..c9e0ec4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.EnhanceSchema.g.cs @@ -72,7 +72,7 @@ partial void ProcessEnhanceSchemaResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessEnhanceSchemaResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessEnhanceSchemaResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.EnhancedJsonSchema.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.EnhancedJsonSchema.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessEnhanceSchemaResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.EnhancedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.EnhancedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs index c5759fa..cc43409 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ExtractContent.g.cs @@ -72,7 +72,7 @@ partial void ProcessExtractContentResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessExtractContentResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessExtractContentResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ExtractionResult.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ExtractionResult.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessExtractContentResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ExtractionResult.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ExtractionResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs index 269c521..f2c9fde 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.RetrieveExtractionJob.g.cs @@ -102,13 +102,13 @@ partial void ProcessRetrieveExtractionJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRetrieveExtractionJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ExtractionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRetrieveExtractionJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs index cc4eac7..c9a683a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.ValidateSchema.g.cs @@ -72,7 +72,7 @@ partial void ProcessValidateSchemaResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessValidateSchemaResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessValidateSchemaResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ValidatedJsonSchema.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ValidatedJsonSchema.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessValidateSchemaResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ValidatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ValidatedJsonSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs index 87d9f8f..b2288d1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ExtractionsClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class ExtractionsClient : global::Mixedbread.IExtractionsC /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs index b126cfd..9b95abb 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.AbortMultipartUpload.g.cs @@ -98,13 +98,13 @@ partial void ProcessAbortMultipartUploadResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -148,7 +148,7 @@ partial void ProcessAbortMultipartUploadResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -178,7 +178,7 @@ partial void ProcessAbortMultipartUploadResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs index 0aeaef7..17d1efa 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CompleteMultipartUpload.g.cs @@ -76,7 +76,7 @@ partial void ProcessCompleteMultipartUploadResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -114,13 +114,13 @@ partial void ProcessCompleteMultipartUploadResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -164,7 +164,7 @@ partial void ProcessCompleteMultipartUploadResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -194,7 +194,7 @@ partial void ProcessCompleteMultipartUploadResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs index 1d9fecd..21c68a4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateFile.g.cs @@ -114,13 +114,13 @@ partial void ProcessCreateFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -164,7 +164,7 @@ partial void ProcessCreateFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -194,7 +194,7 @@ partial void ProcessCreateFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs index c489b95..bda3f39 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.CreateMultipartUpload.g.cs @@ -68,7 +68,7 @@ partial void ProcessCreateMultipartUploadResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -105,13 +105,13 @@ partial void ProcessCreateMultipartUploadResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -155,7 +155,7 @@ partial void ProcessCreateMultipartUploadResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.CreateMultipartUploadResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.CreateMultipartUploadResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -185,7 +185,7 @@ partial void ProcessCreateMultipartUploadResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.CreateMultipartUploadResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.CreateMultipartUploadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs index 927f5c1..00488a0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DeleteFile.g.cs @@ -102,13 +102,13 @@ partial void ProcessDeleteFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessDeleteFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessDeleteFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs index 8ef4661..aeecdfe 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.DownloadFile.g.cs @@ -102,13 +102,13 @@ partial void ProcessDownloadFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs index e1d3a09..fe06b00 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.GetMultipartUpload.g.cs @@ -98,13 +98,13 @@ partial void ProcessGetMultipartUploadResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -148,7 +148,7 @@ partial void ProcessGetMultipartUploadResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MultipartUploadDetailResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MultipartUploadDetailResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -178,7 +178,7 @@ partial void ProcessGetMultipartUploadResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MultipartUploadDetailResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MultipartUploadDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs index c3ddf35..3d036a1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListFiles.g.cs @@ -143,13 +143,13 @@ partial void ProcessListFilesResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -193,7 +193,7 @@ partial void ProcessListFilesResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -223,7 +223,7 @@ partial void ProcessListFilesResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs index 706926e..05e39b0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.ListMultipartUploads.g.cs @@ -102,7 +102,7 @@ partial void ProcessListMultipartUploadsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MultipartUploadListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MultipartUploadListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -132,7 +132,7 @@ partial void ProcessListMultipartUploadsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MultipartUploadListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MultipartUploadListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs index 3384c14..f832475 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.RetrieveFile.g.cs @@ -102,13 +102,13 @@ partial void ProcessRetrieveFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRetrieveFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRetrieveFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs index 888af5b..f5c6906 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.UpdateFile.g.cs @@ -126,13 +126,13 @@ partial void ProcessUpdateFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -176,7 +176,7 @@ partial void ProcessUpdateFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.FileObject.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.FileObject.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -206,7 +206,7 @@ partial void ProcessUpdateFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.FileObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs index c953449..861b755 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.FilesClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class FilesClient : global::Mixedbread.IFilesClient, globa /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs index 1354af0..55583c0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IAdminClient.g.cs @@ -36,7 +36,7 @@ public partial interface IAdminClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs index 07617ef..faf2668 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IApiKeysClient.g.cs @@ -36,7 +36,7 @@ public partial interface IApiKeysClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs index 89cdd8e..ca66cd0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IBillingClient.g.cs @@ -36,7 +36,7 @@ public partial interface IBillingClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs index 504dc25..e2a3100 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ICompletionsClient.g.cs @@ -36,7 +36,7 @@ public partial interface ICompletionsClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs index e3c7349..f039841 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IDataSourcesClient.g.cs @@ -36,7 +36,7 @@ public partial interface IDataSourcesClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs index b91c980..705f678 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IExtractionsClient.g.cs @@ -36,7 +36,7 @@ public partial interface IExtractionsClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs index 40185cb..85c3006 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IFilesClient.g.cs @@ -36,7 +36,7 @@ public partial interface IFilesClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs index 6f53d30..471794b 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs @@ -36,7 +36,7 @@ public partial interface IMixedbreadClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs index feecd1f..7633e0a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IParsingClient.g.cs @@ -36,7 +36,7 @@ public partial interface IParsingClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs index 923624c..f384659 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ISchemasClient.g.cs @@ -36,7 +36,7 @@ public partial interface ISchemasClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs index 067a264..eaac466 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.g.cs @@ -36,7 +36,7 @@ public partial interface IStoresClient : global::System.IDisposable /// /// /// - global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs index 817e1db..487dc01 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf2.g.cs @@ -3,7 +3,7 @@ namespace Mixedbread.JsonConverters { /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter> { /// public override global::Mixedbread.AnyOf Read( @@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); @@ -26,7 +27,27 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization } var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -41,7 +62,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -56,7 +79,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -72,7 +97,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -84,7 +111,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -109,15 +138,20 @@ public override void Write( global::Mixedbread.AnyOf value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsValue1) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); } else if (value.IsValue2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs index b9f60c1..7141b37 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf3.g.cs @@ -3,7 +3,7 @@ namespace Mixedbread.JsonConverters { /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3> : global::System.Text.Json.Serialization.JsonConverter> { /// public override global::Mixedbread.AnyOf Read( @@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); @@ -26,8 +27,38 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa } var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } var __score2 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score2++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -44,7 +75,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -59,7 +92,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -74,7 +109,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -90,7 +127,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -102,7 +141,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -114,7 +155,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa try { - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -141,19 +184,26 @@ public override void Write( global::Mixedbread.AnyOf value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsValue1) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); } else if (value.IsValue2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); } else if (value.IsValue3) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs index f2cdb8b..adecde0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AnyOf4.g.cs @@ -3,7 +3,7 @@ namespace Mixedbread.JsonConverters { /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T4> : global::System.Text.Json.Serialization.JsonConverter> { /// public override global::Mixedbread.AnyOf Read( @@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); @@ -26,9 +27,49 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria } var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } var __score2 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score2++; + } + } + } var __score3 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T4), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score3++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -47,7 +88,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -62,7 +105,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -77,7 +122,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -92,7 +139,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -108,7 +157,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -120,7 +171,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -132,7 +185,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -144,7 +199,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Seria try { - value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + value4 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -173,23 +230,32 @@ public override void Write( global::Mixedbread.AnyOf value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsValue1) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); } else if (value.IsValue2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); } else if (value.IsValue3) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); } else if (value.IsValue4) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeof(T4), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs index 6acacf3..9fa5d63 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant1.g.cs @@ -12,21 +12,28 @@ public class AuthParamsVariant1JsonConverter : global::System.Text.Json.Serializ global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceAuthParamsVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.DataSourceOAuth2Params? oauth2 = default; if (discriminator?.Type == global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType.Oauth2) { - oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceOAuth2Params), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceOAuth2Params)}"); + oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.DataSourceApiKeyParams? apiKey = default; if (discriminator?.Type == global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType.ApiKey) { - apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceApiKeyParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.DataSourceApiKeyParams)}"); + apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.AuthParamsVariant1( @@ -45,15 +52,20 @@ public override void Write( global::Mixedbread.AuthParamsVariant1 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsOauth2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.DataSourceOAuth2Params), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceOAuth2Params), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.DataSourceOAuth2Params).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo); } else if (value.IsApiKey) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey, typeof(global::Mixedbread.DataSourceApiKeyParams), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.DataSourceApiKeyParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.DataSourceApiKeyParams).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs index ab1331e..adf526a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant12.g.cs @@ -12,16 +12,21 @@ public class AuthParamsVariant12JsonConverter : global::System.Text.Json.Seriali global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.OAuth2CreateOrUpdateParams? oauth2 = default; if (discriminator?.Type == global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.Oauth2) { - oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.OAuth2CreateOrUpdateParams)}"); + oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.AuthParamsVariant12( @@ -38,11 +43,14 @@ public override void Write( global::Mixedbread.AuthParamsVariant12 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsOauth2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.OAuth2CreateOrUpdateParams).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs index 6f68b89..59cd691 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.AuthParamsVariant13.g.cs @@ -12,21 +12,28 @@ public class AuthParamsVariant13JsonConverter : global::System.Text.Json.Seriali global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.OAuth2CreateOrUpdateParams? oauth2 = default; if (discriminator?.Type == global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.Oauth2) { - oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.OAuth2CreateOrUpdateParams)}"); + oauth2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ApiKeyCreateOrUpdateParams? apiKey = default; if (discriminator?.Type == global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType.ApiKey) { - apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ApiKeyCreateOrUpdateParams)}"); + apiKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.AuthParamsVariant13( @@ -45,15 +52,20 @@ public override void Write( global::Mixedbread.AuthParamsVariant13 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsOauth2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2, typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.OAuth2CreateOrUpdateParams).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Oauth2!, typeInfo); } else if (value.IsApiKey) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey, typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApiKey!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs index 3777c27..5122357 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item.g.cs @@ -12,31 +12,42 @@ public class ChunksVariant1ItemJsonConverter : global::System.Text.Json.Serializ global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.ChunksVariant1Item( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.ChunksVariant1Item value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs index cb562a8..c5cd330 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item2.g.cs @@ -12,31 +12,42 @@ public class ChunksVariant1Item2JsonConverter : global::System.Text.Json.Seriali global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.ChunksVariant1Item2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.ChunksVariant1Item2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs index 0cbd90d..864f58f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item3.g.cs @@ -12,31 +12,42 @@ public class ChunksVariant1Item3JsonConverter : global::System.Text.Json.Seriali global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.TextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.ChunksVariant1Item3( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.ChunksVariant1Item3 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.ImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.AudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.VideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs index c1b6edc..f140704 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.ChunksVariant1Item4.g.cs @@ -12,31 +12,42 @@ public class ChunksVariant1Item4JsonConverter : global::System.Text.Json.Seriali global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.TextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.ChunksVariant1Item4( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.ChunksVariant1Item4 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.ImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.AudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.VideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs index f645d48..01935a1 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs @@ -12,21 +12,28 @@ public class DataItemJsonConverter : global::System.Text.Json.Serialization.Json global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreEventListResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreEventListResponseDataItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.StoreIngestionEvent? ingestion = default; if (discriminator?.Type == global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType.Ingestion) { - ingestion = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreIngestionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreIngestionEvent)}"); + ingestion = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.StoreSearchEvent? search = default; if (discriminator?.Type == global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType.Search) { - search = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreSearchEvent)}"); + search = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.DataItem( @@ -45,15 +52,20 @@ public override void Write( global::Mixedbread.DataItem value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsIngestion) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ingestion, typeof(global::Mixedbread.StoreIngestionEvent), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreIngestionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreIngestionEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ingestion!, typeInfo); } else if (value.IsSearch) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Search, typeof(global::Mixedbread.StoreSearchEvent), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreSearchEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Search!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs index 038432c..0e18972 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem2.g.cs @@ -12,31 +12,42 @@ public class DataItem2JsonConverter : global::System.Text.Json.Serialization.Jso global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreSearchResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreSearchResponseDataItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.DataItem2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.DataItem2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs index d859ef5..e21a363 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem3.g.cs @@ -12,31 +12,42 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.DataItem3( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.DataItem3 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs index 0017032..4a6ce39 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule.g.cs @@ -12,31 +12,42 @@ public class DeletedRuleJsonConverter : global::System.Text.Json.Serialization.J global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.DeletedRule( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.DeletedRule value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs index 3da2a65..ef1ce7a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DeletedRule2.g.cs @@ -12,31 +12,42 @@ public class DeletedRule2JsonConverter : global::System.Text.Json.Serialization. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.DeletedRule2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.DeletedRule2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs index 7197241..84b2845 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.EmbeddingItem.g.cs @@ -12,7 +12,8 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); @@ -27,8 +28,38 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization } var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } var __score2 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score2++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -45,7 +76,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -60,7 +93,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -75,7 +110,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -91,7 +128,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + embeddingItemVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -103,7 +142,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize>(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + embeddingItemVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -115,7 +156,9 @@ public class EmbeddingItemJsonConverter : global::System.Text.Json.Serialization try { - embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + embeddingItemVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -142,19 +185,26 @@ public override void Write( global::Mixedbread.EmbeddingItem value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsEmbeddingItemVariant1) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant1, typeof(global::System.Collections.Generic.IList), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant1!, typeInfo); } else if (value.IsEmbeddingItemVariant2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant2, typeof(global::System.Collections.Generic.IList), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant2!, typeInfo); } else if (value.IsEmbeddingItemVariant3) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant3, typeof(string), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingItemVariant3!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant1.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant1.g.cs index e08fbc4..e62278b 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant1.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant1.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant1JsonConverter : global::System.Text.Json.S global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant1( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant1 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant110.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant110.g.cs index fd34ad5..01d267a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant110.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant110.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant110JsonConverter : global::System.Text.Json global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant110( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant110 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant111.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant111.g.cs index d38426c..eb4cbca 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant111.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant111.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant111JsonConverter : global::System.Text.Json global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant111( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant111 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant112.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant112.g.cs index a1e1b56..d67b249 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant112.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant112.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant112JsonConverter : global::System.Text.Json global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant112( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant112 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant12.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant12.g.cs index 2026cce..7e03d14 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant12.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant12.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant12JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant12( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant12 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant13.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant13.g.cs index 34ed946..bd2f96f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant13.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant13.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant13JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant13( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant13 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant14.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant14.g.cs index b69e3a0..63c0c24 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant14.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant14.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant14JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant14( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant14 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant15.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant15.g.cs index f107e04..c673148 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant15.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant15.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant15JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant15( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant15 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant16.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant16.g.cs index 582e1c6..67ec230 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant16.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant16.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant16JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant16( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant16 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant17.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant17.g.cs index c228dae..4ba6d16 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant17.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant17.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant17JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant17( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant17 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant18.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant18.g.cs index 80354dd..205670d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant18.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant18.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant18JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant18( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant18 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant19.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant19.g.cs index f1f4b93..fb2cd22 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant19.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.GeneratedMetadataVariant19.g.cs @@ -12,46 +12,63 @@ public class GeneratedMetadataVariant19JsonConverter : global::System.Text.Json. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MarkdownChunkGeneratedMetadata? markdown = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Markdown) { - markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MarkdownChunkGeneratedMetadata)}"); + markdown = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextChunkGeneratedMetadata? text = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextChunkGeneratedMetadata)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.PDFChunkGeneratedMetadata? pdf = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Pdf) { - pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.PDFChunkGeneratedMetadata)}"); + pdf = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.CodeChunkGeneratedMetadata? code = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Code) { - code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.CodeChunkGeneratedMetadata)}"); + code = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.AudioChunkGeneratedMetadata? audio = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Audio) { - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.AudioChunkGeneratedMetadata)}"); + audio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.VideoChunkGeneratedMetadata? video = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Video) { - video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VideoChunkGeneratedMetadata)}"); + video = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ImageChunkGeneratedMetadata? image = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType.Image) { - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageChunkGeneratedMetadata)}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.GeneratedMetadataVariant19( @@ -80,35 +97,50 @@ public override void Write( global::Mixedbread.GeneratedMetadataVariant19 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMarkdown) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown, typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Markdown!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsPdf) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf, typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.PDFChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.PDFChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Pdf!, typeInfo); } else if (value.IsCode) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code, typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.CodeChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.CodeChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Code!, typeInfo); } else if (value.IsAudio) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.AudioChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.AudioChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio!, typeInfo); } else if (value.IsVideo) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video, typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VideoChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.VideoChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Video!, typeInfo); } else if (value.IsImage) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageChunkGeneratedMetadata), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageChunkGeneratedMetadata).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQuery.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQuery.g.cs index d996924..904a2f7 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQuery.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQuery.g.cs @@ -12,7 +12,8 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); @@ -27,7 +28,27 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati } var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MultiModalQueryVariant2), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } @@ -42,7 +63,9 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati try { - multiModalQueryVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + multiModalQueryVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -57,7 +80,9 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati try { - multiModalQueryVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MultiModalQueryVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MultiModalQueryVariant2).Name}"); + multiModalQueryVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -73,7 +98,9 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati try { - multiModalQueryVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + multiModalQueryVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -85,7 +112,9 @@ public class MultiModalQueryJsonConverter : global::System.Text.Json.Serializati try { - multiModalQueryVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MultiModalQueryVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MultiModalQueryVariant2).Name}"); + multiModalQueryVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -110,15 +139,20 @@ public override void Write( global::Mixedbread.MultiModalQuery value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsMultiModalQueryVariant1) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MultiModalQueryVariant1, typeof(string), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MultiModalQueryVariant1!, typeInfo); } else if (value.IsMultiModalQueryVariant2) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MultiModalQueryVariant2, typeof(global::Mixedbread.MultiModalQueryVariant2), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MultiModalQueryVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MultiModalQueryVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MultiModalQueryVariant2!.Value, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQueryVariant2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQueryVariant2.g.cs index 79c4ca0..e979118 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQueryVariant2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.MultiModalQueryVariant2.g.cs @@ -12,21 +12,28 @@ public class MultiModalQueryVariant2JsonConverter : global::System.Text.Json.Ser global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MultiModalQueryVariant2Discriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MultiModalQueryVariant2Discriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.ImageUrlInput2? imageUrl = default; if (discriminator?.Type == global::Mixedbread.MultiModalQueryVariant2DiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInput2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ImageUrlInput2)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.TextInput? text = default; if (discriminator?.Type == global::Mixedbread.MultiModalQueryVariant2DiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.TextInput)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.MultiModalQueryVariant2( @@ -45,15 +52,20 @@ public override void Write( global::Mixedbread.MultiModalQueryVariant2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.ImageUrlInput2), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ImageUrlInput2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ImageUrlInput2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.TextInput), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.TextInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.TextInput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule.g.cs index 98b7a59..2c9dbe8 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule.g.cs @@ -12,31 +12,42 @@ public class RuleJsonConverter : global::System.Text.Json.Serialization.JsonConv global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.Rule( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.Rule value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule2.g.cs index 18d1587..d78e516 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Rule2.g.cs @@ -12,31 +12,42 @@ public class Rule2JsonConverter : global::System.Text.Json.Serialization.JsonCon global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.Rule2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.Rule2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem.g.cs index 972d705..ee4873e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem.g.cs @@ -12,31 +12,42 @@ public class RulesItemJsonConverter : global::System.Text.Json.Serialization.Jso global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesItem( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesItem value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem2.g.cs index f5f5490..a95c041 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem2.g.cs @@ -12,31 +12,42 @@ public class RulesItem2JsonConverter : global::System.Text.Json.Serialization.Js global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesItem2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesItem2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem3.g.cs index 091e08a..fdf97b6 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem3.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem3.g.cs @@ -12,31 +12,42 @@ public class RulesItem3JsonConverter : global::System.Text.Json.Serialization.Js global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesItem3( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesItem3 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem4.g.cs index 21af54f..1313377 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem4.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesItem4.g.cs @@ -12,31 +12,42 @@ public class RulesItem4JsonConverter : global::System.Text.Json.Serialization.Js global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesItem4( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesItem4 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item.g.cs index af455db..413a2d0 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item.g.cs @@ -12,31 +12,42 @@ public class RulesVariant1ItemJsonConverter : global::System.Text.Json.Serializa global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesVariant1Item( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesVariant1Item value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item2.g.cs index 675e1a3..06dc17e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.RulesVariant1Item2.g.cs @@ -12,31 +12,42 @@ public class RulesVariant1Item2JsonConverter : global::System.Text.Json.Serializ global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.QueryStringSubstitutionRule? queryString = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.QueryString) { - queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryStringSubstitutionRule)}"); + queryString = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.QueryRegexSubstitutionRule? queryRegex = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.QueryRegex) { - queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.QueryRegexSubstitutionRule)}"); + queryRegex = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.ChunkSearchResultRule? chunkSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.ChunkSearchResult) { - chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.ChunkSearchResultRule)}"); + chunkSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.FileSearchResultRule? fileSearchResult = default; if (discriminator?.Type == global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType.FileSearchResult) { - fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.FileSearchResultRule)}"); + fileSearchResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.RulesVariant1Item2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.RulesVariant1Item2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsQueryString) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString, typeof(global::Mixedbread.QueryStringSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryStringSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryStringSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryString!, typeInfo); } else if (value.IsQueryRegex) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex, typeof(global::Mixedbread.QueryRegexSubstitutionRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.QueryRegexSubstitutionRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.QueryRegexSubstitutionRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueryRegex!, typeInfo); } else if (value.IsChunkSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult, typeof(global::Mixedbread.ChunkSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.ChunkSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.ChunkSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChunkSearchResult!, typeInfo); } else if (value.IsFileSearchResult) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult, typeof(global::Mixedbread.FileSearchResultRule), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.FileSearchResultRule), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.FileSearchResultRule).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchResult!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem.g.cs index 10d02a9..9de6eb2 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem.g.cs @@ -12,31 +12,42 @@ public class SourcesItemJsonConverter : global::System.Text.Json.Serialization.J global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreQAResultsSourceDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreQAResultsSourceDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.StoreQAResultsSourceDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.StoreQAResultsSourceDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.StoreQAResultsSourceDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.StoreQAResultsSourceDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.SourcesItem( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.SourcesItem value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem2.g.cs index 4354933..2bb999a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem2.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.SourcesItem2.g.cs @@ -12,31 +12,42 @@ public class SourcesItem2JsonConverter : global::System.Text.Json.Serialization. global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var readerCopy = reader; - var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.VectorStoreQAResultsSourceDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.VectorStoreQAResultsSourceDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? text = default; if (discriminator?.Type == global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType.Text) { - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk)}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? imageUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType.ImageUrl) { - imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? audioUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType.AudioUrl) { - audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? videoUrl = default; if (discriminator?.Type == global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType.VideoUrl) { - videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var __value = new global::Mixedbread.SourcesItem2( @@ -59,23 +70,32 @@ public override void Write( global::Mixedbread.SourcesItem2 value, global::System.Text.Json.JsonSerializerOptions options) { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); if (value.IsText) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); } else if (value.IsImageUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); } else if (value.IsAudioUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); } else if (value.IsVideoUrl) { - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl, typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); } } } diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContext.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContext.g.cs new file mode 100644 index 0000000..4f35467 --- /dev/null +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContext.g.cs @@ -0,0 +1,958 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Mixedbread +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + typeof(global::Mixedbread.JsonConverters.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunkingStrategyJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunkingStrategyNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ConditionOperatorJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ConditionOperatorNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataSourceAuthParamsVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataSourceAuthParamsVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataSourceTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataSourceTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ElementTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ElementTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.EncodingFormat3JsonConverter), + + typeof(global::Mixedbread.JsonConverters.EncodingFormat3NullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ModeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ModeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MultiModalQueryVariant2DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MultiModalQueryVariant2DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ParsingJobStatusJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ParsingJobStatusNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.RegexFlagJsonConverter), + + typeof(global::Mixedbread.JsonConverters.RegexFlagNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ReturnFormatJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ReturnFormatNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScopeMethodJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScopeMethodNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScoredStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScoredStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreEventHistogramBucketTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreEventHistogramBucketTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreEventListResponseDataItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreEventListResponseDataItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileParsingStrategyJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileParsingStrategyNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileStatusJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreFileStatusNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreQAResultsSourceDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreQAResultsSourceDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreSearchResponseDataItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreSearchResponseDataItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreStatusJsonConverter), + + typeof(global::Mixedbread.JsonConverters.StoreStatusNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.SyncStatusJsonConverter), + + typeof(global::Mixedbread.JsonConverters.SyncStatusNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.TextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.TextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreFileStatusJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreFileStatusNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreQAResultsSourceDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreQAResultsSourceDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreSearchResponseDataItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VectorStoreSearchResponseDataItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ListStoreEventsEventTypeJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ListStoreEventsEventTypeNullableJsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant1JsonConverter), + + typeof(global::Mixedbread.JsonConverters.AuthParamsVariant1JsonConverter), + + typeof(global::Mixedbread.JsonConverters.EmbeddingItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant12JsonConverter), + + typeof(global::Mixedbread.JsonConverters.AuthParamsVariant12JsonConverter), + + typeof(global::Mixedbread.JsonConverters.MultiModalQueryJsonConverter), + + typeof(global::Mixedbread.JsonConverters.MultiModalQueryVariant2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.AuthParamsVariant13JsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunksVariant1ItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunksVariant1Item2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunksVariant1Item3JsonConverter), + + typeof(global::Mixedbread.JsonConverters.SourcesItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataItem2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant13JsonConverter), + + typeof(global::Mixedbread.JsonConverters.ChunksVariant1Item4JsonConverter), + + typeof(global::Mixedbread.JsonConverters.SourcesItem2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.DataItem3JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant14JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant15JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant16JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant17JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant18JsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesItem2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.RuleJsonConverter), + + typeof(global::Mixedbread.JsonConverters.DeletedRuleJsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesVariant1ItemJsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesItem3JsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesItem4JsonConverter), + + typeof(global::Mixedbread.JsonConverters.Rule2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.DeletedRule2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.RulesVariant1Item2JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant19JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant110JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant111JsonConverter), + + typeof(global::Mixedbread.JsonConverters.GeneratedMetadataVariant112JsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter>), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.AnyOfJsonConverter), + + typeof(global::Mixedbread.JsonConverters.UnixTimestampJsonConverter), + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AgenticSearchConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKey))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Scope))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyCreateOrUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyCreated))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.PaginationWithTotal))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ApiKeyUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AudioChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AudioUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AudioUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MarkdownChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.TextChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.PDFChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CodeChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VideoChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageChunkGeneratedMetadata))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.BalanceInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.BillingPeriodSummary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Period))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CostInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.UsageInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.BodyCreateFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.BodyUpdateFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.BodyUploadStoreFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Chunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunkElement))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ElementType), TypeInfoPropertyName = "ElementType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunkSearchResultRule))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunkingStrategy), TypeInfoPropertyName = "ChunkingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CompleteMultipartUploadRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipartUploadPart))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ConditionOperator), TypeInfoPropertyName = "ConditionOperator2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ConnectorListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CursorPaginationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceConnector))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ContextualizationConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>), TypeInfoPropertyName = "AnyOfBooleanIListString2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CostHistogramResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DailyCostBucket))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.PhaseCostInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ProductCostInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CreateMultipartUploadRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CreateMultipartUploadResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipartUploadPartUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.CreatedJsonSchema))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceType), TypeInfoPropertyName = "DataSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AuthParamsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceOAuth2Params))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceApiKeyParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceAuthParamsVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType), TypeInfoPropertyName = "DataSourceAuthParamsVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SyncStatus), TypeInfoPropertyName = "SyncStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceConnectorCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfInt32StringObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceConnectorDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceConnectorUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataSourceListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DeprecatedStoreFileUpsertParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileConfig2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DocumentParserResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ReturnFormat), TypeInfoPropertyName = "ReturnFormat2")] + [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.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Embedding))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.EmbeddingItem), TypeInfoPropertyName = "EmbeddingItem2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.EmbeddingCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>), TypeInfoPropertyName = "AnyOfStringIListString2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>), TypeInfoPropertyName = "AnyOfEncodingFormat3IListEncodingFormat32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.EncodingFormat3), TypeInfoPropertyName = "EncodingFormat32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.EmbeddingCreateResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Usage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf, global::System.Collections.Generic.IList>), TypeInfoPropertyName = "AnyOfIListEmbeddingIListMultiEncodingEmbedding2")] + [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::Mixedbread.MultiEncodingEmbedding))] + [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::Mixedbread.EnhancedJsonSchema))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ErrorResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.InnerErrorResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ExpiresAfter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ExtractContentCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf, global::System.Collections.Generic.IList>>), TypeInfoPropertyName = "AnyOfStringIListStringIListAnyOfTextInputImageUrlInput22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfTextInputImageUrlInput22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.TextInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlInput2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ExtractJobCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ExtractionJob))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJobStatus), TypeInfoPropertyName = "ParsingJobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ExtractionResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.FileCounts))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.FileDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.FileListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.FileObject))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.FileSearchResultRule))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.HTTPValidationError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ValidationError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.InfoResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.JsonSchemaCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.JsonSchemaEnhanceParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.JsonSchemaValidateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.LinearDataSourceCreateOrUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AuthParamsVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.OAuth2CreateOrUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType), TypeInfoPropertyName = "LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MarkdownHeading))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MetadataCursorPagination))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileStatus), TypeInfoPropertyName = "StoreFileStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>, object>), TypeInfoPropertyName = "AnyOfSearchFilterSearchFilterConditionIListAnyOfSearchFilterSearchFilterConditionObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SearchFilter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SearchFilterCondition))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfSearchFilterSearchFilterCondition2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MetadataFacets))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MetadataFacetsParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfStringGuid2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf, object>), TypeInfoPropertyName = "AnyOfByteArrayIListGuidObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreChunkSearchOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Mode), TypeInfoPropertyName = "Mode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipleEncodingsEmbeddingItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultiModalQuery), TypeInfoPropertyName = "MultiModalQuery2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultiModalQueryVariant2), TypeInfoPropertyName = "MultiModalQueryVariant22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultiModalQueryVariant2Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultiModalQueryVariant2DiscriminatorType), TypeInfoPropertyName = "MultiModalQueryVariant2DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipartUploadDetailResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipartUploadListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MultipartUploadObject))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.NotionDataSourceCreateOrUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AuthParamsVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType), TypeInfoPropertyName = "NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJob))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJobCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJobDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJobListItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ParsingJobListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.QueryRegexSubstitutionRule))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RegexFlag), TypeInfoPropertyName = "RegexFlag2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.QueryStringSubstitutionRule))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.QuestionAnsweringOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RankedDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RerankConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RerankParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>), TypeInfoPropertyName = "AnyOfStringObjectIListObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RerankResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScopeMethod), TypeInfoPropertyName = "ScopeMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfStringGuidObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredStoreFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunksVariant1Item), TypeInfoPropertyName = "ChunksVariant1Item2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType), TypeInfoPropertyName = "ScoredStoreFileChunksVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredVectorStoreFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunksVariant1Item2), TypeInfoPropertyName = "ChunksVariant1Item22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType), TypeInfoPropertyName = "ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SearchCursorPagination))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Store))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreConfig2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreStatus), TypeInfoPropertyName = "StoreStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfBooleanRerankConfigObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfBooleanAgenticSearchConfigObject2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreChunkSearchParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfBooleanContextualizationConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreCostInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreCostListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventHistogramBucket))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventHistogramBucketType), TypeInfoPropertyName = "StoreEventHistogramBucketType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventHistogramParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventHistogramResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataItem), TypeInfoPropertyName = "DataItem2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreIngestionEvent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreSearchEvent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventListResponseDataItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType), TypeInfoPropertyName = "StoreEventListResponseDataItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunksVariant1Item3), TypeInfoPropertyName = "ChunksVariant1Item32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.TextInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VideoUrlInputChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType), TypeInfoPropertyName = "StoreFileChunksVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileParsingStrategy), TypeInfoPropertyName = "StoreFileParsingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileMetadataUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileSearchOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileSearchParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreFileSearchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreQAParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreQAResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SourcesItem), TypeInfoPropertyName = "SourcesItem2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreQAResultsSourceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreQAResultsSourceDiscriminatorType), TypeInfoPropertyName = "StoreQAResultsSourceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreSearchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataItem2), TypeInfoPropertyName = "DataItem22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreSearchResponseDataItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType), TypeInfoPropertyName = "StoreSearchResponseDataItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.StoreUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant13))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.TextInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "TextInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ValidatedJsonSchema))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfStringInt322")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStore))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreChunkSearchOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreChunkSearchParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFile))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ChunksVariant1Item4), TypeInfoPropertyName = "ChunksVariant1Item42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType), TypeInfoPropertyName = "VectorStoreFileChunksVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileSearchOptions))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileSearchParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileSearchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreFileStatus), TypeInfoPropertyName = "VectorStoreFileStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreListResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreQAParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreQAResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.SourcesItem2), TypeInfoPropertyName = "SourcesItem22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreQAResultsSourceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType), TypeInfoPropertyName = "VectorStoreQAResultsSourceDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreSearchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DataItem3), TypeInfoPropertyName = "DataItem32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType), TypeInfoPropertyName = "VectorStoreSearchResponseDataItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VectorStoreUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VideoUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant14))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant15))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant16))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant17))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant18))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesItem), TypeInfoPropertyName = "RulesItem2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesItem2), TypeInfoPropertyName = "RulesItem22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Rule), TypeInfoPropertyName = "Rule2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DeletedRule), TypeInfoPropertyName = "DeletedRule2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesVariant1Item), TypeInfoPropertyName = "RulesVariant1Item2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesItem3), TypeInfoPropertyName = "RulesItem32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesItem4), TypeInfoPropertyName = "RulesItem42")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.Rule2), TypeInfoPropertyName = "Rule22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.DeletedRule2), TypeInfoPropertyName = "DeletedRule22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.RulesVariant1Item2), TypeInfoPropertyName = "RulesVariant1Item22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType), TypeInfoPropertyName = "MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant19))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant110))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant111))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.GeneratedMetadataVariant112))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType), TypeInfoPropertyName = "MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf), TypeInfoPropertyName = "AnyOfNotionDataSourceCreateOrUpdateParamsLinearDataSourceCreateOrUpdateParams2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.ListStoreEventsEventType), TypeInfoPropertyName = "ListStoreEventsEventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>), TypeInfoPropertyName = "AnyOfBooleanIListInt322")] + [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))] + [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::Mixedbread.AnyOf>))] + [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::Mixedbread.AnyOf>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Mixedbread.AnyOf, 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::Mixedbread.AnyOf, 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::Mixedbread.AnyOf>, object>))] + [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::Mixedbread.AnyOf, object>))] + [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::Mixedbread.AnyOf>))] + [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))] + [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))] + [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::Mixedbread.AnyOf>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + } +} \ No newline at end of file diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContextTypes.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContextTypes.g.cs new file mode 100644 index 0000000..a3c43f5 --- /dev/null +++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonSerializerContextTypes.g.cs @@ -0,0 +1,1858 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Mixedbread +{ + /// + /// + /// + public sealed partial class JsonSerializerContextTypes + { + /// + /// + /// + public global::System.Collections.Generic.Dictionary? StringStringDictionary { get; set; } + + /// + /// + /// + public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + + /// + /// + /// + public global::System.Text.Json.JsonElement? JsonElement { get; set; } + + /// + /// + /// + public global::Mixedbread.AgenticSearchConfig? Type0 { get; set; } + /// + /// + /// + public int? Type1 { get; set; } + /// + /// + /// + public string? Type2 { get; set; } + /// + /// + /// + public object? Type3 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKey? Type4 { get; set; } + /// + /// + /// + public global::System.DateTime? Type5 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type6 { get; set; } + /// + /// + /// + public global::Mixedbread.Scope? Type7 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyCreateOrUpdateParams? Type8 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyCreateParams? Type9 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyCreated? Type10 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyDeleted? Type11 { get; set; } + /// + /// + /// + public bool? Type12 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyListResponse? Type13 { get; set; } + /// + /// + /// + public global::Mixedbread.PaginationWithTotal? Type14 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type15 { get; set; } + /// + /// + /// + public global::Mixedbread.ApiKeyUpdateParams? Type16 { get; set; } + /// + /// + /// + public global::Mixedbread.AudioChunkGeneratedMetadata? Type17 { get; set; } + /// + /// + /// + public double? Type18 { get; set; } + /// + /// + /// + public global::Mixedbread.AudioUrl? Type19 { get; set; } + /// + /// + /// + public global::Mixedbread.AudioUrlInputChunk? Type20 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant1? Type21 { get; set; } + /// + /// + /// + public global::Mixedbread.MarkdownChunkGeneratedMetadata? Type22 { get; set; } + /// + /// + /// + public global::Mixedbread.TextChunkGeneratedMetadata? Type23 { get; set; } + /// + /// + /// + public global::Mixedbread.PDFChunkGeneratedMetadata? Type24 { get; set; } + /// + /// + /// + public global::Mixedbread.CodeChunkGeneratedMetadata? Type25 { get; set; } + /// + /// + /// + public global::Mixedbread.VideoChunkGeneratedMetadata? Type26 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageChunkGeneratedMetadata? Type27 { get; set; } + /// + /// + /// + public global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1Discriminator? Type28 { get; set; } + /// + /// + /// + public global::Mixedbread.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type29 { get; set; } + /// + /// + /// + public global::Mixedbread.BalanceInfo? Type30 { get; set; } + /// + /// + /// + public global::Mixedbread.BillingPeriodSummary? Type31 { get; set; } + /// + /// + /// + public global::Mixedbread.Period? Type32 { get; set; } + /// + /// + /// + public global::Mixedbread.CostInfo? Type33 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type34 { get; set; } + /// + /// + /// + public global::Mixedbread.UsageInfo? Type35 { get; set; } + /// + /// + /// + public global::Mixedbread.BodyCreateFile? Type36 { get; set; } + /// + /// + /// + public byte[]? Type37 { get; set; } + /// + /// + /// + public global::Mixedbread.BodyUpdateFile? Type38 { get; set; } + /// + /// + /// + public global::Mixedbread.BodyUploadStoreFile? Type39 { get; set; } + /// + /// + /// + public global::Mixedbread.Chunk? Type40 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type41 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunkElement? Type42 { get; set; } + /// + /// + /// + public global::Mixedbread.ElementType? Type43 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunkSearchResultRule? Type44 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunkingStrategy? Type45 { get; set; } + /// + /// + /// + public global::Mixedbread.CompleteMultipartUploadRequest? Type46 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type47 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipartUploadPart? Type48 { get; set; } + /// + /// + /// + public global::Mixedbread.ConditionOperator? Type49 { get; set; } + /// + /// + /// + public global::Mixedbread.ConnectorListResponse? Type50 { get; set; } + /// + /// + /// + public global::Mixedbread.CursorPaginationResponse? Type51 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type52 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceConnector? Type53 { get; set; } + /// + /// + /// + public global::Mixedbread.ContextualizationConfig? Type54 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? Type55 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type56 { get; set; } + /// + /// + /// + public global::Mixedbread.CostHistogramResponse? Type57 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type58 { get; set; } + /// + /// + /// + public global::Mixedbread.DailyCostBucket? Type59 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type60 { get; set; } + /// + /// + /// + public global::Mixedbread.PhaseCostInfo? Type61 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type62 { get; set; } + /// + /// + /// + public global::Mixedbread.ProductCostInfo? Type63 { get; set; } + /// + /// + /// + public global::Mixedbread.CreateMultipartUploadRequest? Type64 { get; set; } + /// + /// + /// + public long? Type65 { get; set; } + /// + /// + /// + public global::Mixedbread.CreateMultipartUploadResponse? Type66 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type67 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipartUploadPartUrl? Type68 { get; set; } + /// + /// + /// + public global::Mixedbread.CreatedJsonSchema? Type69 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type70 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSource? Type71 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceType? Type72 { get; set; } + /// + /// + /// + public global::Mixedbread.AuthParamsVariant1? Type73 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceOAuth2Params? Type74 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceApiKeyParams? Type75 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceAuthParamsVariant1Discriminator? Type76 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceAuthParamsVariant1DiscriminatorType? Type77 { get; set; } + /// + /// + /// + public global::Mixedbread.SyncStatus? Type78 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceConnectorCreateParams? Type79 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type80 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceConnectorDeleted? Type81 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceConnectorUpdateParams? Type82 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceDeleted? Type83 { get; set; } + /// + /// + /// + public global::Mixedbread.DataSourceListResponse? Type84 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type85 { get; set; } + /// + /// + /// + public global::Mixedbread.DeprecatedStoreFileUpsertParams? Type86 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileConfig2? Type87 { get; set; } + /// + /// + /// + public global::System.Guid? Type88 { get; set; } + /// + /// + /// + public global::Mixedbread.DocumentParserResult? Type89 { get; set; } + /// + /// + /// + public global::Mixedbread.ReturnFormat? Type90 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type91 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type92 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type93 { get; set; } + /// + /// + /// + public global::Mixedbread.Embedding? Type94 { get; set; } + /// + /// + /// + public global::Mixedbread.EmbeddingItem? Type95 { get; set; } + /// + /// + /// + public global::Mixedbread.EmbeddingCreateParams? Type96 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? Type97 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? Type98 { get; set; } + /// + /// + /// + public global::Mixedbread.EncodingFormat3? Type99 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type100 { get; set; } + /// + /// + /// + public global::Mixedbread.EmbeddingCreateResponse? Type101 { get; set; } + /// + /// + /// + public global::Mixedbread.Usage? Type102 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, global::System.Collections.Generic.IList>? Type103 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type104 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type105 { get; set; } + /// + /// + /// + public global::Mixedbread.MultiEncodingEmbedding? Type106 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type107 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type108 { get; set; } + /// + /// + /// + public global::Mixedbread.EnhancedJsonSchema? Type109 { get; set; } + /// + /// + /// + public global::Mixedbread.ErrorResponse? Type110 { get; set; } + /// + /// + /// + public global::Mixedbread.InnerErrorResponse? Type111 { get; set; } + /// + /// + /// + public global::Mixedbread.ExpiresAfter? Type112 { get; set; } + /// + /// + /// + public global::Mixedbread.ExtractContentCreateParams? Type113 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, global::System.Collections.Generic.IList>>? Type114 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type115 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type116 { get; set; } + /// + /// + /// + public global::Mixedbread.TextInput? Type117 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlInput2? Type118 { get; set; } + /// + /// + /// + public global::Mixedbread.ExtractJobCreateParams? Type119 { get; set; } + /// + /// + /// + public global::Mixedbread.ExtractionJob? Type120 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJobStatus? Type121 { get; set; } + /// + /// + /// + public global::Mixedbread.ExtractionResult? Type122 { get; set; } + /// + /// + /// + public global::Mixedbread.FileCounts? Type123 { get; set; } + /// + /// + /// + public global::Mixedbread.FileDeleted? Type124 { get; set; } + /// + /// + /// + public global::Mixedbread.FileListResponse? Type125 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type126 { get; set; } + /// + /// + /// + public global::Mixedbread.FileObject? Type127 { get; set; } + /// + /// + /// + public global::Mixedbread.FileSearchResultRule? Type128 { get; set; } + /// + /// + /// + public global::Mixedbread.HTTPValidationError? Type129 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type130 { get; set; } + /// + /// + /// + public global::Mixedbread.ValidationError? Type131 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlInput? Type132 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlOutput? Type133 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlInputChunk? Type134 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant12? Type135 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1Discriminator? Type136 { get; set; } + /// + /// + /// + public global::Mixedbread.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type137 { get; set; } + /// + /// + /// + public global::Mixedbread.InfoResponse? Type138 { get; set; } + /// + /// + /// + public global::Mixedbread.JsonSchemaCreateParams? Type139 { get; set; } + /// + /// + /// + public global::Mixedbread.JsonSchemaEnhanceParams? Type140 { get; set; } + /// + /// + /// + public global::Mixedbread.JsonSchemaValidateParams? Type141 { get; set; } + /// + /// + /// + public global::Mixedbread.LinearDataSourceCreateOrUpdateParams? Type142 { get; set; } + /// + /// + /// + public global::Mixedbread.AuthParamsVariant12? Type143 { get; set; } + /// + /// + /// + public global::Mixedbread.OAuth2CreateOrUpdateParams? Type144 { get; set; } + /// + /// + /// + public global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator? Type145 { get; set; } + /// + /// + /// + public global::Mixedbread.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType? Type146 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type147 { get; set; } + /// + /// + /// + public global::Mixedbread.MarkdownHeading? Type148 { get; set; } + /// + /// + /// + public global::Mixedbread.MetadataCursorPagination? Type149 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type150 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileStatus? Type151 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>, object>? Type152 { get; set; } + /// + /// + /// + public global::Mixedbread.SearchFilter? Type153 { get; set; } + /// + /// + /// + public global::Mixedbread.SearchFilterCondition? Type154 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type155 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type156 { get; set; } + /// + /// + /// + public global::Mixedbread.MetadataFacets? Type157 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type158 { get; set; } + /// + /// + /// + public global::Mixedbread.MetadataFacetsParams? Type159 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type160 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type161 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, object>? Type162 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type163 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreChunkSearchOptions? Type164 { get; set; } + /// + /// + /// + public global::Mixedbread.Mode? Type165 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipleEncodingsEmbeddingItem? Type166 { get; set; } + /// + /// + /// + public global::Mixedbread.MultiModalQuery? Type167 { get; set; } + /// + /// + /// + public global::Mixedbread.MultiModalQueryVariant2? Type168 { get; set; } + /// + /// + /// + public global::Mixedbread.MultiModalQueryVariant2Discriminator? Type169 { get; set; } + /// + /// + /// + public global::Mixedbread.MultiModalQueryVariant2DiscriminatorType? Type170 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipartUploadDetailResponse? Type171 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipartUploadListResponse? Type172 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type173 { get; set; } + /// + /// + /// + public global::Mixedbread.MultipartUploadObject? Type174 { get; set; } + /// + /// + /// + public global::Mixedbread.NotionDataSourceCreateOrUpdateParams? Type175 { get; set; } + /// + /// + /// + public global::Mixedbread.AuthParamsVariant13? Type176 { get; set; } + /// + /// + /// + public global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1Discriminator? Type177 { get; set; } + /// + /// + /// + public global::Mixedbread.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorType? Type178 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJob? Type179 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJobCreateParams? Type180 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJobDeleted? Type181 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJobListItem? Type182 { get; set; } + /// + /// + /// + public global::Mixedbread.ParsingJobListResponse? Type183 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type184 { get; set; } + /// + /// + /// + public global::Mixedbread.QueryRegexSubstitutionRule? Type185 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type186 { get; set; } + /// + /// + /// + public global::Mixedbread.RegexFlag? Type187 { get; set; } + /// + /// + /// + public global::Mixedbread.QueryStringSubstitutionRule? Type188 { get; set; } + /// + /// + /// + public global::Mixedbread.QuestionAnsweringOptions? Type189 { get; set; } + /// + /// + /// + public global::Mixedbread.RankedDocument? Type190 { get; set; } + /// + /// + /// + public global::Mixedbread.RerankConfig? Type191 { get; set; } + /// + /// + /// + public global::Mixedbread.RerankParams? Type192 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>>? Type193 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? Type194 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type195 { get; set; } + /// + /// + /// + public global::Mixedbread.RerankResponse? Type196 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type197 { get; set; } + /// + /// + /// + public global::Mixedbread.ScopeMethod? Type198 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type199 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredStoreFile? Type200 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type201 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunksVariant1Item? Type202 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? Type203 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? Type204 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? Type205 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? Type206 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminator? Type207 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredStoreFileChunksVariant1ItemDiscriminatorType? Type208 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredVectorStoreFile? Type209 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type210 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunksVariant1Item2? Type211 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? Type212 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? Type213 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? Type214 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? Type215 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminator? Type216 { get; set; } + /// + /// + /// + public global::Mixedbread.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorType? Type217 { get; set; } + /// + /// + /// + public global::Mixedbread.SearchCursorPagination? Type218 { get; set; } + /// + /// + /// + public global::Mixedbread.Store? Type219 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreConfig2? Type220 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreStatus? Type221 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type222 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type223 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreChunkSearchParams? Type224 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type225 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreCostInfo? Type226 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreCostListResponse? Type227 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type228 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreCreateParams? Type229 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreDeleted? Type230 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventHistogramBucket? Type231 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventHistogramBucketType? Type232 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventHistogramParams? Type233 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventHistogramResponse? Type234 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type235 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventListResponse? Type236 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type237 { get; set; } + /// + /// + /// + public global::Mixedbread.DataItem? Type238 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreIngestionEvent? Type239 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreSearchEvent? Type240 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventListResponseDataItemDiscriminator? Type241 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType? Type242 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFile? Type243 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type244 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunksVariant1Item3? Type245 { get; set; } + /// + /// + /// + public global::Mixedbread.TextInputChunk? Type246 { get; set; } + /// + /// + /// + public global::Mixedbread.VideoUrlInputChunk? Type247 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileChunksVariant1ItemDiscriminator? Type248 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileChunksVariant1ItemDiscriminatorType? Type249 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileParsingStrategy? Type250 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileDeleted? Type251 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileListResponse? Type252 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type253 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileMetadataUpdateParams? Type254 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileSearchOptions? Type255 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileSearchParams? Type256 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreFileSearchResponse? Type257 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type258 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreListResponse? Type259 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type260 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreQAParams? Type261 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreQAResults? Type262 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type263 { get; set; } + /// + /// + /// + public global::Mixedbread.SourcesItem? Type264 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreQAResultsSourceDiscriminator? Type265 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreQAResultsSourceDiscriminatorType? Type266 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreSearchResponse? Type267 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type268 { get; set; } + /// + /// + /// + public global::Mixedbread.DataItem2? Type269 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreSearchResponseDataItemDiscriminator? Type270 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreSearchResponseDataItemDiscriminatorType? Type271 { get; set; } + /// + /// + /// + public global::Mixedbread.StoreUpdateParams? Type272 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant13? Type273 { get; set; } + /// + /// + /// + public global::Mixedbread.TextInputChunkGeneratedMetadataVariant1Discriminator? Type274 { get; set; } + /// + /// + /// + public global::Mixedbread.TextInputChunkGeneratedMetadataVariant1DiscriminatorType? Type275 { get; set; } + /// + /// + /// + public global::Mixedbread.ValidatedJsonSchema? Type276 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type277 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type278 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStore? Type279 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreChunkSearchOptions? Type280 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreChunkSearchParams? Type281 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreCreateParams? Type282 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreDeleted? Type283 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFile? Type284 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type285 { get; set; } + /// + /// + /// + public global::Mixedbread.ChunksVariant1Item4? Type286 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminator? Type287 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileChunksVariant1ItemDiscriminatorType? Type288 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileDeleted? Type289 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileListResponse? Type290 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type291 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileSearchOptions? Type292 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileSearchParams? Type293 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileSearchResponse? Type294 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type295 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreFileStatus? Type296 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreListResponse? Type297 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type298 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreQAParams? Type299 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreQAResults? Type300 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type301 { get; set; } + /// + /// + /// + public global::Mixedbread.SourcesItem2? Type302 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreQAResultsSourceDiscriminator? Type303 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreQAResultsSourceDiscriminatorType? Type304 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreSearchResponse? Type305 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type306 { get; set; } + /// + /// + /// + public global::Mixedbread.DataItem3? Type307 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminator? Type308 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreSearchResponseDataItemDiscriminatorType? Type309 { get; set; } + /// + /// + /// + public global::Mixedbread.VectorStoreUpdateParams? Type310 { get; set; } + /// + /// + /// + public global::Mixedbread.VideoUrl? Type311 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant14? Type312 { get; set; } + /// + /// + /// + public global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1Discriminator? Type313 { get; set; } + /// + /// + /// + public global::Mixedbread.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type314 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant15? Type315 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator? Type316 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant16? Type317 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator? Type318 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant17? Type319 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1Discriminator? Type320 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType? Type321 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant18? Type322 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator? Type323 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParams? Type324 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type325 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesItem? Type326 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminator? Type327 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorType? Type328 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleDeleted? Type329 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponse? Type330 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type331 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesItem2? Type332 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminator? Type333 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorType? Type334 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParams? Type335 { get; set; } + /// + /// + /// + public global::Mixedbread.Rule? Type336 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminator? Type337 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType? Type338 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleted? Type339 { get; set; } + /// + /// + /// + public global::Mixedbread.DeletedRule? Type340 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator? Type341 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType? Type342 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParams? Type343 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type344 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesVariant1Item? Type345 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator? Type346 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType? Type347 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParams? Type348 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type349 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesItem3? Type350 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminator? Type351 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorType? Type352 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted? Type353 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse? Type354 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type355 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesItem4? Type356 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminator? Type357 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorType? Type358 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParams? Type359 { get; set; } + /// + /// + /// + public global::Mixedbread.Rule2? Type360 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminator? Type361 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorType? Type362 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted? Type363 { get; set; } + /// + /// + /// + public global::Mixedbread.DeletedRule2? Type364 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminator? Type365 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorType? Type366 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParams? Type367 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type368 { get; set; } + /// + /// + /// + public global::Mixedbread.RulesVariant1Item2? Type369 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminator? Type370 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorType? Type371 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant19? Type372 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1Discriminator? Type373 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type374 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant110? Type375 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1Discriminator? Type376 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type377 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant111? Type378 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1Discriminator? Type379 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorType? Type380 { get; set; } + /// + /// + /// + public global::Mixedbread.GeneratedMetadataVariant112? Type381 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1Discriminator? Type382 { get; set; } + /// + /// + /// + public global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorType? Type383 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf? Type384 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type385 { get; set; } + /// + /// + /// + public global::Mixedbread.ListStoreEventsEventType? Type386 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? Type387 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type388 { get; set; } + + /// + /// + /// + public global::System.Collections.Generic.List? ListType0 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType1 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType2 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType3 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType4 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? ListType5 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType6 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType7 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType8 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType9 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType10 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType11 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType12 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType13 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType14 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? ListType15 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? ListType16 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType17 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, global::System.Collections.Generic.List>? ListType18 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType19 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType20 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType21 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType22 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, global::System.Collections.Generic.List>>? ListType23 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType24 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType25 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType26 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType27 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType28 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>, object>? ListType29 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType30 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType31 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf, object>? ListType32 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType33 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType34 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType35 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType36 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>>? ListType37 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? ListType38 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType39 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType40 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType41 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType42 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType43 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType44 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType45 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType46 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType47 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType48 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType49 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType50 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType51 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType52 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType53 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType54 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType55 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType56 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType57 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType58 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType59 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType60 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType61 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType62 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType63 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType64 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType65 { get; set; } + /// + /// + /// + public global::Mixedbread.AnyOf>? ListType66 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType67 { get; set; } + } +} \ No newline at end of file diff --git a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs index 1579b46..06907ca 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.CreateEmbeddings.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateEmbeddingsResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateEmbeddingsResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateEmbeddingsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.EmbeddingCreateResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.EmbeddingCreateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateEmbeddingsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.EmbeddingCreateResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.EmbeddingCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs index b205ac3..85a719e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Info.g.cs @@ -92,13 +92,13 @@ partial void ProcessInfoResponseContent( if (ReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_500 = global::Mixedbread.ErrorResponse.FromJson(__content_500, JsonSerializerOptions); + __value_500 = global::Mixedbread.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_500 = global::Mixedbread.ErrorResponse.FromJson(__content_500, JsonSerializerOptions); + __value_500 = global::Mixedbread.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -142,7 +142,7 @@ partial void ProcessInfoResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.InfoResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.InfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -172,7 +172,7 @@ partial void ProcessInfoResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.InfoResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.InfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs index bd7524a..c6affd4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Rerank.g.cs @@ -72,7 +72,7 @@ partial void ProcessRerankResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessRerankResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessRerankResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.RerankResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.RerankResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessRerankResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.RerankResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.RerankResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.g.cs index f1828f5..a6d59c8 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.g.cs @@ -33,255 +33,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli /// /// /// - #pragma warning disable CS0618 // Type or member is obsolete - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, - Converters = - { - new global::Mixedbread.JsonConverters.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.AudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ChunkingStrategyJsonConverter(), - new global::Mixedbread.JsonConverters.ChunkingStrategyNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ConditionOperatorJsonConverter(), - new global::Mixedbread.JsonConverters.ConditionOperatorNullableJsonConverter(), - new global::Mixedbread.JsonConverters.DataSourceAuthParamsVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.DataSourceAuthParamsVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.DataSourceTypeJsonConverter(), - new global::Mixedbread.JsonConverters.DataSourceTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ElementTypeJsonConverter(), - new global::Mixedbread.JsonConverters.ElementTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.EncodingFormat3JsonConverter(), - new global::Mixedbread.JsonConverters.EncodingFormat3NullableJsonConverter(), - new global::Mixedbread.JsonConverters.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.ImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.LinearDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ModeJsonConverter(), - new global::Mixedbread.JsonConverters.ModeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MultiModalQueryVariant2DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MultiModalQueryVariant2DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.NotionDataSourceCreateOrUpdateParamsAuthParamsVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ParsingJobStatusJsonConverter(), - new global::Mixedbread.JsonConverters.ParsingJobStatusNullableJsonConverter(), - new global::Mixedbread.JsonConverters.RegexFlagJsonConverter(), - new global::Mixedbread.JsonConverters.RegexFlagNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ReturnFormatJsonConverter(), - new global::Mixedbread.JsonConverters.ReturnFormatNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ScopeMethodJsonConverter(), - new global::Mixedbread.JsonConverters.ScopeMethodNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ScoredStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.ScoredStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.ScoredVectorStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreEventHistogramBucketTypeJsonConverter(), - new global::Mixedbread.JsonConverters.StoreEventHistogramBucketTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreEventListResponseDataItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.StoreEventListResponseDataItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileParsingStrategyJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileParsingStrategyNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileStatusJsonConverter(), - new global::Mixedbread.JsonConverters.StoreFileStatusNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreQAResultsSourceDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.StoreQAResultsSourceDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreSearchResponseDataItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.StoreSearchResponseDataItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.StoreStatusJsonConverter(), - new global::Mixedbread.JsonConverters.StoreStatusNullableJsonConverter(), - new global::Mixedbread.JsonConverters.SyncStatusJsonConverter(), - new global::Mixedbread.JsonConverters.SyncStatusNullableJsonConverter(), - new global::Mixedbread.JsonConverters.TextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.TextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreFileChunksVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreFileChunksVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreFileStatusJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreFileStatusNullableJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreQAResultsSourceDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreQAResultsSourceDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreSearchResponseDataItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.VectorStoreSearchResponseDataItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.VideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleCreateParamsRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleResponseRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleCreateParamsRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponseRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleteParamsRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeletedDeletedRuleDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleUpdateParamsRulesVariant1ItemDiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeJsonConverter(), - new global::Mixedbread.JsonConverters.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunkGeneratedMetadataVariant1DiscriminatorTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.ListStoreEventsEventTypeJsonConverter(), - new global::Mixedbread.JsonConverters.ListStoreEventsEventTypeNullableJsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant1JsonConverter(), - new global::Mixedbread.JsonConverters.AuthParamsVariant1JsonConverter(), - new global::Mixedbread.JsonConverters.EmbeddingItemJsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant12JsonConverter(), - new global::Mixedbread.JsonConverters.AuthParamsVariant12JsonConverter(), - new global::Mixedbread.JsonConverters.MultiModalQueryJsonConverter(), - new global::Mixedbread.JsonConverters.MultiModalQueryVariant2JsonConverter(), - new global::Mixedbread.JsonConverters.AuthParamsVariant13JsonConverter(), - new global::Mixedbread.JsonConverters.ChunksVariant1ItemJsonConverter(), - new global::Mixedbread.JsonConverters.ChunksVariant1Item2JsonConverter(), - new global::Mixedbread.JsonConverters.DataItemJsonConverter(), - new global::Mixedbread.JsonConverters.ChunksVariant1Item3JsonConverter(), - new global::Mixedbread.JsonConverters.SourcesItemJsonConverter(), - new global::Mixedbread.JsonConverters.DataItem2JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant13JsonConverter(), - new global::Mixedbread.JsonConverters.ChunksVariant1Item4JsonConverter(), - new global::Mixedbread.JsonConverters.SourcesItem2JsonConverter(), - new global::Mixedbread.JsonConverters.DataItem3JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant14JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant15JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant16JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant17JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant18JsonConverter(), - new global::Mixedbread.JsonConverters.RulesItemJsonConverter(), - new global::Mixedbread.JsonConverters.RulesItem2JsonConverter(), - new global::Mixedbread.JsonConverters.RuleJsonConverter(), - new global::Mixedbread.JsonConverters.DeletedRuleJsonConverter(), - new global::Mixedbread.JsonConverters.RulesVariant1ItemJsonConverter(), - new global::Mixedbread.JsonConverters.RulesItem3JsonConverter(), - new global::Mixedbread.JsonConverters.RulesItem4JsonConverter(), - new global::Mixedbread.JsonConverters.Rule2JsonConverter(), - new global::Mixedbread.JsonConverters.DeletedRule2JsonConverter(), - new global::Mixedbread.JsonConverters.RulesVariant1Item2JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant19JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant110JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant111JsonConverter(), - new global::Mixedbread.JsonConverters.GeneratedMetadataVariant112JsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter, object>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter>(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.AnyOfJsonConverter(), - new global::Mixedbread.JsonConverters.UnixTimestampJsonConverter(), - } - }; - #pragma warning restore CS0618 // Type or member is obsolete + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// @@ -290,7 +42,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public AdminClient Admin => new AdminClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -299,7 +51,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public ApiKeysClient ApiKeys => new ApiKeysClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -308,7 +60,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public BillingClient Billing => new BillingClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -317,7 +69,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public CompletionsClient Completions => new CompletionsClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -326,7 +78,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public DataSourcesClient DataSources => new DataSourcesClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -335,7 +87,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public ExtractionsClient Extractions => new ExtractionsClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -344,7 +96,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public FilesClient Files => new FilesClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -353,7 +105,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public ParsingClient Parsing => new ParsingClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -362,7 +114,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public SchemasClient Schemas => new SchemasClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// @@ -371,7 +123,7 @@ public sealed partial class MixedbreadClient : global::Mixedbread.IMixedbreadCli public StoresClient Stores => new StoresClient(HttpClient, authorizations: Authorizations) { ReadResponseAsString = ReadResponseAsString, - JsonSerializerOptions = JsonSerializerOptions, + JsonSerializerContext = JsonSerializerContext, }; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs index 3d4b545..8e900cf 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CancelParsingJob.g.cs @@ -102,13 +102,13 @@ partial void ProcessCancelParsingJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessCancelParsingJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessCancelParsingJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs index fec547e..7b0586a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.CreateParsingJob.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateParsingJobResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateParsingJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateParsingJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateParsingJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs index 1d25301..cf03446 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.DeleteParsingJob.g.cs @@ -102,13 +102,13 @@ partial void ProcessDeleteParsingJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessDeleteParsingJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ParsingJobDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ParsingJobDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessDeleteParsingJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ParsingJobDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ParsingJobDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs index ab199c8..cddbb1d 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.ListParsingJobs.g.cs @@ -153,13 +153,13 @@ partial void ProcessListParsingJobsResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -203,7 +203,7 @@ partial void ProcessListParsingJobsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ParsingJobListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ParsingJobListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -233,7 +233,7 @@ partial void ProcessListParsingJobsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ParsingJobListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ParsingJobListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs index 6ad8388..04f6134 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.RetrieveParsingJob.g.cs @@ -102,13 +102,13 @@ partial void ProcessRetrieveParsingJobResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRetrieveParsingJobResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.ParsingJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRetrieveParsingJobResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.ParsingJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.g.cs index dd3af8b..ce3c442 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.ParsingClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class ParsingClient : global::Mixedbread.IParsingClient, g /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Polyfills.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Polyfills.g.cs index ca012cc..9d68146 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.Polyfills.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.Polyfills.g.cs @@ -53,6 +53,10 @@ public static partial class AutoSdkPolyfills /// /// Creates a JSON request content instance. /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require 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.Net.Http.HttpContent CreateJsonContent( T inputValue, string mediaType, @@ -124,6 +128,10 @@ public static partial class AutoSdkPolyfills /// /// Reads JSON content into the specified type using serializer options. /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require 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 async global::System.Threading.Tasks.Task ReadFromJsonAsync( this global::System.Net.Http.HttpContent content, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions, diff --git a/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.g.cs index 10db77d..6ab5941 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.SchemasClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class SchemasClient : global::Mixedbread.ISchemasClient, g /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; /// diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs index 7758e1d..3bb6a61 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateQuestionAnswering.g.cs @@ -67,7 +67,7 @@ partial void ProcessCreateQuestionAnsweringResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -104,13 +104,13 @@ partial void ProcessCreateQuestionAnsweringResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -154,7 +154,7 @@ partial void ProcessCreateQuestionAnsweringResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreQAResults.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreQAResults.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -184,7 +184,7 @@ partial void ProcessCreateQuestionAnsweringResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreQAResults.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreQAResults.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs index 61d3209..b194926 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateSearchRule.g.cs @@ -80,7 +80,7 @@ partial void ProcessCreateSearchRuleResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessCreateSearchRuleResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessCreateSearchRuleResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessCreateSearchRuleResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs index fababc5..bbf40c9 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStore.g.cs @@ -72,7 +72,7 @@ partial void ProcessCreateStoreResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -109,13 +109,13 @@ partial void ProcessCreateStoreResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -159,7 +159,7 @@ partial void ProcessCreateStoreResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.Store.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.Store.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -189,7 +189,7 @@ partial void ProcessCreateStoreResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs index e8350c5..a226ff4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.CreateStoreFile.g.cs @@ -82,7 +82,7 @@ partial void ProcessCreateStoreFileResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -120,13 +120,13 @@ partial void ProcessCreateStoreFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -170,7 +170,7 @@ partial void ProcessCreateStoreFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -200,7 +200,7 @@ partial void ProcessCreateStoreFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs index 88c410f..fead96b 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSearchRule.g.cs @@ -111,13 +111,13 @@ partial void ProcessDeleteSearchRuleResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -161,7 +161,7 @@ partial void ProcessDeleteSearchRuleResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -191,7 +191,7 @@ partial void ProcessDeleteSearchRuleResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs index 7c49107..ffd9ac7 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteSpecificSearchRule.g.cs @@ -88,7 +88,7 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -127,13 +127,13 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -207,7 +207,7 @@ partial void ProcessDeleteSpecificSearchRuleResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleSpecificDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs index 3e68560..e53488f 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStore.g.cs @@ -102,13 +102,13 @@ partial void ProcessDeleteStoreResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessDeleteStoreResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessDeleteStoreResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs index fb973f5..0a3c3f4 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.DeleteStoreFile.g.cs @@ -111,13 +111,13 @@ partial void ProcessDeleteStoreFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -161,7 +161,7 @@ partial void ProcessDeleteStoreFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFileDeleted.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFileDeleted.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -191,7 +191,7 @@ partial void ProcessDeleteStoreFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFileDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFileDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs index 66f123e..fbf2d52 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetMetadataFacets.g.cs @@ -67,7 +67,7 @@ partial void ProcessGetMetadataFacetsResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -104,13 +104,13 @@ partial void ProcessGetMetadataFacetsResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -154,7 +154,7 @@ partial void ProcessGetMetadataFacetsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MetadataFacets.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MetadataFacets.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -184,7 +184,7 @@ partial void ProcessGetMetadataFacetsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MetadataFacets.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MetadataFacets.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs index 04208fe..bace11e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.GetStoreEventHistogram.g.cs @@ -80,7 +80,7 @@ partial void ProcessGetStoreEventHistogramResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessGetStoreEventHistogramResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessGetStoreEventHistogramResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreEventHistogramResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreEventHistogramResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessGetStoreEventHistogramResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreEventHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreEventHistogramResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs index 0ee8ace..c51e1c3 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreEvents.g.cs @@ -170,13 +170,13 @@ partial void ProcessListStoreEventsResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -220,7 +220,7 @@ partial void ProcessListStoreEventsResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreEventListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreEventListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -250,7 +250,7 @@ partial void ProcessListStoreEventsResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreEventListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreEventListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs index 4e1bac1..6469f2e 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStoreFilesWithMetadataFilter.g.cs @@ -80,7 +80,7 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFileListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFileListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessListStoreFilesWithMetadataFilterResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFileListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFileListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs index 55e1457..3a0cc8a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.ListStores.g.cs @@ -144,13 +144,13 @@ partial void ProcessListStoresResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -194,7 +194,7 @@ partial void ProcessListStoresResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreListResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -224,7 +224,7 @@ partial void ProcessListStoresResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs index 067c89b..0c21886 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveSearchRule.g.cs @@ -111,13 +111,13 @@ partial void ProcessRetrieveSearchRuleResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -161,7 +161,7 @@ partial void ProcessRetrieveSearchRuleResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -191,7 +191,7 @@ partial void ProcessRetrieveSearchRuleResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs index 4b919fd..94baa7a 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStore.g.cs @@ -102,13 +102,13 @@ partial void ProcessRetrieveStoreResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -152,7 +152,7 @@ partial void ProcessRetrieveStoreResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.Store.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.Store.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -182,7 +182,7 @@ partial void ProcessRetrieveStoreResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs index c441289..f9e8961 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.RetrieveStoreFile.g.cs @@ -124,13 +124,13 @@ partial void ProcessRetrieveStoreFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -174,7 +174,7 @@ partial void ProcessRetrieveStoreFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -204,7 +204,7 @@ partial void ProcessRetrieveStoreFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs index c82590a..9c460d5 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreChunks.g.cs @@ -90,7 +90,7 @@ partial void ProcessSearchStoreChunksResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -127,13 +127,13 @@ partial void ProcessSearchStoreChunksResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessSearchStoreChunksResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreSearchResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreSearchResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -207,7 +207,7 @@ partial void ProcessSearchStoreChunksResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreSearchResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreSearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreFiles.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreFiles.g.cs index 6be1aa6..f62dcb8 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreFiles.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.SearchStoreFiles.g.cs @@ -73,7 +73,7 @@ partial void ProcessSearchStoreFilesResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -110,13 +110,13 @@ partial void ProcessSearchStoreFilesResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -160,7 +160,7 @@ partial void ProcessSearchStoreFilesResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFileSearchResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFileSearchResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -190,7 +190,7 @@ partial void ProcessSearchStoreFilesResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFileSearchResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFileSearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs index 3f668db..80df0d6 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateSearchRule.g.cs @@ -88,7 +88,7 @@ partial void ProcessUpdateSearchRuleResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -127,13 +127,13 @@ partial void ProcessUpdateSearchRuleResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessUpdateSearchRuleResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -207,7 +207,7 @@ partial void ProcessUpdateSearchRuleResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.MxbaiOmniApiRoutesV1StoresRulesModelsSearchRuleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs index 3931db9..231a563 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStore.g.cs @@ -80,7 +80,7 @@ partial void ProcessUpdateStoreResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -118,13 +118,13 @@ partial void ProcessUpdateStoreResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -168,7 +168,7 @@ partial void ProcessUpdateStoreResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.Store.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.Store.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +198,7 @@ partial void ProcessUpdateStoreResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.Store.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs index 2055408..f2e6411 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UpdateStoreFile.g.cs @@ -88,7 +88,7 @@ partial void ProcessUpdateStoreFileResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - var __httpRequestContentBody = request.ToJson(JsonSerializerOptions); + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, @@ -127,13 +127,13 @@ partial void ProcessUpdateStoreFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -177,7 +177,7 @@ partial void ProcessUpdateStoreFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -207,7 +207,7 @@ partial void ProcessUpdateStoreFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs index 6489320..9ad0c4c 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.UploadStoreFile.g.cs @@ -135,13 +135,13 @@ partial void ProcessUploadStoreFileResponseContent( if (ReadResponseAsString) { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } else { __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerOptions); + __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -185,7 +185,7 @@ partial void ProcessUploadStoreFileResponseContent( __response.EnsureSuccessStatusCode(); return - global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerOptions) ?? + global::Mixedbread.StoreFile.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -215,7 +215,7 @@ partial void ProcessUploadStoreFileResponseContent( ).ConfigureAwait(false); return - await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ?? + await global::Mixedbread.StoreFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.g.cs index 34fd209..35684fd 100644 --- a/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.g.cs +++ b/src/libs/Mixedbread/Generated/Mixedbread.StoresClient.g.cs @@ -33,7 +33,7 @@ public sealed partial class StoresClient : global::Mixedbread.IStoresClient, glo /// /// /// - public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default; ///