The desired export format of the Paper doc. 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.ExportFormat.html: The HTML export format
| 448 | DocSubscriptionLevel_validator = bv.Union(DocSubscriptionLevel) |
| 449 | |
| 450 | class ExportFormat(bb.Union): |
| 451 | """ |
| 452 | The desired export format of the Paper doc. |
| 453 | |
| 454 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 455 | return true. To get the associated value of a tag (if one exists), use the |
| 456 | corresponding ``get_*`` method. |
| 457 | |
| 458 | :ivar paper.ExportFormat.html: The HTML export format. |
| 459 | :ivar paper.ExportFormat.markdown: The markdown export format. |
| 460 | """ |
| 461 | |
| 462 | _catch_all = 'other' |
| 463 | # Attribute is overwritten below the class definition |
| 464 | html = None |
| 465 | # Attribute is overwritten below the class definition |
| 466 | markdown = None |
| 467 | # Attribute is overwritten below the class definition |
| 468 | other = None |
| 469 | |
| 470 | def is_html(self): |
| 471 | """ |
| 472 | Check if the union tag is ``html``. |
| 473 | |
| 474 | :rtype: bool |
| 475 | """ |
| 476 | return self._tag == 'html' |
| 477 | |
| 478 | def is_markdown(self): |
| 479 | """ |
| 480 | Check if the union tag is ``markdown``. |
| 481 | |
| 482 | :rtype: bool |
| 483 | """ |
| 484 | return self._tag == 'markdown' |
| 485 | |
| 486 | def is_other(self): |
| 487 | """ |
| 488 | Check if the union tag is ``other``. |
| 489 | |
| 490 | :rtype: bool |
| 491 | """ |
| 492 | return self._tag == 'other' |
| 493 | |
| 494 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 495 | super(ExportFormat, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 496 | |
| 497 | ExportFormat_validator = bv.Union(ExportFormat) |
| 498 |