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.
-
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
isSuccessmethod 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
isNotFoundmethod 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
isCannotRemovePrimarymethod 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 }
-
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
successThe 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
notFoundThe 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
cannotRemovePrimaryThe 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.
-
Retrieves whether the union’s current tag state has value “success”.
Note
Call this method and ensure it returns true before accessing the
successproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isSuccess;Swift
func isSuccess() -> BoolReturn 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
notFoundproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isNotFound;Swift
func isNotFound() -> BoolReturn 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
cannotRemovePrimaryproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isCannotRemovePrimary;Swift
func isCannotRemovePrimary() -> BoolReturn 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() -> BoolReturn 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() -> StringReturn Value
A human-readable string representing the union’s current tag state.
View on GitHub
DBTEAMDeleteSecondaryEmailResult Class Reference