Result returned by methods that may either launch an asynchronous job or complete synchronously. Upon synchronous completion of the job, no additional information is returned. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the assoc
| 64 | LaunchResultBase_validator = bv.Union(LaunchResultBase) |
| 65 | |
| 66 | class LaunchEmptyResult(LaunchResultBase): |
| 67 | """ |
| 68 | Result returned by methods that may either launch an asynchronous job or |
| 69 | complete synchronously. Upon synchronous completion of the job, no |
| 70 | additional information is returned. |
| 71 | |
| 72 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 73 | return true. To get the associated value of a tag (if one exists), use the |
| 74 | corresponding ``get_*`` method. |
| 75 | |
| 76 | :ivar async.LaunchEmptyResult.complete: The job finished synchronously and |
| 77 | successfully. |
| 78 | """ |
| 79 | |
| 80 | # Attribute is overwritten below the class definition |
| 81 | complete = None |
| 82 | |
| 83 | def is_complete(self): |
| 84 | """ |
| 85 | Check if the union tag is ``complete``. |
| 86 | |
| 87 | :rtype: bool |
| 88 | """ |
| 89 | return self._tag == 'complete' |
| 90 | |
| 91 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 92 | super(LaunchEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 93 | |
| 94 | LaunchEmptyResult_validator = bv.Union(LaunchEmptyResult) |
| 95 |