DBAUTHAccessError

Objective-C

@interface DBAUTHAccessError : NSObject <DBSerializable, NSCopying>

Swift

class DBAUTHAccessError : NSObject, DBSerializable, NSCopying

The AccessError union.

Error occurred because the account doesn’t have permission to access the resource.

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

Instance fields

Constructors

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

    Description of the “invalid_account_type” tag state: Current account type cannot access the resource.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInvalidAccountType:
        (nonnull DBAUTHInvalidAccountTypeError *)invalidAccountType;

    Swift

    init(invalidAccountType: DBAUTHInvalidAccountTypeError)

    Parameters

    invalidAccountType

    Current account type cannot access the resource.

    Return Value

    An initialized instance.

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

    Description of the “paper_access_denied” tag state: Current account cannot access Paper.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPaperAccessDenied:
        (nonnull DBAUTHPaperAccessError *)paperAccessDenied;

    Swift

    init(paperAccessDenied: DBAUTHPaperAccessError)

    Parameters

    paperAccessDenied

    Current account cannot access Paper.

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isInvalidAccountType;

    Swift

    func isInvalidAccountType() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isPaperAccessDenied;

    Swift

    func isPaperAccessDenied() -> Bool

    Return Value

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

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