(self)
| 97 | class TrafficAlert: |
| 98 | """Alert for suspicious traffic pattern""" |
| 99 | alert_id: str |
| 100 | level: TrafficAlertLevel |
| 101 | category: str |
| 102 | message: str |
| 103 | src_ip: Optional[str] = None |
| 104 | dst_ip: Optional[str] = None |
| 105 | details: Dict[str, Any] = field(default_factory=dict) |
| 106 | timestamp: datetime = field(default_factory=datetime.now) |
| 107 | acknowledged: bool = False |
| 108 | |
| 109 | def to_dict(self) -> Dict[str, Any]: |
| 110 | return { |
| 111 | 'alert_id': self.alert_id, |
| 112 | 'level': self.level.value, |
| 113 | 'category': self.category, |
no outgoing calls
no test coverage detected