class documentation

class AddSecondaryEmailResult(bb.Union): (source)

View In Hierarchy

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 acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar secondary_emails.SecondaryEmail team.AddSecondaryEmailResult.success: Describes a secondary email that was successfully added to a user. :ivar str team.AddSecondaryEmailResult.unavailable: Secondary email is not available to be claimed by the user. :ivar str team.AddSecondaryEmailResult.already_pending: Secondary email is already a pending email for the user. :ivar str team.AddSecondaryEmailResult.already_owned_by_user: Secondary email is already a verified email for the user. :ivar str team.AddSecondaryEmailResult.reached_limit: User already has the maximum number of secondary emails allowed. :ivar str team.AddSecondaryEmailResult.transient_error: A transient error occurred. Please try again later. :ivar str team.AddSecondaryEmailResult.too_many_updates: An error occurred due to conflicting updates. Please try again later. :ivar str team.AddSecondaryEmailResult.unknown_error: An unknown error occurred. :ivar str team.AddSecondaryEmailResult.rate_limited: Too many emails are being sent to this email address. Please try again later.

Class Method already_owned_by_user Create an instance of this class set to the ``already_owned_by_user`` tag with value ``val``.
Class Method already_pending Create an instance of this class set to the ``already_pending`` tag with value ``val``.
Class Method rate_limited Create an instance of this class set to the ``rate_limited`` tag with value ``val``.
Class Method reached_limit Create an instance of this class set to the ``reached_limit`` tag with value ``val``.
Class Method success Create an instance of this class set to the ``success`` tag with value ``val``.
Class Method too_many_updates Create an instance of this class set to the ``too_many_updates`` tag with value ``val``.
Class Method transient_error Create an instance of this class set to the ``transient_error`` tag with value ``val``.
Class Method unavailable Create an instance of this class set to the ``unavailable`` tag with value ``val``.
Class Method unknown_error Create an instance of this class set to the ``unknown_error`` tag with value ``val``.
Method get_already_owned_by_user Secondary email is already a verified email for the user.
Method get_already_pending Secondary email is already a pending email for the user.
Method get_rate_limited Too many emails are being sent to this email address. Please try again later.
Method get_reached_limit User already has the maximum number of secondary emails allowed.
Method get_success Describes a secondary email that was successfully added to a user.
Method get_too_many_updates An error occurred due to conflicting updates. Please try again later.
Method get_transient_error A transient error occurred. Please try again later.
Method get_unavailable Secondary email is not available to be claimed by the user.
Method get_unknown_error An unknown error occurred.
Method is_already_owned_by_user Check if the union tag is ``already_owned_by_user``.
Method is_already_pending Check if the union tag is ``already_pending``.
Method is_other Check if the union tag is ``other``.
Method is_rate_limited Check if the union tag is ``rate_limited``.
Method is_reached_limit Check if the union tag is ``reached_limit``.
Method is_success Check if the union tag is ``success``.
Method is_too_many_updates Check if the union tag is ``too_many_updates``.
Method is_transient_error Check if the union tag is ``transient_error``.
Method is_unavailable Check if the union tag is ``unavailable``.
Method is_unknown_error Check if the union tag is ``unknown_error``.
Class Variable other Undocumented
Method _process_custom_annotations Undocumented
Class Variable _catch_all Undocumented
@classmethod
def already_owned_by_user(cls, val): (source)

Create an instance of this class set to the ``already_owned_by_user`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def already_pending(cls, val): (source)

Create an instance of this class set to the ``already_pending`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def rate_limited(cls, val): (source)

Create an instance of this class set to the ``rate_limited`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def reached_limit(cls, val): (source)

Create an instance of this class set to the ``reached_limit`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def success(cls, val): (source)

Create an instance of this class set to the ``success`` tag with value ``val``. :param secondary_emails.SecondaryEmail val: :rtype: AddSecondaryEmailResult

@classmethod
def too_many_updates(cls, val): (source)

Create an instance of this class set to the ``too_many_updates`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def transient_error(cls, val): (source)

Create an instance of this class set to the ``transient_error`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def unavailable(cls, val): (source)

Create an instance of this class set to the ``unavailable`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

@classmethod
def unknown_error(cls, val): (source)

Create an instance of this class set to the ``unknown_error`` tag with value ``val``. :param str val: :rtype: AddSecondaryEmailResult

def get_already_owned_by_user(self): (source)

Secondary email is already a verified email for the user. Only call this if :meth:`is_already_owned_by_user` is true. :rtype: str

def get_already_pending(self): (source)

Secondary email is already a pending email for the user. Only call this if :meth:`is_already_pending` is true. :rtype: str

def get_rate_limited(self): (source)

Too many emails are being sent to this email address. Please try again later. Only call this if :meth:`is_rate_limited` is true. :rtype: str

def get_reached_limit(self): (source)

User already has the maximum number of secondary emails allowed. Only call this if :meth:`is_reached_limit` is true. :rtype: str

def get_success(self): (source)

Describes a secondary email that was successfully added to a user. Only call this if :meth:`is_success` is true. :rtype: secondary_emails.SecondaryEmail

def get_too_many_updates(self): (source)

An error occurred due to conflicting updates. Please try again later. Only call this if :meth:`is_too_many_updates` is true. :rtype: str

def get_transient_error(self): (source)

A transient error occurred. Please try again later. Only call this if :meth:`is_transient_error` is true. :rtype: str

def get_unavailable(self): (source)

Secondary email is not available to be claimed by the user. Only call this if :meth:`is_unavailable` is true. :rtype: str

def get_unknown_error(self): (source)

An unknown error occurred. Only call this if :meth:`is_unknown_error` is true. :rtype: str

def is_already_owned_by_user(self): (source)

Check if the union tag is ``already_owned_by_user``. :rtype: bool

def is_already_pending(self): (source)

Check if the union tag is ``already_pending``. :rtype: bool

def is_other(self): (source)

Check if the union tag is ``other``. :rtype: bool

def is_rate_limited(self): (source)

Check if the union tag is ``rate_limited``. :rtype: bool

def is_reached_limit(self): (source)

Check if the union tag is ``reached_limit``. :rtype: bool

def is_success(self): (source)

Check if the union tag is ``success``. :rtype: bool

def is_too_many_updates(self): (source)

Check if the union tag is ``too_many_updates``. :rtype: bool

def is_transient_error(self): (source)

Check if the union tag is ``transient_error``. :rtype: bool

def is_unavailable(self): (source)

Check if the union tag is ``unavailable``. :rtype: bool

def is_unknown_error(self): (source)

Check if the union tag is ``unknown_error``. :rtype: bool

Undocumented

def _process_custom_annotations(self, annotation_type, field_path, processor): (source)

Undocumented

_catch_all: str = (source)

Undocumented