MCPcopy Create free account
hub / github.com/dropbox/dropbox-sdk-python / PollResultBase

Class PollResultBase

dropbox/async_.py:124–152  ·  view source on GitHub ↗

Result returned by methods that poll for the status of an asynchronous job. Unions that extend this union should add a 'complete' field with a type of the information returned upon job completion. See :class:`PollEmptyResult` for an example. This class acts as a tagged union. O

Source from the content-addressed store, hash-verified

122PollArg_validator = bv.Struct(PollArg)
123
124class PollResultBase(bb.Union):
125 """
126 Result returned by methods that poll for the status of an asynchronous job.
127 Unions that extend this union should add a 'complete' field with a type of
128 the information returned upon job completion. See :class:`PollEmptyResult`
129 for an example.
130
131 This class acts as a tagged union. Only one of the ``is_*`` methods will
132 return true. To get the associated value of a tag (if one exists), use the
133 corresponding ``get_*`` method.
134
135 :ivar async.PollResultBase.in_progress: The asynchronous job is still in
136 progress.
137 """
138
139 _catch_all = None
140 # Attribute is overwritten below the class definition
141 in_progress = None
142
143 def is_in_progress(self):
144 """
145 Check if the union tag is ``in_progress``.
146
147 :rtype: bool
148 """
149 return self._tag == 'in_progress'
150
151 def _process_custom_annotations(self, annotation_type, field_path, processor):
152 super(PollResultBase, self)._process_custom_annotations(annotation_type, field_path, processor)
153
154PollResultBase_validator = bv.Union(PollResultBase)
155

Callers 1

async_.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected