DBSHARINGFileErrorResult

Objective-C

@interface DBSHARINGFileErrorResult : NSObject <DBSerializable, NSCopying>

Swift

class DBSHARINGFileErrorResult : NSObject, DBSerializable, NSCopying

The FileErrorResult union.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBSHARINGFileErrorResultTag tag;

    Swift

    var tag: DBSHARINGFileErrorResultTag { get }
  • File specified by id was not found. - note: Ensure the isFileNotFoundError method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull fileNotFoundError;

    Swift

    var fileNotFoundError: String { get }
  • User does not have permission to take the specified action on the file.

    Note

    Ensure the isInvalidFileActionError method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull invalidFileActionError;

    Swift

    var invalidFileActionError: String { get }
  • User does not have permission to access file specified by file.Id. @note Ensure the isPermissionDeniedError method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull permissionDeniedError;

    Swift

    var permissionDeniedError: String { get }

Constructors

  • Initializes union class with tag state of “file_not_found_error”.

    Description of the “file_not_found_error” tag state: File specified by id was not found.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFileNotFoundError:
        (nonnull NSString *)fileNotFoundError;

    Swift

    init(fileNotFoundError: String)

    Parameters

    fileNotFoundError

    File specified by id was not found.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “invalid_file_action_error”.

    Description of the “invalid_file_action_error” tag state: User does not have permission to take the specified action on the file.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInvalidFileActionError:
        (nonnull NSString *)invalidFileActionError;

    Swift

    init(invalidFileActionError: String)

    Parameters

    invalidFileActionError

    User does not have permission to take the specified action on the file.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “permission_denied_error”.

    Description of the “permission_denied_error” tag state: User does not have permission to access file specified by file.Id.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPermissionDeniedError:
        (nonnull NSString *)permissionDeniedError;

    Swift

    init(permissionDeniedError: String)

    Parameters

    permissionDeniedError

    User does not have permission to access file specified by file.Id.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “other”.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOther;

    Swift

    init(other: ())

    Return Value

    An initialized instance.

Tag state methods

  • Retrieves whether the union’s current tag state has value “file_not_found_error”.

    Note

    Call this method and ensure it returns true before accessing the fileNotFoundError property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isFileNotFoundError;

    Swift

    func isFileNotFoundError() -> Bool

    Return Value

    Whether the union’s current tag state has value “file_not_found_error”.

  • Retrieves whether the union’s current tag state has value “invalid_file_action_error”.

    Note

    Call this method and ensure it returns true before accessing the invalidFileActionError property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isInvalidFileActionError;

    Swift

    func isInvalidFileActionError() -> Bool

    Return Value

    Whether the union’s current tag state has value “invalid_file_action_error”.

  • Retrieves whether the union’s current tag state has value “permission_denied_error”.

    Note

    Call this method and ensure it returns true before accessing the permissionDeniedError property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isPermissionDeniedError;

    Swift

    func isPermissionDeniedError() -> Bool

    Return Value

    Whether the union’s current tag state has value “permission_denied_error”.

  • Retrieves whether the union’s current tag state has value “other”.

    Declaration

    Objective-C

    - (BOOL)isOther;

    Swift

    func isOther() -> Bool

    Return Value

    Whether the union’s current tag state has value “other”.

  • Retrieves string value of union’s current tag state.

    Declaration

    Objective-C

    - (nonnull NSString *)tagName;

    Swift

    func tagName() -> String

    Return Value

    A human-readable string representing the union’s current tag state.