DBTEAMGroupSelector

@interface DBTEAMGroupSelector : NSObject <DBSerializable, NSCopying>

The GroupSelector union.

Argument for selecting a single group, either by group_id or by external group ID.

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

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBTEAMGroupSelectorTag tag;

    Swift

    var tag: DBTEAMGroupSelectorTag { get }
  • Group ID. - note: Ensure the isGroupId method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var groupId: String { get }
  • External ID of the group. - note: Ensure the isGroupExternalId method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var groupExternalId: String { get }
  • Initializes union class with tag state of group_id.

    Description of the group_id tag state: Group ID.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGroupId:(nonnull NSString *)groupId;

    Swift

    init(groupId: String)

    Parameters

    groupId

    Group ID.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of group_external_id.

    Description of the group_external_id tag state: External ID of the group.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGroupExternalId:
        (nonnull NSString *)groupExternalId;

    Swift

    init(groupExternalId: String)

    Parameters

    groupExternalId

    External ID of the group.

    Return Value

    An initialized instance.

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isGroupId;

    Swift

    func isGroupId() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isGroupExternalId;

    Swift

    func isGroupExternalId() -> Bool

    Return Value

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

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