This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar paper.ListPaperDocsSortOrder.ascending: Sorts the search result in ascending order.
| 1083 | ListPaperDocsSortBy_validator = bv.Union(ListPaperDocsSortBy) |
| 1084 | |
| 1085 | class ListPaperDocsSortOrder(bb.Union): |
| 1086 | """ |
| 1087 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 1088 | return true. To get the associated value of a tag (if one exists), use the |
| 1089 | corresponding ``get_*`` method. |
| 1090 | |
| 1091 | :ivar paper.ListPaperDocsSortOrder.ascending: Sorts the search result in |
| 1092 | ascending order. |
| 1093 | :ivar paper.ListPaperDocsSortOrder.descending: Sorts the search result in |
| 1094 | descending order. |
| 1095 | """ |
| 1096 | |
| 1097 | _catch_all = 'other' |
| 1098 | # Attribute is overwritten below the class definition |
| 1099 | ascending = None |
| 1100 | # Attribute is overwritten below the class definition |
| 1101 | descending = None |
| 1102 | # Attribute is overwritten below the class definition |
| 1103 | other = None |
| 1104 | |
| 1105 | def is_ascending(self): |
| 1106 | """ |
| 1107 | Check if the union tag is ``ascending``. |
| 1108 | |
| 1109 | :rtype: bool |
| 1110 | """ |
| 1111 | return self._tag == 'ascending' |
| 1112 | |
| 1113 | def is_descending(self): |
| 1114 | """ |
| 1115 | Check if the union tag is ``descending``. |
| 1116 | |
| 1117 | :rtype: bool |
| 1118 | """ |
| 1119 | return self._tag == 'descending' |
| 1120 | |
| 1121 | def is_other(self): |
| 1122 | """ |
| 1123 | Check if the union tag is ``other``. |
| 1124 | |
| 1125 | :rtype: bool |
| 1126 | """ |
| 1127 | return self._tag == 'other' |
| 1128 | |
| 1129 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 1130 | super(ListPaperDocsSortOrder, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 1131 | |
| 1132 | ListPaperDocsSortOrder_validator = bv.Union(ListPaperDocsSortOrder) |
| 1133 |