#2682 Backport changes to core PrimAITE
This commit is contained in:
@@ -25,6 +25,10 @@ class IPProtocol(Enum):
|
||||
ICMP = "icmp"
|
||||
"""Internet Control Message Protocol."""
|
||||
|
||||
def model_dump(self) -> str:
|
||||
"""Return as JSON-serialisable string."""
|
||||
return self.name
|
||||
|
||||
|
||||
class Precedence(Enum):
|
||||
"""
|
||||
|
||||
@@ -72,6 +72,10 @@ class Port(Enum):
|
||||
POSTGRES_SERVER = 5432
|
||||
"Postgres SQL Server."
|
||||
|
||||
def model_dump(self) -> str:
|
||||
"""Return a json-serialisable string."""
|
||||
return self.name
|
||||
|
||||
|
||||
class UDPHeader(BaseModel):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user