mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
25 lines
544 B
Python
25 lines
544 B
Python
"""Response model."""
|
|
# Standard Library Imports
|
|
from typing import List
|
|
|
|
# Third Party Imports
|
|
from pydantic import BaseModel
|
|
from pydantic import StrictStr
|
|
from pydantic import constr
|
|
|
|
|
|
class QueryError(BaseModel):
|
|
"""Query response model."""
|
|
|
|
output: StrictStr
|
|
level: constr(regex=r"(success|warning|error|danger)")
|
|
keywords: List[StrictStr]
|
|
|
|
|
|
class QueryResponse(BaseModel):
|
|
"""Query response model."""
|
|
|
|
output: StrictStr
|
|
level: constr(regex=r"(success|warning|error|danger)")
|
|
keywords: List[StrictStr] = []
|