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
isSuccess
method 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
isUnavailable
method 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
isAlreadyPending
method 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
isAlreadyOwnedByUser
method 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
isReachedLimit
method 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
isTransientError
method 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
isTooManyUpdates
method 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
isUnknownError
method 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
isRateLimited
method 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
success
Describes 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
unavailable
Secondary 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
alreadyPending
Secondary 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
alreadyOwnedByUser
Secondary 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
reachedLimit
User 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
transientError
A 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
tooManyUpdates
An 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
unknownError
An 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
rateLimited
Too 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
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 “unavailable”.
Note
Call this method and ensure it returns true before accessing the
unavailable
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isUnavailable;
Swift
func isUnavailable() -> Bool
Return 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
alreadyPending
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isAlreadyPending;
Swift
func isAlreadyPending() -> Bool
Return 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
alreadyOwnedByUser
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isAlreadyOwnedByUser;
Swift
func isAlreadyOwnedByUser() -> Bool
Return 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
reachedLimit
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isReachedLimit;
Swift
func isReachedLimit() -> Bool
Return 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
transientError
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isTransientError;
Swift
func isTransientError() -> Bool
Return 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
tooManyUpdates
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isTooManyUpdates;
Swift
func isTooManyUpdates() -> Bool
Return 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
unknownError
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isUnknownError;
Swift
func isUnknownError() -> Bool
Return 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
rateLimited
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isRateLimited;
Swift
func isRateLimited() -> Bool
Return 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() -> 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.