DBUSERSSpaceAllocation

@interface DBUSERSSpaceAllocation : NSObject <DBSerializable, NSCopying>

The SpaceAllocation union.

Space is allocated differently based on the type of account.

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

  • Initializes union class with tag state of individual.

    Description of the individual tag state: The user’s space allocation applies only to their individual account.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIndividual:
        (nonnull DBUSERSIndividualSpaceAllocation *)individual;

    Swift

    init(individual: DBUSERSIndividualSpaceAllocation)

    Parameters

    individual

    The user’s space allocation applies only to their individual account.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of team.

    Description of the team tag state: The user shares space with other members of their team.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTeam:(nonnull DBUSERSTeamSpaceAllocation *)team;

    Swift

    init(team: DBUSERSTeamSpaceAllocation)

    Parameters

    team

    The user shares space with other members of their team.

    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.

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isIndividual;

    Swift

    func isIndividual() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isTeam;

    Swift

    func isTeam() -> Bool

    Return Value

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

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