DBTEAMAddSecondaryEmailResult
Objective-C
@interface DBTEAMAddSecondaryEmailResult : NSObject <DBSerializable, NSCopying>
                Swift
class DBTEAMAddSecondaryEmailResult : NSObject, DBSerializable, NSCopying
                The AddSecondaryEmailResult union.
Result of trying to add a secondary email to a user. ‘success’ is the only value indicating that a secondary email was successfully added to a user. 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) DBTEAMAddSecondaryEmailResultTag tag;Swift
var tag: DBTEAMAddSecondaryEmailResultTag { get } - 
                  
                  
Describes a secondary email that was successfully added to a user. @note Ensure the
isSuccessmethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) DBSECONDARYEMAILSSecondaryEmail *_Nonnull success;Swift
var success: DBSECONDARYEMAILSSecondaryEmail { get } - 
                  
                  
Secondary email is not available to be claimed by the user. - note: Ensure the
isUnavailablemethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull unavailable;Swift
var unavailable: String { get } - 
                  
                  
Secondary email is already a pending email for the user. - note: Ensure the
isAlreadyPendingmethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull alreadyPending;Swift
var alreadyPending: String { get } - 
                  
                  
Secondary email is already a verified email for the user. - note: Ensure the
isAlreadyOwnedByUsermethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull alreadyOwnedByUser;Swift
var alreadyOwnedByUser: String { get } - 
                  
                  
User already has the maximum number of secondary emails allowed. @note Ensure the
isReachedLimitmethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull reachedLimit;Swift
var reachedLimit: String { get } - 
                  
                  
A transient error occurred. Please try again later. - note: Ensure the
isTransientErrormethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull transientError;Swift
var transientError: String { get } - 
                  
                  
An error occurred due to conflicting updates. Please try again later. @note Ensure the
isTooManyUpdatesmethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull tooManyUpdates;Swift
var tooManyUpdates: String { get } - 
                  
                  
An unknown error occurred. - note: Ensure the
isUnknownErrormethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull unknownError;Swift
var unknownError: String { get } - 
                  
                  
Too many emails are being sent to this email address. Please try again later. - note: Ensure the
isRateLimitedmethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull rateLimited;Swift
var rateLimited: String { get } 
- 
                  
                  
Initializes union class with tag state of “success”.
Description of the “success” tag state: Describes a secondary email that was successfully added to a user.
Declaration
Objective-C
- (nonnull instancetype)initWithSuccess: (nonnull DBSECONDARYEMAILSSecondaryEmail *)success;Swift
init(success: DBSECONDARYEMAILSSecondaryEmail)Parameters
successDescribes a secondary email that was successfully added to a user.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “unavailable”.
Description of the “unavailable” tag state: Secondary email is not available to be claimed by the user.
Declaration
Objective-C
- (nonnull instancetype)initWithUnavailable:(nonnull NSString *)unavailable;Swift
init(unavailable: String)Parameters
unavailableSecondary email is not available to be claimed by the user.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “already_pending”.
Description of the “already_pending” tag state: Secondary email is already a pending email for the user.
Declaration
Objective-C
- (nonnull instancetype)initWithAlreadyPending: (nonnull NSString *)alreadyPending;Swift
init(alreadyPending: String)Parameters
alreadyPendingSecondary email is already a pending email for the user.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “already_owned_by_user”.
Description of the “already_owned_by_user” tag state: Secondary email is already a verified email for the user.
Declaration
Objective-C
- (nonnull instancetype)initWithAlreadyOwnedByUser: (nonnull NSString *)alreadyOwnedByUser;Swift
init(alreadyOwnedByUser: String)Parameters
alreadyOwnedByUserSecondary email is already a verified email for the user.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “reached_limit”.
Description of the “reached_limit” tag state: User already has the maximum number of secondary emails allowed.
Declaration
Objective-C
- (nonnull instancetype)initWithReachedLimit:(nonnull NSString *)reachedLimit;Swift
init(reachedLimit: String)Parameters
reachedLimitUser already has the maximum number of secondary emails allowed.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “transient_error”.
Description of the “transient_error” tag state: A transient error occurred. Please try again later.
Declaration
Objective-C
- (nonnull instancetype)initWithTransientError: (nonnull NSString *)transientError;Swift
init(transientError: String)Parameters
transientErrorA transient error occurred. Please try again later.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “too_many_updates”.
Description of the “too_many_updates” tag state: An error occurred due to conflicting updates. Please try again later.
Declaration
Objective-C
- (nonnull instancetype)initWithTooManyUpdates: (nonnull NSString *)tooManyUpdates;Swift
init(tooManyUpdates: String)Parameters
tooManyUpdatesAn error occurred due to conflicting updates. Please try again later.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “unknown_error”.
Description of the “unknown_error” tag state: An unknown error occurred.
Declaration
Objective-C
- (nonnull instancetype)initWithUnknownError:(nonnull NSString *)unknownError;Swift
init(unknownError: String)Parameters
unknownErrorAn unknown error occurred.
Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “rate_limited”.
Description of the “rate_limited” tag state: Too many emails are being sent to this email address. Please try again later.
Declaration
Objective-C
- (nonnull instancetype)initWithRateLimited:(nonnull NSString *)rateLimited;Swift
init(rateLimited: String)Parameters
rateLimitedToo many emails are being sent to this email address. Please try again later.
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 “unavailable”.
Note
Call this method and ensure it returns true before accessing the
unavailableproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isUnavailable;Swift
func isUnavailable() -> BoolReturn Value
Whether the union’s current tag state has value “unavailable”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “already_pending”.
Note
Call this method and ensure it returns true before accessing the
alreadyPendingproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isAlreadyPending;Swift
func isAlreadyPending() -> BoolReturn Value
Whether the union’s current tag state has value “already_pending”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “already_owned_by_user”.
Note
Call this method and ensure it returns true before accessing the
alreadyOwnedByUserproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isAlreadyOwnedByUser;Swift
func isAlreadyOwnedByUser() -> BoolReturn Value
Whether the union’s current tag state has value “already_owned_by_user”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “reached_limit”.
Note
Call this method and ensure it returns true before accessing the
reachedLimitproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isReachedLimit;Swift
func isReachedLimit() -> BoolReturn Value
Whether the union’s current tag state has value “reached_limit”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “transient_error”.
Note
Call this method and ensure it returns true before accessing the
transientErrorproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isTransientError;Swift
func isTransientError() -> BoolReturn Value
Whether the union’s current tag state has value “transient_error”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “too_many_updates”.
Note
Call this method and ensure it returns true before accessing the
tooManyUpdatesproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isTooManyUpdates;Swift
func isTooManyUpdates() -> BoolReturn Value
Whether the union’s current tag state has value “too_many_updates”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “unknown_error”.
Note
Call this method and ensure it returns true before accessing the
unknownErrorproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isUnknownError;Swift
func isUnknownError() -> BoolReturn Value
Whether the union’s current tag state has value “unknown_error”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “rate_limited”.
Note
Call this method and ensure it returns true before accessing the
rateLimitedproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isRateLimited;Swift
func isRateLimited() -> BoolReturn Value
Whether the union’s current tag state has value “rate_limited”.
 - 
                  
                  
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
        DBTEAMAddSecondaryEmailResult Class Reference