using ZB.MOM.WW.OtOpcUa.Configuration.Entities; namespace ZB.MOM.WW.OtOpcUa.Configuration.Validation; /// /// Inputs for draft validation. Contains the draft's rows plus the minimum prior-generation /// rows needed for cross-generation invariants (EquipmentUuid stability, UnsArea identity). /// public sealed class DraftSnapshot { /// Gets the draft generation identifier. public required long GenerationId { get; init; } /// Gets the cluster identifier. public required string ClusterId { get; init; } /// /// Cluster's Enterprise segment (UNS level 1). When set, uses /// the actual length for path-length checks instead of a conservative 32-char upper bound. /// public string? Enterprise { get; init; } /// /// Cluster's Site segment (UNS level 2). When set, uses the /// actual length for path-length checks instead of a conservative 32-char upper bound. /// public string? Site { get; init; } // v3: the Namespace entity is retired (the two OPC UA namespaces are implicit). The Raw tree // (RawFolders → DriverInstances → Devices → TagGroups → Tags) + the UNS projection // (UnsTagReferences) feed the v3 validator rules (raw-name charset, historized-tagname length, UNS // effective-leaf uniqueness). /// Gets the list of Raw-tree folders (drive the raw-name charset rule + RawPath computation). public IReadOnlyList RawFolders { get; init; } = []; /// Gets the list of driver instances. public IReadOnlyList DriverInstances { get; init; } = []; /// Gets the list of devices. public IReadOnlyList Devices { get; init; } = []; /// Gets the list of tag-groups (drive the raw-name charset rule + RawPath computation). public IReadOnlyList TagGroups { get; init; } = []; /// Gets the list of UNS areas. public IReadOnlyList UnsAreas { get; init; } = []; /// Gets the list of UNS lines. public IReadOnlyList UnsLines { get; init; } = []; /// Gets the list of equipment. public IReadOnlyList Equipment { get; init; } = []; /// Gets the list of raw tags. public IReadOnlyList Tags { get; init; } = []; /// Gets the UNS tag references (raw tag → equipment projection). Drives the UNS effective-leaf /// uniqueness rule (effective name = DisplayNameOverride else the backing raw tag's Name). public IReadOnlyList UnsTagReferences { get; init; } = []; /// Equipment-bound VirtualTags (script-derived signals). Part of the UNS effective-leaf /// uniqueness set within an equipment (references + VirtualTags + ScriptedAlarms). public IReadOnlyList VirtualTags { get; init; } = []; /// Equipment-bound scripted alarms. Part of the UNS effective-leaf uniqueness set. public IReadOnlyList ScriptedAlarms { get; init; } = []; /// User-authored scripts (shared by VirtualTags, ScriptedAlarms, and Calculation tags). Drives /// the WP7 Calculation gates: scriptId existence + the calc→calc dependency-cycle check. public IReadOnlyList