DBTEAMGroupsSelector
Objective-C
@interface DBTEAMGroupsSelector : NSObject <DBSerializable, NSCopying>
Swift
class DBTEAMGroupsSelector : NSObject, DBSerializable, NSCopying
The GroupsSelector
union.
Argument for selecting a list of groups, either by group_ids, or external group IDs.
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) DBTEAMGroupsSelectorTag tag;
Swift
var tag: DBTEAMGroupsSelectorTag { get }
-
List of group IDs. - note: Ensure the
isGroupIds
method returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) NSArray<NSString *> *_Nonnull groupIds;
Swift
var groupIds: [String] { get }
-
List of external IDs of groups. - note: Ensure the
isGroupExternalIds
method returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) NSArray<NSString *> *_Nonnull groupExternalIds;
Swift
var groupExternalIds: [String] { get }
-
Initializes union class with tag state of “group_ids”.
Description of the “group_ids” tag state: List of group IDs.
Declaration
Objective-C
- (nonnull instancetype)initWithGroupIds: (nonnull NSArray<NSString *> *)groupIds;
Swift
init(groupIds: [String])
Parameters
groupIds
List of group IDs.
Return Value
An initialized instance.
-
Initializes union class with tag state of “group_external_ids”.
Description of the “group_external_ids” tag state: List of external IDs of groups.
Declaration
Objective-C
- (nonnull instancetype)initWithGroupExternalIds: (nonnull NSArray<NSString *> *)groupExternalIds;
Swift
init(groupExternalIds: [String])
Parameters
groupExternalIds
List of external IDs of groups.
Return Value
An initialized instance.
-
Retrieves whether the union’s current tag state has value “group_ids”.
Note
Call this method and ensure it returns true before accessing the
groupIds
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isGroupIds;
Swift
func isGroupIds() -> Bool
Return Value
Whether the union’s current tag state has value “group_ids”.
-
Retrieves whether the union’s current tag state has value “group_external_ids”.
Note
Call this method and ensure it returns true before accessing the
groupExternalIds
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isGroupExternalIds;
Swift
func isGroupExternalIds() -> Bool
Return Value
Whether the union’s current tag state has value “group_external_ids”.
-
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.