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.PaperApiBaseError.insufficient_permissions: Your account does not have permissions
| 318 | Cursor_validator = bv.Struct(Cursor) |
| 319 | |
| 320 | class PaperApiBaseError(bb.Union): |
| 321 | """ |
| 322 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 323 | return true. To get the associated value of a tag (if one exists), use the |
| 324 | corresponding ``get_*`` method. |
| 325 | |
| 326 | :ivar paper.PaperApiBaseError.insufficient_permissions: Your account does |
| 327 | not have permissions to perform this action. This may be due to it only |
| 328 | having access to Paper as files in the Dropbox filesystem. For more |
| 329 | information, refer to the `Paper Migration Guide |
| 330 | <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>`_. |
| 331 | """ |
| 332 | |
| 333 | _catch_all = 'other' |
| 334 | # Attribute is overwritten below the class definition |
| 335 | insufficient_permissions = None |
| 336 | # Attribute is overwritten below the class definition |
| 337 | other = None |
| 338 | |
| 339 | def is_insufficient_permissions(self): |
| 340 | """ |
| 341 | Check if the union tag is ``insufficient_permissions``. |
| 342 | |
| 343 | :rtype: bool |
| 344 | """ |
| 345 | return self._tag == 'insufficient_permissions' |
| 346 | |
| 347 | def is_other(self): |
| 348 | """ |
| 349 | Check if the union tag is ``other``. |
| 350 | |
| 351 | :rtype: bool |
| 352 | """ |
| 353 | return self._tag == 'other' |
| 354 | |
| 355 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 356 | super(PaperApiBaseError, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 357 | |
| 358 | PaperApiBaseError_validator = bv.Union(PaperApiBaseError) |
| 359 |