| from pydantic import BaseModel, Field |
| from typing import Literal, List, Union, Optional |
|
|
|
|
| class BehaviorSimple(BaseModel): |
| type: str |
| description: Optional[str] = None |
|
|
|
|
| |
| class GeneralWeakness(BehaviorSimple): |
| type: Literal["general weakness"] |
| description: Optional[ |
| Literal[ |
| "Abnormal breathing (dyspnoea), sudden crash, apathy, lethargy, unable to fly but responsive" |
| ] |
| ] = None |
|
|
|
|
| class Vomiting(BehaviorSimple): |
| type: Literal["vomiting"] |
| description: Optional[Literal["Throwing up undigested food, regurgitating"]] = None |
|
|
|
|
| class AtypicalBehavior(BehaviorSimple): |
| type: Literal["atypical behavior"] |
| description: Optional[ |
| Literal["Circling, incoordination, tremors, convulsions"] |
| ] = None |
|
|
|
|
| class NoChanges(BehaviorSimple): |
| type: Literal["no changes"] |
| description: Optional[Literal["Animal is acting normally"]] = None |
|
|
|
|
| |
| BehaviorSimpleType = Union[GeneralWeakness, Vomiting, AtypicalBehavior, NoChanges] |
|
|
|
|
| |
| class BehaviorsSimple(BaseModel): |
| behaviors_radio: str |
| behaviors_type: Optional[List[BehaviorSimpleType]] = None |
|
|