| 40 | |
| 41 | |
| 42 | class ViewScanConsistency(Enum): |
| 43 | NOT_BOUNDED = 'ok' |
| 44 | REQUEST_PLUS = 'false' |
| 45 | UPDATE_AFTER = 'update_after' |
| 46 | |
| 47 | def to_str(self) -> str: |
| 48 | if self.value == 'false': |
| 49 | return 'request_plus' |
| 50 | elif self.value == 'ok': |
| 51 | return 'not_bounded' |
| 52 | else: |
| 53 | return self.value |
| 54 | |
| 55 | @classmethod |
| 56 | def from_str(cls, value: str) -> ViewScanConsistency: |
| 57 | if value in ['false', 'request_plus']: |
| 58 | return cls.REQUEST_PLUS |
| 59 | elif value in ['ok', 'not_bounded']: |
| 60 | return cls.NOT_BOUNDED |
| 61 | elif value == 'update_after': |
| 62 | return cls.UPDATE_AFTER |
| 63 | |
| 64 | |
| 65 | class ViewOrdering(Enum): |