impl DeviceTopologyRelation {
fn rule(self) -> (DeviceTopologyEntityKind, DeviceTopologyEntityKind, DeviceTopologyRelationBasis, bool) {
match self {
Self::IntegrationProvider => (DeviceTopologyEntityKind::DeviceIntegration, DeviceTopologyEntityKind::Provider, DeviceTopologyRelationBasis::IntegrationInstall, false),
Self::PluginProvider => (DeviceTopologyEntityKind::PluginInstance, DeviceTopologyEntityKind::Provider, DeviceTopologyRelationBasis::PluginBinding, false),
Self::PluginConnection => (DeviceTopologyEntityKind::PluginInstance, DeviceTopologyEntityKind::Connection, DeviceTopologyRelationBasis::PluginBinding, false),
Self::ProviderConnection => (DeviceTopologyEntityKind::Provider, DeviceTopologyEntityKind::Connection, DeviceTopologyRelationBasis::ConnectionOwnership, true),
Self::ProviderDevice => (DeviceTopologyEntityKind::Provider, DeviceTopologyEntityKind::Device, DeviceTopologyRelationBasis::TwinSource, true),
Self::ConnectionDevice => (DeviceTopologyEntityKind::Connection, DeviceTopologyEntityKind::Device, DeviceTopologyRelationBasis::TwinSource, true),
Self::ConnectionBridge => (DeviceTopologyEntityKind::Connection, DeviceTopologyEntityKind::MatterBridge, DeviceTopologyRelationBasis::SourceProjection, false),
Self::BridgeDevice => (DeviceTopologyEntityKind::MatterBridge, DeviceTopologyEntityKind::Device, DeviceTopologyRelationBasis::SourceProjection, false),
}
}
}