| 63 | |
| 64 | |
| 65 | class ViewOrdering(Enum): |
| 66 | DESCENDING = 'true' |
| 67 | ASCENDING = 'false' |
| 68 | |
| 69 | def to_str(self) -> str: |
| 70 | if self.value == 'false': |
| 71 | return 'ascending' |
| 72 | else: |
| 73 | return 'descending' |
| 74 | |
| 75 | @classmethod |
| 76 | def from_str(cls, value: str) -> ViewOrdering: |
| 77 | if value == 'descending': |
| 78 | return cls.DESCENDING |
| 79 | else: |
| 80 | return cls.ASCENDING |
| 81 | |
| 82 | |
| 83 | class ViewErrorMode(Enum): |