DBTEAMTeamMemberStatus
Objective-C
@interface DBTEAMTeamMemberStatus : NSObject <DBSerializable, NSCopying>
Swift
class DBTEAMTeamMemberStatus : NSObject, DBSerializable, NSCopying
The TeamMemberStatus
union.
The user’s status as a member of a specific team.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
Represents the union’s current tag state.
Declaration
Objective-C
@property (nonatomic, readonly) DBTEAMTeamMemberStatusTag tag;
Swift
var tag: DBTEAMTeamMemberStatusTag { get }
-
User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list. - note: Ensure the
isRemoved
method returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) DBTEAMRemovedStatus *_Nonnull removed;
Swift
var removed: DBTEAMRemovedStatus { get }
-
Initializes union class with tag state of “active”.
Description of the “active” tag state: User has successfully joined the team.
Declaration
Objective-C
- (nonnull instancetype)initWithActive;
Swift
init(active: ())
Return Value
An initialized instance.
-
Initializes union class with tag state of “invited”.
Description of the “invited” tag state: User has been invited to a team, but has not joined the team yet.
Declaration
Objective-C
- (nonnull instancetype)initWithInvited;
Swift
init(invited: ())
Return Value
An initialized instance.
-
Initializes union class with tag state of “suspended”.
Description of the “suspended” tag state: User is no longer a member of the team, but the account can be un-suspended, re-establishing the user as a team member.
Declaration
Objective-C
- (nonnull instancetype)initWithSuspended;
Swift
init(suspended: ())
Return Value
An initialized instance.
-
Initializes union class with tag state of “removed”.
Description of the “removed” tag state: User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list.
Declaration
Objective-C
- (nonnull instancetype)initWithRemoved:(nonnull DBTEAMRemovedStatus *)removed;
Swift
init(removed: DBTEAMRemovedStatus)
Parameters
removed
User is no longer a member of the team. Removed users are only listed when include_removed is true in members/list.
Return Value
An initialized instance.
-
Retrieves whether the union’s current tag state has value “active”.
Declaration
Objective-C
- (BOOL)isActive;
Swift
func isActive() -> Bool
Return Value
Whether the union’s current tag state has value “active”.
-
Retrieves whether the union’s current tag state has value “invited”.
Declaration
Objective-C
- (BOOL)isInvited;
Swift
func isInvited() -> Bool
Return Value
Whether the union’s current tag state has value “invited”.
-
Retrieves whether the union’s current tag state has value “suspended”.
Declaration
Objective-C
- (BOOL)isSuspended;
Swift
func isSuspended() -> Bool
Return Value
Whether the union’s current tag state has value “suspended”.
-
Retrieves whether the union’s current tag state has value “removed”.
Note
Call this method and ensure it returns true before accessing the
removed
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isRemoved;
Swift
func isRemoved() -> Bool
Return Value
Whether the union’s current tag state has value “removed”.
-
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.