using ZB.MOM.WW.OtOpcUa.Core.Abstractions.DataConnections;
namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
/// A local realm-qualified branch projection, not a synthetic locally owned tag.
public sealed class RemoteNamespaceMapping
{
public Guid RemoteNamespaceMappingRowId { get; set; }
public string RemoteNamespaceMappingId { get; set; } = "";
public string ClusterId { get; set; } = "";
public string DataConnectionId { get; set; } = "";
public long Revision { get; set; } = 1;
public bool Enabled { get; set; }
public List ConsumerNodeIds { get; set; } = [];
public DataRealm Realm { get; set; }
public DataRealm RemoteRealm { get; set; }
public string LocalParentKind { get; set; } = "";
public string LocalParentId { get; set; } = "";
public string BranchName { get; set; } = "";
public string RemoteRootEntityId { get; set; } = "";
public string RemoteNamespaceUri { get; set; } = "";
public string RemoteIdentifierKind { get; set; } = "";
public string RemoteIdentifier { get; set; } = "";
/// Optional leaf type expectation; branch types are verified as catalog metadata arrives.
public DataValueKind? ExpectedValueKind { get; set; }
public DataValueKind? ExpectedArrayElementKind { get; set; }
public DataOperations AllowedOperations { get; set; }
public bool WriteThrough { get; set; }
public int MaxProjectionNodes { get; set; } = 10000;
public int MaxProjectionDepth { get; set; } = 32;
public int MetadataLeaseMilliseconds { get; set; } = 15000;
public int StaleTimeoutMilliseconds { get; set; } = 30000;
public int SamplingIntervalMilliseconds { get; set; } = 1000;
public int PublishingIntervalMilliseconds { get; set; } = 1000;
/// H2 (used by H3): per-request budget for assembling chunked remote Processed/AtTime answers.
public int MaxHistoryAssemblyBytesPerRequest { get; set; } = 16 * 1024 * 1024;
public byte[] RowVersion { get; set; } = [];
}