DBTEAMGroupMembersAddError

Objective-C

@interface DBTEAMGroupMembersAddError : NSObject <DBSerializable, NSCopying>

Swift

class DBTEAMGroupMembersAddError : NSObject, DBSerializable, NSCopying

The GroupMembersAddError union.

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

    Swift

    var tag: DBTEAMGroupMembersAddErrorTag { get }
  • These members are not part of your team. Currently, you cannot add members to a group if they are not part of your team, though this may change in a subsequent version. To add new members to your Dropbox Business team, use the membersAdd endpoint. - note: Ensure the isMembersNotInTeam method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var membersNotInTeam: [String] { get }
  • These users were not found in Dropbox. - note: Ensure the isUsersNotFound method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var usersNotFound: [String] { get }
  • A company-managed group cannot be managed by a user. - note: Ensure the isUserCannotBeManagerOfCompanyManagedGroup method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var userCannotBeManagerOfCompanyManagedGroup: [String] { get }

Constructors

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

    Description of the “group_not_found” tag state: No matching group found. No groups match the specified group ID.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGroupNotFound;

    Swift

    init(groupNotFound: ())

    Return Value

    An initialized instance.

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

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOther;

    Swift

    init(other: ())

    Return Value

    An initialized instance.

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

    Description of the “system_managed_group_disallowed” tag state: This operation is not supported on system-managed groups.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSystemManagedGroupDisallowed;

    Swift

    init(systemManagedGroupDisallowed: ())

    Return Value

    An initialized instance.

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

    Description of the “duplicate_user” tag state: You cannot add duplicate users. One or more of the members you are trying to add is already a member of the group.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDuplicateUser;

    Swift

    init(duplicateUser: ())

    Return Value

    An initialized instance.

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

    Description of the “group_not_in_team” tag state: Group is not in this team. You cannot add members to a group that is outside of your team.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGroupNotInTeam;

    Swift

    init(groupNotInTeam: ())

    Return Value

    An initialized instance.

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

    Description of the “members_not_in_team” tag state: These members are not part of your team. Currently, you cannot add members to a group if they are not part of your team, though this may change in a subsequent version. To add new members to your Dropbox Business team, use the membersAdd endpoint.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMembersNotInTeam:
        (nonnull NSArray<NSString *> *)membersNotInTeam;

    Swift

    init(membersNotInTeam: [String])

    Parameters

    membersNotInTeam

    These members are not part of your team. Currently, you cannot add members to a group if they are not part of your team, though this may change in a subsequent version. To add new members to your Dropbox Business team, use the membersAdd endpoint.

    Return Value

    An initialized instance.

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

    Description of the “users_not_found” tag state: These users were not found in Dropbox.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUsersNotFound:
        (nonnull NSArray<NSString *> *)usersNotFound;

    Swift

    init(usersNotFound: [String])

    Parameters

    usersNotFound

    These users were not found in Dropbox.

    Return Value

    An initialized instance.

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

    Description of the “user_must_be_active_to_be_owner” tag state: A suspended user cannot be added to a group as owner in DBTEAMGroupAccessType.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUserMustBeActiveToBeOwner;

    Swift

    init(userMustBeActiveToBeOwner: ())

    Return Value

    An initialized instance.

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

    Description of the “user_cannot_be_manager_of_company_managed_group” tag state: A company-managed group cannot be managed by a user.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUserCannotBeManagerOfCompanyManagedGroup:
        (nonnull NSArray<NSString *> *)userCannotBeManagerOfCompanyManagedGroup;

    Swift

    init(userCannotBeManagerOfCompanyManagedGroup: [String])

    Parameters

    userCannotBeManagerOfCompanyManagedGroup

    A company-managed group cannot be managed by a user.

    Return Value

    An initialized instance.

Tag state methods

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

    Declaration

    Objective-C

    - (BOOL)isGroupNotFound;

    Swift

    func isGroupNotFound() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isOther;

    Swift

    func isOther() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isSystemManagedGroupDisallowed;

    Swift

    func isSystemManagedGroupDisallowed() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isDuplicateUser;

    Swift

    func isDuplicateUser() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isGroupNotInTeam;

    Swift

    func isGroupNotInTeam() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isMembersNotInTeam;

    Swift

    func isMembersNotInTeam() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isUsersNotFound;

    Swift

    func isUsersNotFound() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isUserMustBeActiveToBeOwner;

    Swift

    func isUserMustBeActiveToBeOwner() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isUserCannotBeManagerOfCompanyManagedGroup;

    Swift

    func isUserCannotBeManagerOfCompanyManagedGroup() -> Bool

    Return Value

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

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