DBSHARINGFileMemberActionIndividualResult

Objective-C

@interface DBSHARINGFileMemberActionIndividualResult
    : NSObject <DBSerializable, NSCopying>

Swift

class DBSHARINGFileMemberActionIndividualResult : NSObject, DBSerializable, NSCopying

The FileMemberActionIndividualResult 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) DBSHARINGFileMemberActionIndividualResultTag tag;
  • Part of the response for both add_file_member and remove_file_member_v1 (deprecated). For add_file_member, indicates giving access was successful and at what AccessLevel. For remove_file_member_v1, indicates member was successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder. - note: Ensure the isSuccess method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGAccessLevel *success;

    Swift

    var success: DBSHARINGAccessLevel? { get }
  • User was not able to perform this action. - note: Ensure the isMemberError method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBSHARINGFileMemberActionError *_Nonnull memberError;

    Swift

    var memberError: DBSHARINGFileMemberActionError { get }

Constructors

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

    Description of the “success” tag state: Part of the response for both add_file_member and remove_file_member_v1 (deprecated). For add_file_member, indicates giving access was successful and at what AccessLevel. For remove_file_member_v1, indicates member was successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSuccess:
        (nullable DBSHARINGAccessLevel *)success;

    Swift

    init(success: DBSHARINGAccessLevel?)

    Parameters

    success

    Part of the response for both add_file_member and remove_file_member_v1 (deprecated). For add_file_member, indicates giving access was successful and at what AccessLevel. For remove_file_member_v1, indicates member was successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder.

    Return Value

    An initialized instance.

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

    Description of the “member_error” tag state: User was not able to perform this action.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMemberError:
        (nonnull DBSHARINGFileMemberActionError *)memberError;

    Swift

    init(memberError: DBSHARINGFileMemberActionError)

    Parameters

    memberError

    User was not able to perform this action.

    Return Value

    An initialized instance.

Tag state methods

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isSuccess;

    Swift

    func isSuccess() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isMemberError;

    Swift

    func isMemberError() -> Bool

    Return Value

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

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