DBFILESSaveUrlError

Objective-C

@interface DBFILESSaveUrlError : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESSaveUrlError : NSObject, DBSerializable, NSCopying

The SaveUrlError 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) DBFILESSaveUrlErrorTag tag;

    Swift

    var tag: DBFILESSaveUrlErrorTag { get }
  • (no description). - note: Ensure the isPath method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBFILESWriteError *_Nonnull path;

    Swift

    var path: DBFILESWriteError { get }

Constructors

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull DBFILESWriteError *)path;

    Swift

    init(path: DBFILESWriteError)

    Parameters

    path

    (no description).

    Return Value

    An initialized instance.

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

    Description of the “download_failed” tag state: Failed downloading the given URL. The URL may be password-protected and the password provided was incorrect, or the link may be disabled.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDownloadFailed;

    Swift

    init(downloadFailed: ())

    Return Value

    An initialized instance.

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

    Description of the “invalid_url” tag state: The given URL is invalid.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInvalidUrl;

    Swift

    init(invalidUrl: ())

    Return Value

    An initialized instance.

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

    Description of the “not_found” tag state: The file where the URL is saved to no longer exists.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNotFound;

    Swift

    init(notFound: ())

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isPath;

    Swift

    func isPath() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isDownloadFailed;

    Swift

    func isDownloadFailed() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isInvalidUrl;

    Swift

    func isInvalidUrl() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isNotFound;

    Swift

    func isNotFound() -> Bool

    Return Value

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

  • 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.