Class Generated<T>
Represents the complete result envelope for content generated by AI services through the Unified API.
Encapsulates generated values, metadata, usage statistics, and optional error information.
Assembly: Glitch9.AIDevKit.dll
Syntax
public sealed class Generated<T> : IResult, IEmptiable where T : class
Type Parameters
| Name |
Description |
| T |
The type of generated content. Must be a reference type.
|
Properties
|
Edit this page
View Source
Count
Gets the number of generated values.
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
CreatedAt
Gets the timestamp when this content was generated.
Declaration
public UnixTime? CreatedAt { get; }
Property Value
|
Edit this page
View Source
Error
Gets the exception that occurred during generation, if any.
Declaration
public Exception Error { get; }
Property Value
|
Edit this page
View Source
Id
Gets the unique identifier for this generation result.
Declaration
public string Id { get; }
Property Value
|
Edit this page
View Source
IsEmpty
Gets a value indicating whether this result contains no generated values.
Declaration
public bool IsEmpty { get; }
Property Value
|
Edit this page
View Source
this[int]
Gets the generated value at the specified index.
Declaration
public T this[int index] { get; }
Parameters
| Type |
Name |
Description |
| int |
index |
The zero-based index of the value to retrieve.
|
Property Value
| Type |
Description |
| T |
The generated value at the specified index.
|
Exceptions
|
Edit this page
View Source
Paths
Gets the file path(s) where generated content is stored, if applicable.
Declaration
public string[] Paths { get; }
Property Value
|
Edit this page
View Source
Usage
Gets the token usage statistics for this generation operation.
Declaration
public Usage Usage { get; }
Property Value
|
Edit this page
View Source
Value
Gets the generated content value(s).
Declaration
public T[] Value { get; }
Property Value
Methods
|
Edit this page
View Source
EnumerateValuePathPairs()
Declaration
public IEnumerable<(T Value, string Path)> EnumerateValuePathPairs()
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Edit this page
View Source
implicit operator string(Generated<T>)
Declaration
public static implicit operator string(Generated<T> g)
Parameters
Returns
|
Edit this page
View Source
implicit operator string[](Generated<T>)
Declaration
public static implicit operator string[](Generated<T> g)
Parameters
Returns
|
Edit this page
View Source
implicit operator AudioClip(Generated<T>)
Declaration
public static implicit operator AudioClip(Generated<T> g)
Parameters
Returns
| Type |
Description |
| AudioClip |
|
|
Edit this page
View Source
implicit operator AudioClip[](Generated<T>)
Declaration
public static implicit operator AudioClip[](Generated<T> g)
Parameters
Returns
| Type |
Description |
| AudioClip[] |
|
|
Edit this page
View Source
implicit operator Sprite(Generated<T>)
Declaration
public static implicit operator Sprite(Generated<T> g)
Parameters
Returns
|
Edit this page
View Source
implicit operator Sprite[](Generated<T>)
Declaration
public static implicit operator Sprite[](Generated<T> g)
Parameters
Returns
| Type |
Description |
| Sprite[] |
|
|
Edit this page
View Source
implicit operator Texture2D(Generated<T>)
Declaration
public static implicit operator Texture2D(Generated<T> g)
Parameters
Returns
| Type |
Description |
| Texture2D |
|
|
Edit this page
View Source
implicit operator Texture2D[](Generated<T>)
Declaration
public static implicit operator Texture2D[](Generated<T> g)
Parameters
Returns
| Type |
Description |
| Texture2D[] |
|
|
Edit this page
View Source
implicit operator T(Generated<T>)
Declaration
public static implicit operator T(Generated<T> g)
Parameters
Returns
|
Edit this page
View Source
implicit operator T[](Generated<T>)
Declaration
public static implicit operator T[](Generated<T> g)
Parameters
Returns
Implements
Extension Methods