Result of trying to delete a secondary email address. 'success' is the only value indicating that a secondary email was successfully deleted. The other values explain the type of error that occurred, and include the email for which the error occurred. This class acts as a tagge
| 1078 | DateRangeError_validator = bv.Union(DateRangeError) |
| 1079 | |
| 1080 | class DeleteSecondaryEmailResult(bb.Union): |
| 1081 | """ |
| 1082 | Result of trying to delete a secondary email address. 'success' is the only |
| 1083 | value indicating that a secondary email was successfully deleted. The other |
| 1084 | values explain the type of error that occurred, and include the email for |
| 1085 | which the error occurred. |
| 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 str team.DeleteSecondaryEmailResult.success: The secondary email was |
| 1092 | successfully deleted. |
| 1093 | :ivar str team.DeleteSecondaryEmailResult.not_found: The email address was |
| 1094 | not found for the user. |
| 1095 | :ivar str team.DeleteSecondaryEmailResult.cannot_remove_primary: The email |
| 1096 | address is the primary email address of the user, and cannot be removed. |
| 1097 | """ |
| 1098 | |
| 1099 | _catch_all = 'other' |
| 1100 | # Attribute is overwritten below the class definition |
| 1101 | other = None |
| 1102 | |
| 1103 | @classmethod |
| 1104 | def success(cls, val): |
| 1105 | """ |
| 1106 | Create an instance of this class set to the ``success`` tag with value |
| 1107 | ``val``. |
| 1108 | |
| 1109 | :param str val: |
| 1110 | :rtype: DeleteSecondaryEmailResult |
| 1111 | """ |
| 1112 | return cls('success', val) |
| 1113 | |
| 1114 | @classmethod |
| 1115 | def not_found(cls, val): |
| 1116 | """ |
| 1117 | Create an instance of this class set to the ``not_found`` tag with value |
| 1118 | ``val``. |
| 1119 | |
| 1120 | :param str val: |
| 1121 | :rtype: DeleteSecondaryEmailResult |
| 1122 | """ |
| 1123 | return cls('not_found', val) |
| 1124 | |
| 1125 | @classmethod |
| 1126 | def cannot_remove_primary(cls, val): |
| 1127 | """ |
| 1128 | Create an instance of this class set to the ``cannot_remove_primary`` |
| 1129 | tag with value ``val``. |
| 1130 | |
| 1131 | :param str val: |
| 1132 | :rtype: DeleteSecondaryEmailResult |
| 1133 | """ |
| 1134 | return cls('cannot_remove_primary', val) |
| 1135 | |
| 1136 | def is_success(self): |
| 1137 | """ |