namespace ZB.MOM.WW.OtOpcUa.Driver.Mqtt.SparkplugSimulator;
///
/// Connection + identity settings for one simulated Sparkplug B edge node.
///
///
/// Deliberately its own shape rather than a reuse of the driver's MqttDriverOptions: an edge
/// node is the driver's counterparty, and reusing the driver's options record would drag the
/// driver assembly into this project and blur which side of the wire a setting belongs to. The TLS
/// knobs mirror the driver's by name so a rig configured for one is configured for the other.
///
public sealed record SparkplugEdgeNodeOptions
{
/// Broker hostname or IP.
public string Host { get; init; } = "localhost";
/// Broker TCP port.
public int Port { get; init; } = 8883;
/// Connect over TLS.
public bool UseTls { get; init; } = true;
///
/// PEM CA file pinning the broker chain. /empty falls back to the OS
/// trust store (or to when that is set).
///
public string? CaCertificatePath { get; init; }
/// Accept any broker certificate. Fixture escape hatch; never a deployment posture.
public bool AllowUntrustedServerCertificate { get; init; }
/// Broker username. The fixture broker runs allow_anonymous false.
public string? Username { get; init; }
/// Broker password.
public string? Password { get; init; }
/// The Sparkplug group id this node publishes under.
public string GroupId { get; init; } = "Plant1";
/// The Sparkplug edge-node id.
public string EdgeNodeId { get; init; } = "EdgeA";
///
/// MQTT client id. Left unset a unique one is generated — two simulated nodes sharing a client
/// id would knock each other off the broker.
///
public string? ClientId { get; init; }
/// Bounded connect/publish deadline, in seconds.
public int TimeoutSeconds { get; init; } = 15;
///
/// QoS for NBIRTH/DBIRTH/NDATA/DDATA/DDEATH. Sparkplug B publishes all of these at QoS 0
/// (only NDEATH — the broker-issued Will — and STATE are QoS 1), which is the default here.
///
public int DataQos { get; init; }
}