namespace ZB.MOM.WW.OtOpcUa.AdminUI.Uns;

/// <summary>
/// Parameter object carrying the operator-editable fields for an equipment-bound VirtualTag create
/// or update via the UNS tree. Virtual tags are always scoped to an equipment, so
/// the owning <c>EquipmentId</c> is supplied separately and never changes on update. A virtual tag
/// must have at least one evaluation trigger: <see cref="ChangeTriggered"/> or a non-null
/// <see cref="TimerIntervalMs"/> (which, when set, must be at least 50 ms).
/// </summary>
/// <param name="VirtualTagId">Stable unique virtual-tag id; only honoured on create (immutable thereafter).</param>
/// <param name="Name">Virtual-tag display name; unique within the owning equipment.</param>
/// <param name="DataType">OPC UA built-in type name (Boolean / Int32 / Float / etc.).</param>
/// <param name="ScriptId">The script that computes this tag's value; must be chosen.</param>
/// <param name="ChangeTriggered">Re-evaluate when any referenced input tag changes.</param>
/// <param name="TimerIntervalMs">Optional periodic re-evaluation cadence in ms; <c>null</c> = no timer, otherwise &gt;= 50.</param>
/// <param name="Historize">Whether this tag's values should be historized.</param>
/// <param name="Enabled">Whether this virtual tag is spawned in deployments.</param>
public sealed record VirtualTagInput(
    string VirtualTagId,
    string Name,
    string DataType,
    string ScriptId,
    bool ChangeTriggered,
    int? TimerIntervalMs,
    bool Historize,
    bool Enabled);
