DBFILESLockFileError

Objective-C

@interface DBFILESLockFileError : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESLockFileError : NSObject, DBSerializable, NSCopying

The LockFileError 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) DBFILESLockFileErrorTag tag;

    Swift

    var tag: DBFILESLockFileErrorTag { get }
  • Could not find the specified resource. - note: Ensure the isPathLookup method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESLookupError *_Nonnull pathLookup;

    Swift

    var pathLookup: DBFILESLookupError { get }
  • The user action conflicts with an existing lock on the file. - note: Ensure the isLockConflict method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESLockConflictError *_Nonnull lockConflict;

    Swift

    var lockConflict: DBFILESLockConflictError { get }

Constructors

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

    Description of the “path_lookup” tag state: Could not find the specified resource.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPathLookup:
        (nonnull DBFILESLookupError *)pathLookup;

    Swift

    init(pathLookup: DBFILESLookupError)

    Parameters

    pathLookup

    Could not find the specified resource.

    Return Value

    An initialized instance.

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

    Description of the “too_many_write_operations” tag state: There are too many write operations in user’s Dropbox. Please retry this request.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTooManyWriteOperations;

    Swift

    init(tooManyWriteOperations: ())

    Return Value

    An initialized instance.

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

    Description of the “too_many_files” tag state: There are too many files in one request. Please retry with fewer files.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTooManyFiles;

    Swift

    init(tooManyFiles: ())

    Return Value

    An initialized instance.

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

    Description of the “no_write_permission” tag state: The user does not have permissions to change the lock state or access the file.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNoWritePermission;

    Swift

    init(noWritePermission: ())

    Return Value

    An initialized instance.

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

    Description of the “cannot_be_locked” tag state: Item is a type that cannot be locked.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCannotBeLocked;

    Swift

    init(cannotBeLocked: ())

    Return Value

    An initialized instance.

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

    Description of the “file_not_shared” tag state: Requested file is not currently shared.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFileNotShared;

    Swift

    init(fileNotShared: ())

    Return Value

    An initialized instance.

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

    Description of the “lock_conflict” tag state: The user action conflicts with an existing lock on the file.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLockConflict:
        (nonnull DBFILESLockConflictError *)lockConflict;

    Swift

    init(lockConflict: DBFILESLockConflictError)

    Parameters

    lockConflict

    The user action conflicts with an existing lock on the file.

    Return Value

    An initialized instance.

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

    Description of the “internal_error” tag state: Something went wrong with the job on Dropbox’s end. You’ll need to verify that the action you were taking succeeded, and if not, try again. This should happen very rarely.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInternalError;

    Swift

    init(internalError: ())

    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 “path_lookup”.

    Note

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

    Declaration

    Objective-C

    - (BOOL)isPathLookup;

    Swift

    func isPathLookup() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isTooManyWriteOperations;

    Swift

    func isTooManyWriteOperations() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isTooManyFiles;

    Swift

    func isTooManyFiles() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isNoWritePermission;

    Swift

    func isNoWritePermission() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isCannotBeLocked;

    Swift

    func isCannotBeLocked() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isFileNotShared;

    Swift

    func isFileNotShared() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isLockConflict;

    Swift

    func isLockConflict() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isInternalError;

    Swift

    func isInternalError() -> Bool

    Return Value

    Whether the union’s current tag state has value “internal_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.