-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
3,555 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"profiles": { | ||
"FixOpenApiSpec": { | ||
"commandName": "Project", | ||
"commandLineArgs": "../../../../../../src/libs/OpenAI/openapi.yaml" | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationRequestInputVariant3ItemVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...enerated/JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationRequestInputVariant3ItemVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...OpenAI/Generated/JsonConverters.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationRequestInputVariant3ItemVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...enerated/JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationRequestInputVariant3ItemVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? 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::OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem 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::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...erters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? 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::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? 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::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...ers.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem 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::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
Oops, something went wrong.