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

Class DeleteBatchJobStatus

dropbox/files.py:1113–1200  ·  view source on GitHub ↗

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 DeleteBatchResult DeleteBatchJobStatus.complete: The batch delete has finished. :iva

Source from the content-addressed store, hash-verified

1111DeleteBatchError_validator = bv.Union(DeleteBatchError)
1112
1113class DeleteBatchJobStatus(async_.PollResultBase):
1114 """
1115 This class acts as a tagged union. Only one of the ``is_*`` methods will
1116 return true. To get the associated value of a tag (if one exists), use the
1117 corresponding ``get_*`` method.
1118
1119 :ivar DeleteBatchResult DeleteBatchJobStatus.complete: The batch delete has
1120 finished.
1121 :ivar DeleteBatchError DeleteBatchJobStatus.failed: The batch delete has
1122 failed.
1123 """
1124
1125 _catch_all = 'other'
1126 # Attribute is overwritten below the class definition
1127 other = None
1128
1129 @classmethod
1130 def complete(cls, val):
1131 """
1132 Create an instance of this class set to the ``complete`` tag with value
1133 ``val``.
1134
1135 :param DeleteBatchResult val:
1136 :rtype: DeleteBatchJobStatus
1137 """
1138 return cls('complete', val)
1139
1140 @classmethod
1141 def failed(cls, val):
1142 """
1143 Create an instance of this class set to the ``failed`` tag with value
1144 ``val``.
1145
1146 :param DeleteBatchError val:
1147 :rtype: DeleteBatchJobStatus
1148 """
1149 return cls('failed', val)
1150
1151 def is_complete(self):
1152 """
1153 Check if the union tag is ``complete``.
1154
1155 :rtype: bool
1156 """
1157 return self._tag == 'complete'
1158
1159 def is_failed(self):
1160 """
1161 Check if the union tag is ``failed``.
1162
1163 :rtype: bool
1164 """
1165 return self._tag == 'failed'
1166
1167 def is_other(self):
1168 """
1169 Check if the union tag is ``other``.
1170

Callers 1

files.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected