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
@@ -0,0 +1,53 @@
#nullable enable

namespace tryAGI.OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class BetaImageGenToolCallModerationDetailsModerationStageJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStage>
{
/// <inheritdoc />
public override global::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStage 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::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStageExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace tryAGI.OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class BetaImageGenToolCallModerationDetailsModerationStageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStage?>
{
/// <inheritdoc />
public override global::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStage? 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::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStageExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStage? 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::tryAGI.OpenAI.BetaImageGenToolCallModerationDetailsModerationStageExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ public class BetaItemFieldJsonConverter : global::System.Text.Json.Serialization
if (__jsonProps.Contains("action")) __score13++;
if (__jsonProps.Contains("agent")) __score13++;
if (__jsonProps.Contains("background")) __score13++;
if (__jsonProps.Contains("error")) __score13++;
if (__jsonProps.Contains("error.code")) __score13++;
if (__jsonProps.Contains("error.message")) __score13++;
if (__jsonProps.Contains("error.moderation_details")) __score13++;
if (__jsonProps.Contains("error.param")) __score13++;
if (__jsonProps.Contains("error.type")) __score13++;
if (__jsonProps.Contains("id")) __score13++;
if (__jsonProps.Contains("output_format")) __score13++;
if (__jsonProps.Contains("quality")) __score13++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ public class BetaItemResourceJsonConverter : global::System.Text.Json.Serializat
if (__jsonProps.Contains("action")) __score19++;
if (__jsonProps.Contains("agent")) __score19++;
if (__jsonProps.Contains("background")) __score19++;
if (__jsonProps.Contains("error")) __score19++;
if (__jsonProps.Contains("error.code")) __score19++;
if (__jsonProps.Contains("error.message")) __score19++;
if (__jsonProps.Contains("error.moderation_details")) __score19++;
if (__jsonProps.Contains("error.param")) __score19++;
if (__jsonProps.Contains("error.type")) __score19++;
if (__jsonProps.Contains("id")) __score19++;
if (__jsonProps.Contains("output_format")) __score19++;
if (__jsonProps.Contains("quality")) __score19++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ public class BetaOutputItemJsonConverter : global::System.Text.Json.Serializatio
if (__jsonProps.Contains("action")) __score17++;
if (__jsonProps.Contains("agent")) __score17++;
if (__jsonProps.Contains("background")) __score17++;
if (__jsonProps.Contains("error")) __score17++;
if (__jsonProps.Contains("error.code")) __score17++;
if (__jsonProps.Contains("error.message")) __score17++;
if (__jsonProps.Contains("error.moderation_details")) __score17++;
if (__jsonProps.Contains("error.param")) __score17++;
if (__jsonProps.Contains("error.type")) __score17++;
if (__jsonProps.Contains("id")) __score17++;
if (__jsonProps.Contains("output_format")) __score17++;
if (__jsonProps.Contains("quality")) __score17++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat
var __score5 = 0;
if (__jsonProps.Contains("action")) __score5++;
if (__jsonProps.Contains("background")) __score5++;
if (__jsonProps.Contains("error")) __score5++;
if (__jsonProps.Contains("error.code")) __score5++;
if (__jsonProps.Contains("error.message")) __score5++;
if (__jsonProps.Contains("error.moderation_details")) __score5++;
if (__jsonProps.Contains("error.param")) __score5++;
if (__jsonProps.Contains("error.type")) __score5++;
if (__jsonProps.Contains("id")) __score5++;
if (__jsonProps.Contains("output_format")) __score5++;
if (__jsonProps.Contains("quality")) __score5++;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace tryAGI.OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class ImageGenToolCallModerationDetailsModerationStageJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStage>
{
/// <inheritdoc />
public override global::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStage 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::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStageExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace tryAGI.OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class ImageGenToolCallModerationDetailsModerationStageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStage?>
{
/// <inheritdoc />
public override global::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStage? 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::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStageExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStage? 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::tryAGI.OpenAI.ImageGenToolCallModerationDetailsModerationStageExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ public class ItemFieldJsonConverter : global::System.Text.Json.Serialization.Jso
var __score10 = 0;
if (__jsonProps.Contains("action")) __score10++;
if (__jsonProps.Contains("background")) __score10++;
if (__jsonProps.Contains("error")) __score10++;
if (__jsonProps.Contains("error.code")) __score10++;
if (__jsonProps.Contains("error.message")) __score10++;
if (__jsonProps.Contains("error.moderation_details")) __score10++;
if (__jsonProps.Contains("error.param")) __score10++;
if (__jsonProps.Contains("error.type")) __score10++;
if (__jsonProps.Contains("id")) __score10++;
if (__jsonProps.Contains("output_format")) __score10++;
if (__jsonProps.Contains("quality")) __score10++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization.
var __score16 = 0;
if (__jsonProps.Contains("action")) __score16++;
if (__jsonProps.Contains("background")) __score16++;
if (__jsonProps.Contains("error")) __score16++;
if (__jsonProps.Contains("error.code")) __score16++;
if (__jsonProps.Contains("error.message")) __score16++;
if (__jsonProps.Contains("error.moderation_details")) __score16++;
if (__jsonProps.Contains("error.param")) __score16++;
if (__jsonProps.Contains("error.type")) __score16++;
if (__jsonProps.Contains("id")) __score16++;
if (__jsonProps.Contains("output_format")) __score16++;
if (__jsonProps.Contains("quality")) __score16++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js
var __score14 = 0;
if (__jsonProps.Contains("action")) __score14++;
if (__jsonProps.Contains("background")) __score14++;
if (__jsonProps.Contains("error")) __score14++;
if (__jsonProps.Contains("error.code")) __score14++;
if (__jsonProps.Contains("error.message")) __score14++;
if (__jsonProps.Contains("error.moderation_details")) __score14++;
if (__jsonProps.Contains("error.param")) __score14++;
if (__jsonProps.Contains("error.type")) __score14++;
if (__jsonProps.Contains("id")) __score14++;
if (__jsonProps.Contains("output_format")) __score14++;
if (__jsonProps.Contains("quality")) __score14++;
Expand Down
Loading
Loading