DBTEAMUsersSelectorArg

Objective-C

@interface DBTEAMUsersSelectorArg : NSObject <DBSerializable, NSCopying>

Swift

class DBTEAMUsersSelectorArg : NSObject, DBSerializable, NSCopying

The UsersSelectorArg union.

Argument for selecting a list of users, either by team_member_ids, external_ids or emails.

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

    Swift

    var tag: DBTEAMUsersSelectorArgTag { get }
  • List of member IDs. - note: Ensure the isTeamMemberIds method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSString *> *_Nonnull teamMemberIds;

    Swift

    var teamMemberIds: [String] { get }
  • List of external user IDs. - note: Ensure the isExternalIds method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSString *> *_Nonnull externalIds;

    Swift

    var externalIds: [String] { get }
  • List of email addresses. - note: Ensure the isEmails method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSString *> *_Nonnull emails;

    Swift

    var emails: [String] { get }

Constructors

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

    Description of the “team_member_ids” tag state: List of member IDs.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTeamMemberIds:
        (nonnull NSArray<NSString *> *)teamMemberIds;

    Swift

    init(teamMemberIds: [String])

    Parameters

    teamMemberIds

    List of member IDs.

    Return Value

    An initialized instance.

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

    Description of the “external_ids” tag state: List of external user IDs.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithExternalIds:
        (nonnull NSArray<NSString *> *)externalIds;

    Swift

    init(externalIds: [String])

    Parameters

    externalIds

    List of external user IDs.

    Return Value

    An initialized instance.

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

    Description of the “emails” tag state: List of email addresses.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithEmails:(nonnull NSArray<NSString *> *)emails;

    Swift

    init(emails: [String])

    Parameters

    emails

    List of email addresses.

    Return Value

    An initialized instance.

Tag state methods

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isTeamMemberIds;

    Swift

    func isTeamMemberIds() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isExternalIds;

    Swift

    func isExternalIds() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isEmails;

    Swift

    func isEmails() -> Bool

    Return Value

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

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