2020-01-21 02:38:04 -07:00
|
|
|
"""Response model."""
|
|
|
|
# Standard Library Imports
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
# Third Party Imports
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from pydantic import StrictStr
|
|
|
|
from pydantic import constr
|
|
|
|
|
|
|
|
|
2020-01-21 17:30:14 -07:00
|
|
|
class QueryError(BaseModel):
|
2020-01-21 02:38:04 -07:00
|
|
|
"""Query response model."""
|
|
|
|
|
|
|
|
output: StrictStr
|
2020-01-21 17:30:14 -07:00
|
|
|
level: constr(regex=r"(success|warning|error|danger)")
|
2020-01-21 02:38:04 -07:00
|
|
|
keywords: List[StrictStr]
|
2020-01-21 17:30:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
class QueryResponse(BaseModel):
|
|
|
|
"""Query response model."""
|
|
|
|
|
|
|
|
output: StrictStr
|
|
|
|
level: constr(regex=r"(success|warning|error|danger)")
|
|
|
|
keywords: List[StrictStr] = []
|