DBFILESThumbnailError

Objective-C

@interface DBFILESThumbnailError : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESThumbnailError : NSObject, DBSerializable, NSCopying

The ThumbnailError 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) DBFILESThumbnailErrorTag tag;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var path: DBFILESLookupError { get }

Constructors

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

    Description of the “path” tag state: An error occurs when downloading metadata for the image.

    Declaration

    Objective-C

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

    Swift

    init(path: DBFILESLookupError)

    Parameters

    path

    An error occurs when downloading metadata for the image.

    Return Value

    An initialized instance.

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

    Description of the “unsupported_extension” tag state: The file extension doesn’t allow conversion to a thumbnail.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUnsupportedExtension;

    Swift

    init(unsupportedExtension: ())

    Return Value

    An initialized instance.

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

    Description of the “unsupported_image” tag state: The image cannot be converted to a thumbnail.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUnsupportedImage;

    Swift

    init(unsupportedImage: ())

    Return Value

    An initialized instance.

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

    Description of the “conversion_error” tag state: An error occurs during thumbnail conversion.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithConversionError;

    Swift

    init(conversionError: ())

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

    Declaration

    Objective-C

    - (BOOL)isUnsupportedImage;

    Swift

    func isUnsupportedImage() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isConversionError;

    Swift

    func isConversionError() -> Bool

    Return Value

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

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