DBFILESPreviewError

@interface DBFILESPreviewError : NSObject <DBSerializable, NSCopying>

The PreviewError union.

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

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESPreviewErrorTag tag;

    Swift

    var tag: DBFILESPreviewErrorTag { get }
  • An error occurs when downloading metadata for the file. - note: Ensure the isPath method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var path: DBFILESLookupError { get }
  • Initializes union class with tag state of path.

    Description of the path tag state: An error occurs when downloading metadata for the file.

    Declaration

    Objective-C

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

    Swift

    init(path: DBFILESLookupError)

    Parameters

    path

    An error occurs when downloading metadata for the file.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of in_progress.

    Description of the in_progress tag state: This preview generation is still in progress and the file is not ready for preview yet.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInProgress;

    Swift

    init(inProgress: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of unsupported_extension.

    Description of the unsupported_extension tag state: The file extension is not supported preview generation.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUnsupportedExtension;

    Swift

    init(unsupportedExtension: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of unsupported_content.

    Description of the unsupported_content tag state: The file content is not supported for preview generation.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUnsupportedContent;

    Swift

    init(unsupportedContent: ())

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (BOOL)isInProgress;

    Swift

    func isInProgress() -> Bool

    Return Value

    Whether the union’s current tag state has value in_progress.

  • Retrieves whether the union’s current tag state has value unsupported_extension.

    Declaration

    Objective-C

    - (BOOL)isUnsupportedExtension;

    Swift

    func isUnsupportedExtension() -> Bool

    Return Value

    Whether the union’s current tag state has value unsupported_extension.

  • Retrieves whether the union’s current tag state has value unsupported_content.

    Declaration

    Objective-C

    - (BOOL)isUnsupportedContent;

    Swift

    func isUnsupportedContent() -> Bool

    Return Value

    Whether the union’s current tag state has value unsupported_content.

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