namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Instance; /// /// Command to set a static attribute value on an Instance Actor. /// Updates in-memory state and persists the override to SQLite. /// /// Per-operation correlation id. /// Unique name of the target instance. /// Canonical name of the attribute to write. /// Canonical string form of the new value. /// UTC timestamp of the command. /// /// Audit Log #23 (ParentExecutionId tag-cascade): the ExecutionId of the /// execution issuing this write — a site script run /// (ScriptRuntimeContext.SetAttribute) or the inbound API request behind a /// Route.To(...).SetAttributes(...). Additive and nullable; null /// when the write has no audited originating execution (central Test Run, /// deployment tooling, tests). The Instance Actor stamps it onto the resulting /// AttributeValueChanged so an alarm the write trips can record it as the /// on-trigger script run's ParentExecutionId. /// public record SetStaticAttributeCommand( string CorrelationId, string InstanceUniqueName, string AttributeName, string Value, DateTimeOffset Timestamp, Guid? SourceExecutionId = null); /// /// Response confirming that a static attribute was set. /// public record SetStaticAttributeResponse( string CorrelationId, string InstanceUniqueName, string AttributeName, bool Success, string? ErrorMessage, DateTimeOffset Timestamp);