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 @@ -28,26 +28,31 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio

var __score0 = 0;
if (__jsonProps.Contains("button")) __score0++;
if (__jsonProps.Contains("keys")) __score0++;
if (__jsonProps.Contains("type")) __score0++;
if (__jsonProps.Contains("x")) __score0++;
if (__jsonProps.Contains("y")) __score0++;
var __score1 = 0;
if (__jsonProps.Contains("keys")) __score1++;
if (__jsonProps.Contains("type")) __score1++;
if (__jsonProps.Contains("x")) __score1++;
if (__jsonProps.Contains("y")) __score1++;
var __score2 = 0;
if (__jsonProps.Contains("keys")) __score2++;
if (__jsonProps.Contains("path")) __score2++;
if (__jsonProps.Contains("type")) __score2++;
var __score3 = 0;
if (__jsonProps.Contains("keys")) __score3++;
if (__jsonProps.Contains("type")) __score3++;
var __score4 = 0;
if (__jsonProps.Contains("keys")) __score4++;
if (__jsonProps.Contains("type")) __score4++;
if (__jsonProps.Contains("x")) __score4++;
if (__jsonProps.Contains("y")) __score4++;
var __score5 = 0;
if (__jsonProps.Contains("type")) __score5++;
var __score6 = 0;
if (__jsonProps.Contains("keys")) __score6++;
if (__jsonProps.Contains("scroll_x")) __score6++;
if (__jsonProps.Contains("scroll_y")) __score6++;
if (__jsonProps.Contains("type")) __score6++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public sealed partial class ClickParam
[global::System.Text.Json.Serialization.JsonRequired]
public required int Y { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("keys")]
public global::System.Collections.Generic.IList<string>? Keys { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -61,19 +67,22 @@ public sealed partial class ClickParam
/// <param name="y">
/// The y-coordinate where the click occurred.
/// </param>
/// <param name="keys"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ClickParam(
global::tryAGI.OpenAI.ClickButtonType button,
int x,
int y,
global::System.Collections.Generic.IList<string>? keys,
global::tryAGI.OpenAI.ClickParamType type = global::tryAGI.OpenAI.ClickParamType.Click)
{
this.Button = button;
this.X = x;
this.Y = y;
this.Type = type;
this.Keys = keys;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace tryAGI.OpenAI
{
public sealed partial class ClickParamKeys
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::tryAGI.OpenAI.ClickParamKeys? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::tryAGI.OpenAI.ClickParamKeys),
jsonSerializerContext) as global::tryAGI.OpenAI.ClickParamKeys;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::tryAGI.OpenAI.ClickParamKeys? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::tryAGI.OpenAI.ClickParamKeys>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.ClickParamKeys?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::tryAGI.OpenAI.ClickParamKeys),
jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClickParamKeys;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.ClickParamKeys?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::tryAGI.OpenAI.ClickParamKeys?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace tryAGI.OpenAI
{
/// <summary>
///
/// </summary>
public sealed partial class ClickParamKeys
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public sealed partial class DoubleClickAction
[global::System.Text.Json.Serialization.JsonRequired]
public required int Y { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("keys")]
public global::System.Collections.Generic.IList<string>? Keys { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -50,17 +56,20 @@ public sealed partial class DoubleClickAction
/// <param name="y">
/// The y-coordinate where the double click occurred.
/// </param>
/// <param name="keys"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public DoubleClickAction(
int x,
int y,
global::System.Collections.Generic.IList<string>? keys,
global::tryAGI.OpenAI.DoubleClickActionType type = global::tryAGI.OpenAI.DoubleClickActionType.DoubleClick)
{
this.X = x;
this.Y = y;
this.Type = type;
this.Keys = keys;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace tryAGI.OpenAI
{
public sealed partial class DoubleClickActionKeys
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::tryAGI.OpenAI.DoubleClickActionKeys? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::tryAGI.OpenAI.DoubleClickActionKeys),
jsonSerializerContext) as global::tryAGI.OpenAI.DoubleClickActionKeys;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::tryAGI.OpenAI.DoubleClickActionKeys? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::tryAGI.OpenAI.DoubleClickActionKeys>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.DoubleClickActionKeys?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::tryAGI.OpenAI.DoubleClickActionKeys),
jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DoubleClickActionKeys;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.DoubleClickActionKeys?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::tryAGI.OpenAI.DoubleClickActionKeys?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace tryAGI.OpenAI
{
/// <summary>
///
/// </summary>
public sealed partial class DoubleClickActionKeys
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public sealed partial class DragParam
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CoordParam> Path { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("keys")]
public global::System.Collections.Generic.IList<string>? Keys { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -52,15 +58,18 @@ public sealed partial class DragParam
/// ]<br/>
/// ```
/// </param>
/// <param name="keys"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public DragParam(
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CoordParam> path,
global::System.Collections.Generic.IList<string>? keys,
global::tryAGI.OpenAI.DragParamType type = global::tryAGI.OpenAI.DragParamType.Drag)
{
this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path));
this.Type = type;
this.Keys = keys;
}

/// <summary>
Expand Down
Loading