DBTEAMUserSelectorArg

Objective-C

@interface DBTEAMUserSelectorArg : NSObject <DBSerializable, NSCopying>

Swift

class DBTEAMUserSelectorArg : NSObject, DBSerializable, NSCopying

The UserSelectorArg union.

Argument for selecting a single user, either by team_member_id, external_id or email.

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) DBTEAMUserSelectorArgTag tag;

    Swift

    var tag: DBTEAMUserSelectorArgTag { get }
  • (no description). - note: Ensure the isTeamMemberId method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull teamMemberId;

    Swift

    var teamMemberId: String { get }
  • (no description). - note: Ensure the isExternalId method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull externalId;

    Swift

    var externalId: String { get }
  • (no description). - note: Ensure the isEmail method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull email;

    Swift

    var email: String { get }

Constructors

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTeamMemberId:(nonnull NSString *)teamMemberId;

    Swift

    init(teamMemberId: String)

    Parameters

    teamMemberId

    (no description).

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithExternalId:(nonnull NSString *)externalId;

    Swift

    init(externalId: String)

    Parameters

    externalId

    (no description).

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithEmail:(nonnull NSString *)email;

    Swift

    init(email: String)

    Parameters

    email

    (no description).

    Return Value

    An initialized instance.

Tag state methods

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isTeamMemberId;

    Swift

    func isTeamMemberId() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isExternalId;

    Swift

    func isExternalId() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isEmail;

    Swift

    func isEmail() -> Bool

    Return Value

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

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