Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__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,
Expand Down Expand Up @@ -109,13 +109,13 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -147,13 +147,13 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -185,13 +185,13 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -223,13 +223,13 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -273,7 +273,7 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__response.EnsureSuccessStatusCode();

return
global::EdenAI.ImageaiDetectionResponseModel.FromJson(__content, JsonSerializerOptions) ??
global::EdenAI.ImageaiDetectionResponseModel.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -303,7 +303,7 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
).ConfigureAwait(false);

return
await global::EdenAI.ImageaiDetectionResponseModel.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::EdenAI.ImageaiDetectionResponseModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__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,
Expand Down Expand Up @@ -125,13 +125,13 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -163,13 +163,13 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -201,13 +201,13 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -239,13 +239,13 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -289,7 +289,7 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__response.EnsureSuccessStatusCode();

return
global::EdenAI.TextaiDetectionResponseModel.FromJson(__content, JsonSerializerOptions) ??
global::EdenAI.TextaiDetectionResponseModel.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -319,7 +319,7 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
).ConfigureAwait(false);

return
await global::EdenAI.TextaiDetectionResponseModel.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::EdenAI.TextaiDetectionResponseModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/EdenAI/Generated/EdenAI.AiDetectionClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed partial class AiDetectionClient : global::EdenAI.IAiDetectionClien
/// <summary>
///
/// </summary>
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::EdenAI.SourceGenerationContext.Default;


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ partial void ProcessOcrOcrAnonymizationAsyncCreateResponseContent(
__response.EnsureSuccessStatusCode();

return
global::EdenAI.LaunchAsyncJobResponse.FromJson(__content, JsonSerializerOptions) ??
global::EdenAI.LaunchAsyncJobResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -235,7 +235,7 @@ partial void ProcessOcrOcrAnonymizationAsyncCreateResponseContent(
).ConfigureAwait(false);

return
await global::EdenAI.LaunchAsyncJobResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::EdenAI.LaunchAsyncJobResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieveResponseContent(
__response.EnsureSuccessStatusCode();

return
global::EdenAI.ListAsyncJobResponse.FromJson(__content, JsonSerializerOptions) ??
global::EdenAI.ListAsyncJobResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -133,7 +133,7 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieveResponseContent(
).ConfigureAwait(false);

return
await global::EdenAI.ListAsyncJobResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::EdenAI.ListAsyncJobResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerOptions);
__value_400 = global::EdenAI.BadRequest.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -163,13 +163,13 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerOptions);
__value_500 = global::EdenAI.Error.FromJson(__content_500, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -201,13 +201,13 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerOptions);
__value_403 = global::EdenAI.Error.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -239,13 +239,13 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerOptions);
__value_404 = global::EdenAI.NotFoundResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -289,7 +289,7 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
__response.EnsureSuccessStatusCode();

return
global::EdenAI.AsyncocranonymizationAsyncResponseModel.FromJson(__content, JsonSerializerOptions) ??
global::EdenAI.AsyncocranonymizationAsyncResponseModel.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -319,7 +319,7 @@ partial void ProcessOcrOcrAnonymizationAsyncRetrieve2ResponseContent(
).ConfigureAwait(false);

return
await global::EdenAI.AsyncocranonymizationAsyncResponseModel.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::EdenAI.AsyncocranonymizationAsyncResponseModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Loading