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

Class FileErrorResult

dropbox/sharing.py:1853–1973  ·  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 str sharing.FileErrorResult.file_not_found_error: File specified by id was not found.

Source from the content-addressed store, hash-verified

1851FileAction_validator = bv.Union(FileAction)
1852
1853class FileErrorResult(bb.Union):
1854 """
1855 This class acts as a tagged union. Only one of the ``is_*`` methods will
1856 return true. To get the associated value of a tag (if one exists), use the
1857 corresponding ``get_*`` method.
1858
1859 :ivar str sharing.FileErrorResult.file_not_found_error: File specified by id
1860 was not found.
1861 :ivar str sharing.FileErrorResult.invalid_file_action_error: User does not
1862 have permission to take the specified action on the file.
1863 :ivar str sharing.FileErrorResult.permission_denied_error: User does not
1864 have permission to access file specified by file.Id.
1865 """
1866
1867 _catch_all = 'other'
1868 # Attribute is overwritten below the class definition
1869 other = None
1870
1871 @classmethod
1872 def file_not_found_error(cls, val):
1873 """
1874 Create an instance of this class set to the ``file_not_found_error`` tag
1875 with value ``val``.
1876
1877 :param str val:
1878 :rtype: FileErrorResult
1879 """
1880 return cls('file_not_found_error', val)
1881
1882 @classmethod
1883 def invalid_file_action_error(cls, val):
1884 """
1885 Create an instance of this class set to the
1886 ``invalid_file_action_error`` tag with value ``val``.
1887
1888 :param str val:
1889 :rtype: FileErrorResult
1890 """
1891 return cls('invalid_file_action_error', val)
1892
1893 @classmethod
1894 def permission_denied_error(cls, val):
1895 """
1896 Create an instance of this class set to the ``permission_denied_error``
1897 tag with value ``val``.
1898
1899 :param str val:
1900 :rtype: FileErrorResult
1901 """
1902 return cls('permission_denied_error', val)
1903
1904 def is_file_not_found_error(self):
1905 """
1906 Check if the union tag is ``file_not_found_error``.
1907
1908 :rtype: bool
1909 """
1910 return self._tag == 'file_not_found_error'

Callers 1

sharing.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected