| | | 1 | | namespace NexusLabs.Needlr.AgentFramework.Generators; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Describes a single property of a complex object type used as an array element |
| | | 5 | | /// in an agent function parameter. Used for AOT-safe manual deserialization from |
| | | 6 | | /// JsonElement. |
| | | 7 | | /// </summary> |
| | | 8 | | internal readonly struct ObjectPropertyInfo |
| | | 9 | | { |
| | | 10 | | public ObjectPropertyInfo(string csharpName, string jsonName, string schemaType, bool isNullable) |
| | | 11 | | { |
| | 6 | 12 | | CSharpName = csharpName; |
| | 6 | 13 | | JsonName = jsonName; |
| | 6 | 14 | | SchemaType = schemaType; |
| | 6 | 15 | | IsNullable = isNullable; |
| | 6 | 16 | | } |
| | | 17 | | |
| | | 18 | | /// <summary>The C# property name (PascalCase, e.g., "Topic").</summary> |
| | 6 | 19 | | public string CSharpName { get; } |
| | | 20 | | |
| | | 21 | | /// <summary>The JSON property name (camelCase, e.g., "topic").</summary> |
| | 18 | 22 | | public string JsonName { get; } |
| | | 23 | | |
| | | 24 | | /// <summary>The JSON schema type (e.g., "string", "integer", "boolean").</summary> |
| | 6 | 25 | | public string SchemaType { get; } |
| | | 26 | | |
| | | 27 | | /// <summary>Whether the property is nullable.</summary> |
| | 6 | 28 | | public bool IsNullable { get; } |
| | | 29 | | } |