DBFILESThumbnailV2Error

Objective-C

@interface DBFILESThumbnailV2Error : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESThumbnailV2Error : NSObject, DBSerializable, NSCopying

The ThumbnailV2Error 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) DBFILESThumbnailV2ErrorTag tag;

    Swift

    var tag: DBFILESThumbnailV2ErrorTag { get }
  • An error occurred 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 occurred when downloading metadata for the image.

    Declaration

    Objective-C

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

    Swift

    init(path: DBFILESLookupError)

    Parameters

    path

    An error occurred 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 occurred during thumbnail conversion.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithConversionError;

    Swift

    init(conversionError: ())

    Return Value

    An initialized instance.

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

    Description of the “access_denied” tag state: Access to this shared link is forbidden.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccessDenied;

    Swift

    init(accessDenied: ())

    Return Value

    An initialized instance.

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

    Description of the “not_found” tag state: The shared link does not exist.

    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 “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 whether the union’s current tag state has value “access_denied”.

    Declaration

    Objective-C

    - (BOOL)isAccessDenied;

    Swift

    func isAccessDenied() -> Bool

    Return Value

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

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