Module mailslurp_client.models.email_thread_item
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class EmailThreadItem (item_type=None, entity_id=None, body_excerpt=None, text_excerpt=None, subject=None, to=None, bcc=None, cc=None, attachments=None, created_at=None, read=None, in_reply_to=None, message_id=None, thread_id=None, sender=None, recipients=None, local_vars_configuration=None)
-
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
EmailThreadItem - a model defined in OpenAPI
Expand source code
class EmailThreadItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'item_type': 'str', 'entity_id': 'str', 'body_excerpt': 'str', 'text_excerpt': 'str', 'subject': 'str', 'to': 'list[str]', '_from': 'str', 'bcc': 'list[str]', 'cc': 'list[str]', 'attachments': 'list[str]', 'created_at': 'datetime', 'read': 'bool', 'in_reply_to': 'str', 'message_id': 'str', 'thread_id': 'str', 'sender': 'Sender', 'recipients': 'EmailRecipients' } attribute_map = { 'item_type': 'itemType', 'entity_id': 'entityId', 'body_excerpt': 'bodyExcerpt', 'text_excerpt': 'textExcerpt', 'subject': 'subject', 'to': 'to', '_from': 'from', 'bcc': 'bcc', 'cc': 'cc', 'attachments': 'attachments', 'created_at': 'createdAt', 'read': 'read', 'in_reply_to': 'inReplyTo', 'message_id': 'messageId', 'thread_id': 'threadId', 'sender': 'sender', 'recipients': 'recipients' } def __init__(self, item_type=None, entity_id=None, body_excerpt=None, text_excerpt=None, subject=None, to=None, _from=None, bcc=None, cc=None, attachments=None, created_at=None, read=None, in_reply_to=None, message_id=None, thread_id=None, sender=None, recipients=None, local_vars_configuration=None): # noqa: E501 """EmailThreadItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._item_type = None self._entity_id = None self._body_excerpt = None self._text_excerpt = None self._subject = None self._to = None self.__from = None self._bcc = None self._cc = None self._attachments = None self._created_at = None self._read = None self._in_reply_to = None self._message_id = None self._thread_id = None self._sender = None self._recipients = None self.discriminator = None self.item_type = item_type self.entity_id = entity_id self.body_excerpt = body_excerpt self.text_excerpt = text_excerpt self.subject = subject self.to = to self._from = _from self.bcc = bcc self.cc = cc self.attachments = attachments self.created_at = created_at self.read = read self.in_reply_to = in_reply_to self.message_id = message_id self.thread_id = thread_id self.sender = sender self.recipients = recipients @property def item_type(self): """Gets the item_type of this EmailThreadItem. # noqa: E501 :return: The item_type of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._item_type @item_type.setter def item_type(self, item_type): """Sets the item_type of this EmailThreadItem. :param item_type: The item_type of this EmailThreadItem. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and item_type is None: # noqa: E501 raise ValueError("Invalid value for `item_type`, must not be `None`") # noqa: E501 allowed_values = ["RECEIVED_EMAIL", "SENT_EMAIL"] # noqa: E501 if self.local_vars_configuration.client_side_validation and item_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `item_type` ({0}), must be one of {1}" # noqa: E501 .format(item_type, allowed_values) ) self._item_type = item_type @property def entity_id(self): """Gets the entity_id of this EmailThreadItem. # noqa: E501 :return: The entity_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._entity_id @entity_id.setter def entity_id(self, entity_id): """Sets the entity_id of this EmailThreadItem. :param entity_id: The entity_id of this EmailThreadItem. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and entity_id is None: # noqa: E501 raise ValueError("Invalid value for `entity_id`, must not be `None`") # noqa: E501 self._entity_id = entity_id @property def body_excerpt(self): """Gets the body_excerpt of this EmailThreadItem. # noqa: E501 :return: The body_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._body_excerpt @body_excerpt.setter def body_excerpt(self, body_excerpt): """Sets the body_excerpt of this EmailThreadItem. :param body_excerpt: The body_excerpt of this EmailThreadItem. # noqa: E501 :type: str """ self._body_excerpt = body_excerpt @property def text_excerpt(self): """Gets the text_excerpt of this EmailThreadItem. # noqa: E501 :return: The text_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._text_excerpt @text_excerpt.setter def text_excerpt(self, text_excerpt): """Sets the text_excerpt of this EmailThreadItem. :param text_excerpt: The text_excerpt of this EmailThreadItem. # noqa: E501 :type: str """ self._text_excerpt = text_excerpt @property def subject(self): """Gets the subject of this EmailThreadItem. # noqa: E501 :return: The subject of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._subject @subject.setter def subject(self, subject): """Sets the subject of this EmailThreadItem. :param subject: The subject of this EmailThreadItem. # noqa: E501 :type: str """ self._subject = subject @property def to(self): """Gets the to of this EmailThreadItem. # noqa: E501 :return: The to of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._to @to.setter def to(self, to): """Sets the to of this EmailThreadItem. :param to: The to of this EmailThreadItem. # noqa: E501 :type: list[str] """ if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 self._to = to @property def _from(self): """Gets the _from of this EmailThreadItem. # noqa: E501 :return: The _from of this EmailThreadItem. # noqa: E501 :rtype: str """ return self.__from @_from.setter def _from(self, _from): """Sets the _from of this EmailThreadItem. :param _from: The _from of this EmailThreadItem. # noqa: E501 :type: str """ self.__from = _from @property def bcc(self): """Gets the bcc of this EmailThreadItem. # noqa: E501 :return: The bcc of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._bcc @bcc.setter def bcc(self, bcc): """Sets the bcc of this EmailThreadItem. :param bcc: The bcc of this EmailThreadItem. # noqa: E501 :type: list[str] """ self._bcc = bcc @property def cc(self): """Gets the cc of this EmailThreadItem. # noqa: E501 :return: The cc of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._cc @cc.setter def cc(self, cc): """Sets the cc of this EmailThreadItem. :param cc: The cc of this EmailThreadItem. # noqa: E501 :type: list[str] """ self._cc = cc @property def attachments(self): """Gets the attachments of this EmailThreadItem. # noqa: E501 :return: The attachments of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._attachments @attachments.setter def attachments(self, attachments): """Sets the attachments of this EmailThreadItem. :param attachments: The attachments of this EmailThreadItem. # noqa: E501 :type: list[str] """ self._attachments = attachments @property def created_at(self): """Gets the created_at of this EmailThreadItem. # noqa: E501 :return: The created_at of this EmailThreadItem. # noqa: E501 :rtype: datetime """ return self._created_at @created_at.setter def created_at(self, created_at): """Sets the created_at of this EmailThreadItem. :param created_at: The created_at of this EmailThreadItem. # noqa: E501 :type: datetime """ if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 self._created_at = created_at @property def read(self): """Gets the read of this EmailThreadItem. # noqa: E501 :return: The read of this EmailThreadItem. # noqa: E501 :rtype: bool """ return self._read @read.setter def read(self, read): """Sets the read of this EmailThreadItem. :param read: The read of this EmailThreadItem. # noqa: E501 :type: bool """ if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 self._read = read @property def in_reply_to(self): """Gets the in_reply_to of this EmailThreadItem. # noqa: E501 :return: The in_reply_to of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._in_reply_to @in_reply_to.setter def in_reply_to(self, in_reply_to): """Sets the in_reply_to of this EmailThreadItem. :param in_reply_to: The in_reply_to of this EmailThreadItem. # noqa: E501 :type: str """ self._in_reply_to = in_reply_to @property def message_id(self): """Gets the message_id of this EmailThreadItem. # noqa: E501 :return: The message_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._message_id @message_id.setter def message_id(self, message_id): """Sets the message_id of this EmailThreadItem. :param message_id: The message_id of this EmailThreadItem. # noqa: E501 :type: str """ self._message_id = message_id @property def thread_id(self): """Gets the thread_id of this EmailThreadItem. # noqa: E501 :return: The thread_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._thread_id @thread_id.setter def thread_id(self, thread_id): """Sets the thread_id of this EmailThreadItem. :param thread_id: The thread_id of this EmailThreadItem. # noqa: E501 :type: str """ self._thread_id = thread_id @property def sender(self): """Gets the sender of this EmailThreadItem. # noqa: E501 :return: The sender of this EmailThreadItem. # noqa: E501 :rtype: Sender """ return self._sender @sender.setter def sender(self, sender): """Sets the sender of this EmailThreadItem. :param sender: The sender of this EmailThreadItem. # noqa: E501 :type: Sender """ self._sender = sender @property def recipients(self): """Gets the recipients of this EmailThreadItem. # noqa: E501 :return: The recipients of this EmailThreadItem. # noqa: E501 :rtype: EmailRecipients """ return self._recipients @recipients.setter def recipients(self, recipients): """Sets the recipients of this EmailThreadItem. :param recipients: The recipients of this EmailThreadItem. # noqa: E501 :type: EmailRecipients """ self._recipients = recipients def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, EmailThreadItem): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, EmailThreadItem): return True return self.to_dict() != other.to_dict()
Class variables
var attribute_map
var openapi_types
Instance variables
prop attachments
-
Gets the attachments of this EmailThreadItem. # noqa: E501
:return: The attachments of this EmailThreadItem. # noqa: E501 :rtype: list[str]
Expand source code
@property def attachments(self): """Gets the attachments of this EmailThreadItem. # noqa: E501 :return: The attachments of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._attachments
prop bcc
-
Gets the bcc of this EmailThreadItem. # noqa: E501
:return: The bcc of this EmailThreadItem. # noqa: E501 :rtype: list[str]
Expand source code
@property def bcc(self): """Gets the bcc of this EmailThreadItem. # noqa: E501 :return: The bcc of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._bcc
prop body_excerpt
-
Gets the body_excerpt of this EmailThreadItem. # noqa: E501
:return: The body_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def body_excerpt(self): """Gets the body_excerpt of this EmailThreadItem. # noqa: E501 :return: The body_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._body_excerpt
prop cc
-
Gets the cc of this EmailThreadItem. # noqa: E501
:return: The cc of this EmailThreadItem. # noqa: E501 :rtype: list[str]
Expand source code
@property def cc(self): """Gets the cc of this EmailThreadItem. # noqa: E501 :return: The cc of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._cc
prop created_at
-
Gets the created_at of this EmailThreadItem. # noqa: E501
:return: The created_at of this EmailThreadItem. # noqa: E501 :rtype: datetime
Expand source code
@property def created_at(self): """Gets the created_at of this EmailThreadItem. # noqa: E501 :return: The created_at of this EmailThreadItem. # noqa: E501 :rtype: datetime """ return self._created_at
prop entity_id
-
Gets the entity_id of this EmailThreadItem. # noqa: E501
:return: The entity_id of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def entity_id(self): """Gets the entity_id of this EmailThreadItem. # noqa: E501 :return: The entity_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._entity_id
prop in_reply_to
-
Gets the in_reply_to of this EmailThreadItem. # noqa: E501
:return: The in_reply_to of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def in_reply_to(self): """Gets the in_reply_to of this EmailThreadItem. # noqa: E501 :return: The in_reply_to of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._in_reply_to
prop item_type
-
Gets the item_type of this EmailThreadItem. # noqa: E501
:return: The item_type of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def item_type(self): """Gets the item_type of this EmailThreadItem. # noqa: E501 :return: The item_type of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._item_type
prop message_id
-
Gets the message_id of this EmailThreadItem. # noqa: E501
:return: The message_id of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def message_id(self): """Gets the message_id of this EmailThreadItem. # noqa: E501 :return: The message_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._message_id
prop read
-
Gets the read of this EmailThreadItem. # noqa: E501
:return: The read of this EmailThreadItem. # noqa: E501 :rtype: bool
Expand source code
@property def read(self): """Gets the read of this EmailThreadItem. # noqa: E501 :return: The read of this EmailThreadItem. # noqa: E501 :rtype: bool """ return self._read
prop recipients
-
Gets the recipients of this EmailThreadItem. # noqa: E501
:return: The recipients of this EmailThreadItem. # noqa: E501 :rtype: EmailRecipients
Expand source code
@property def recipients(self): """Gets the recipients of this EmailThreadItem. # noqa: E501 :return: The recipients of this EmailThreadItem. # noqa: E501 :rtype: EmailRecipients """ return self._recipients
prop sender
-
Gets the sender of this EmailThreadItem. # noqa: E501
:return: The sender of this EmailThreadItem. # noqa: E501 :rtype: Sender
Expand source code
@property def sender(self): """Gets the sender of this EmailThreadItem. # noqa: E501 :return: The sender of this EmailThreadItem. # noqa: E501 :rtype: Sender """ return self._sender
prop subject
-
Gets the subject of this EmailThreadItem. # noqa: E501
:return: The subject of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def subject(self): """Gets the subject of this EmailThreadItem. # noqa: E501 :return: The subject of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._subject
prop text_excerpt
-
Gets the text_excerpt of this EmailThreadItem. # noqa: E501
:return: The text_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def text_excerpt(self): """Gets the text_excerpt of this EmailThreadItem. # noqa: E501 :return: The text_excerpt of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._text_excerpt
prop thread_id
-
Gets the thread_id of this EmailThreadItem. # noqa: E501
:return: The thread_id of this EmailThreadItem. # noqa: E501 :rtype: str
Expand source code
@property def thread_id(self): """Gets the thread_id of this EmailThreadItem. # noqa: E501 :return: The thread_id of this EmailThreadItem. # noqa: E501 :rtype: str """ return self._thread_id
prop to
-
Gets the to of this EmailThreadItem. # noqa: E501
:return: The to of this EmailThreadItem. # noqa: E501 :rtype: list[str]
Expand source code
@property def to(self): """Gets the to of this EmailThreadItem. # noqa: E501 :return: The to of this EmailThreadItem. # noqa: E501 :rtype: list[str] """ return self._to
Methods
def to_dict(self)
-
Returns the model properties as a dict
def to_str(self)
-
Returns the string representation of the model