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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class OutputItemsVariant15TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant15Type>
public sealed class OutputItemsVariant14TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant14Type>
{
/// <inheritdoc />
public override global::OpenRouter.OutputItemsVariant15Type Read(
public override global::OpenRouter.OutputItemsVariant14Type Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,19 +18,19 @@ public sealed class OutputItemsVariant15TypeJsonConverter : global::System.Text.
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenRouter.OutputItemsVariant15TypeExtensions.ToEnum(stringValue) ?? default;
return global::OpenRouter.OutputItemsVariant14TypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenRouter.OutputItemsVariant15Type)numValue;
return (global::OpenRouter.OutputItemsVariant14Type)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::OpenRouter.OutputItemsVariant15Type);
return default(global::OpenRouter.OutputItemsVariant14Type);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -42,12 +42,12 @@ public sealed class OutputItemsVariant15TypeJsonConverter : global::System.Text.
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenRouter.OutputItemsVariant15Type value,
global::OpenRouter.OutputItemsVariant14Type value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::OpenRouter.OutputItemsVariant15TypeExtensions.ToValueString(value));
writer.WriteStringValue(global::OpenRouter.OutputItemsVariant14TypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class OutputItemsVariant15TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant15Type?>
public sealed class OutputItemsVariant14TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant14Type?>
{
/// <inheritdoc />
public override global::OpenRouter.OutputItemsVariant15Type? Read(
public override global::OpenRouter.OutputItemsVariant14Type? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,19 +18,19 @@ public sealed class OutputItemsVariant15TypeNullableJsonConverter : global::Syst
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenRouter.OutputItemsVariant15TypeExtensions.ToEnum(stringValue);
return global::OpenRouter.OutputItemsVariant14TypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenRouter.OutputItemsVariant15Type)numValue;
return (global::OpenRouter.OutputItemsVariant14Type)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::OpenRouter.OutputItemsVariant15Type?);
return default(global::OpenRouter.OutputItemsVariant14Type?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -42,7 +42,7 @@ public sealed class OutputItemsVariant15TypeNullableJsonConverter : global::Syst
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenRouter.OutputItemsVariant15Type? value,
global::OpenRouter.OutputItemsVariant14Type? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -53,7 +53,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::OpenRouter.OutputItemsVariant15TypeExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::OpenRouter.OutputItemsVariant14TypeExtensions.ToValueString(value.Value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class OutputItemsVariant18TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant18Type>
{
/// <inheritdoc />
public override global::OpenRouter.OutputItemsVariant18Type Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenRouter.OutputItemsVariant18TypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenRouter.OutputItemsVariant18Type)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::OpenRouter.OutputItemsVariant18Type);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenRouter.OutputItemsVariant18Type value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::OpenRouter.OutputItemsVariant18TypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class OutputItemsVariant18TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.OutputItemsVariant18Type?>
{
/// <inheritdoc />
public override global::OpenRouter.OutputItemsVariant18Type? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenRouter.OutputItemsVariant18TypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenRouter.OutputItemsVariant18Type)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::OpenRouter.OutputItemsVariant18Type?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenRouter.OutputItemsVariant18Type? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::OpenRouter.OutputItemsVariant18TypeExtensions.ToValueString(value.Value));
}
}
}
}
Loading