namespace ScadaLink.Commons.Messages.Instance;

/// <summary>
/// Request to get the current value of an attribute from an Instance Actor.
/// Uses the Ask pattern for system boundaries; Tell pattern is preferred for hot-path.
/// </summary>
public record GetAttributeRequest(
    string CorrelationId,
    string InstanceUniqueName,
    string AttributeName,
    DateTimeOffset Timestamp);

/// <summary>
/// Response containing the current value and quality of an attribute.
/// Quality is "Good", "Bad", or "Uncertain".
/// Data-sourced attributes start at "Uncertain" until the first DCL value update arrives.
/// </summary>
public record GetAttributeResponse(
    string CorrelationId,
    string InstanceUniqueName,
    string AttributeName,
    object? Value,
    bool Found,
    string Quality,
    DateTimeOffset Timestamp);
