DBTEAMDeleteSecondaryEmailResult

Objective-C

@interface DBTEAMDeleteSecondaryEmailResult
    : NSObject <DBSerializable, NSCopying>

Swift

class DBTEAMDeleteSecondaryEmailResult : NSObject, DBSerializable, NSCopying

The DeleteSecondaryEmailResult union.

Result of trying to delete a secondary email address. ‘success’ is the only value indicating that a secondary email was successfully deleted. The other values explain the type of error that occurred, and include the email for which the error occurred.

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

    Swift

    var tag: DBTEAMDeleteSecondaryEmailResultTag { get }
  • The secondary email was successfully deleted. - note: Ensure the isSuccess method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var success: String { get }
  • The email address was not found for the user. - note: Ensure the isNotFound method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var notFound: String { get }
  • The email address is the primary email address of the user, and cannot be removed. - note: Ensure the isCannotRemovePrimary method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

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

    Swift

    var cannotRemovePrimary: String { get }

Constructors

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

    Description of the “success” tag state: The secondary email was successfully deleted.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSuccess:(nonnull NSString *)success;

    Swift

    init(success: String)

    Parameters

    success

    The secondary email was successfully deleted.

    Return Value

    An initialized instance.

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

    Description of the “not_found” tag state: The email address was not found for the user.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNotFound:(nonnull NSString *)notFound;

    Swift

    init(notFound: String)

    Parameters

    notFound

    The email address was not found for the user.

    Return Value

    An initialized instance.

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

    Description of the “cannot_remove_primary” tag state: The email address is the primary email address of the user, and cannot be removed.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCannotRemovePrimary:
        (nonnull NSString *)cannotRemovePrimary;

    Swift

    init(cannotRemovePrimary: String)

    Parameters

    cannotRemovePrimary

    The email address is the primary email address of the user, and cannot be removed.

    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.

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 “not_found”.

    Note

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

    Declaration

    Objective-C

    - (BOOL)isNotFound;

    Swift

    func isNotFound() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isCannotRemovePrimary;

    Swift

    func isCannotRemovePrimary() -> Bool

    Return Value

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

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