// Copyright (c) Microsoft. All rights reserved.
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
namespace Microsoft.Extensions.AI.Agents.Runtime;
///
/// Base class for all actor read operation results.
///
///
/// This abstract class serves as the foundation for all actor read operation result types.
/// Each concrete implementation represents a specific type of read operation result,
/// such as listing keys or retrieving values from an actor's state.
///
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
[JsonDerivedType(typeof(ListKeysResult), "list_keys")]
[JsonDerivedType(typeof(GetValueOperation), "get_value")]
public abstract class ActorReadResult
{
/// Prevent external derivations.
private protected ActorReadResult()
{
}
///
/// Gets the type of the read result operation.
///
[JsonIgnore]
public abstract ActorReadResultType Type { get; }
}