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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ partial void ProcessAclBatchUpdateResponseContent(
__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 @@ -105,13 +105,13 @@ partial void ProcessAclBatchUpdateResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_400 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_400, JsonSerializerOptions);
__value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_400 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_400, JsonSerializerOptions);
__value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -143,13 +143,13 @@ partial void ProcessAclBatchUpdateResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_401 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_401, JsonSerializerOptions);
__value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_401 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_401, JsonSerializerOptions);
__value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -181,13 +181,13 @@ partial void ProcessAclBatchUpdateResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_403 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_403, JsonSerializerOptions);
__value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_403 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_403, JsonSerializerOptions);
__value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -219,13 +219,13 @@ partial void ProcessAclBatchUpdateResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_429 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_429, JsonSerializerOptions);
__value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_429, JsonSerializerOptions);
__value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -257,13 +257,13 @@ partial void ProcessAclBatchUpdateResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_500 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_500, JsonSerializerOptions);
__value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_500 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_500, JsonSerializerOptions);
__value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -307,7 +307,7 @@ partial void ProcessAclBatchUpdateResponseContent(
__response.EnsureSuccessStatusCode();

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

return
await global::Braintrust.AclBatchUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Braintrust.AclBatchUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
24 changes: 12 additions & 12 deletions src/libs/Braintrust/Generated/Braintrust.AclsClient.AclListOrg.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ partial void ProcessAclListOrgResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_400 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_400, JsonSerializerOptions);
__value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_400 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_400, JsonSerializerOptions);
__value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -241,13 +241,13 @@ partial void ProcessAclListOrgResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_401 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_401, JsonSerializerOptions);
__value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_401 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_401, JsonSerializerOptions);
__value_401 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_401, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -279,13 +279,13 @@ partial void ProcessAclListOrgResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_403 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_403, JsonSerializerOptions);
__value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_403 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_403, JsonSerializerOptions);
__value_403 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_403, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -317,13 +317,13 @@ partial void ProcessAclListOrgResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_429 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_429, JsonSerializerOptions);
__value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_429, JsonSerializerOptions);
__value_429 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_429, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -355,13 +355,13 @@ partial void ProcessAclListOrgResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_500 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_500, JsonSerializerOptions);
__value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_500 = global::System.Text.Json.JsonSerializer.Deserialize<string?>(__content_500, JsonSerializerOptions);
__value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -405,7 +405,7 @@ partial void ProcessAclListOrgResponseContent(
__response.EnsureSuccessStatusCode();

return
global::System.Text.Json.JsonSerializer.Deserialize<global::System.Collections.Generic.IList<global::Braintrust.Acl>?>(__content, JsonSerializerOptions) ??
(global::System.Collections.Generic.IList<global::Braintrust.Acl>?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList<global::Braintrust.Acl>), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -435,7 +435,7 @@ partial void ProcessAclListOrgResponseContent(
).ConfigureAwait(false);

return
await global::System.Text.Json.JsonSerializer.DeserializeAsync<global::System.Collections.Generic.IList<global::Braintrust.Acl>?>(__content, JsonSerializerOptions).ConfigureAwait(false) ??
(global::System.Collections.Generic.IList<global::Braintrust.Acl>?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList<global::Braintrust.Acl>), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Loading