Module mailslurp_client.models.phone_message_thread_item_projection
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 PhoneMessageThreadItemProjection (body=None, phone_number_id=None, created=None, from_phone_number=None, to_phone_number=None, message_direction=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.
PhoneMessageThreadItemProjection - a model defined in OpenAPI
Expand source code
class PhoneMessageThreadItemProjection(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 = { 'body': 'str', 'phone_number_id': 'str', 'created': 'datetime', 'from_phone_number': 'str', 'to_phone_number': 'str', 'message_direction': 'str' } attribute_map = { 'body': 'body', 'phone_number_id': 'phoneNumberId', 'created': 'created', 'from_phone_number': 'fromPhoneNumber', 'to_phone_number': 'toPhoneNumber', 'message_direction': 'messageDirection' } def __init__(self, body=None, phone_number_id=None, created=None, from_phone_number=None, to_phone_number=None, message_direction=None, local_vars_configuration=None): # noqa: E501 """PhoneMessageThreadItemProjection - 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._body = None self._phone_number_id = None self._created = None self._from_phone_number = None self._to_phone_number = None self._message_direction = None self.discriminator = None self.body = body self.phone_number_id = phone_number_id self.created = created self.from_phone_number = from_phone_number self.to_phone_number = to_phone_number self.message_direction = message_direction @property def body(self): """Gets the body of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The body of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._body @body.setter def body(self, body): """Sets the body of this PhoneMessageThreadItemProjection. :param body: The body of this PhoneMessageThreadItemProjection. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 self._body = body @property def phone_number_id(self): """Gets the phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._phone_number_id @phone_number_id.setter def phone_number_id(self, phone_number_id): """Sets the phone_number_id of this PhoneMessageThreadItemProjection. :param phone_number_id: The phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and phone_number_id is None: # noqa: E501 raise ValueError("Invalid value for `phone_number_id`, must not be `None`") # noqa: E501 self._phone_number_id = phone_number_id @property def created(self): """Gets the created of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The created of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: datetime """ return self._created @created.setter def created(self, created): """Sets the created of this PhoneMessageThreadItemProjection. :param created: The created of this PhoneMessageThreadItemProjection. # noqa: E501 :type: datetime """ if self.local_vars_configuration.client_side_validation and created is None: # noqa: E501 raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 self._created = created @property def from_phone_number(self): """Gets the from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._from_phone_number @from_phone_number.setter def from_phone_number(self, from_phone_number): """Sets the from_phone_number of this PhoneMessageThreadItemProjection. :param from_phone_number: The from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and from_phone_number is None: # noqa: E501 raise ValueError("Invalid value for `from_phone_number`, must not be `None`") # noqa: E501 self._from_phone_number = from_phone_number @property def to_phone_number(self): """Gets the to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._to_phone_number @to_phone_number.setter def to_phone_number(self, to_phone_number): """Sets the to_phone_number of this PhoneMessageThreadItemProjection. :param to_phone_number: The to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and to_phone_number is None: # noqa: E501 raise ValueError("Invalid value for `to_phone_number`, must not be `None`") # noqa: E501 self._to_phone_number = to_phone_number @property def message_direction(self): """Gets the message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._message_direction @message_direction.setter def message_direction(self, message_direction): """Sets the message_direction of this PhoneMessageThreadItemProjection. :param message_direction: The message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and message_direction is None: # noqa: E501 raise ValueError("Invalid value for `message_direction`, must not be `None`") # noqa: E501 allowed_values = ["OUTBOUND", "INBOUND"] # noqa: E501 if self.local_vars_configuration.client_side_validation and message_direction not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `message_direction` ({0}), must be one of {1}" # noqa: E501 .format(message_direction, allowed_values) ) self._message_direction = message_direction 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, PhoneMessageThreadItemProjection): 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, PhoneMessageThreadItemProjection): return True return self.to_dict() != other.to_dict()
Class variables
var attribute_map
var openapi_types
Instance variables
prop body
-
Gets the body of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The body of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str
Expand source code
@property def body(self): """Gets the body of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The body of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._body
prop created
-
Gets the created of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The created of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: datetime
Expand source code
@property def created(self): """Gets the created of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The created of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: datetime """ return self._created
prop from_phone_number
-
Gets the from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str
Expand source code
@property def from_phone_number(self): """Gets the from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The from_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._from_phone_number
prop message_direction
-
Gets the message_direction of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str
Expand source code
@property def message_direction(self): """Gets the message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The message_direction of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._message_direction
prop phone_number_id
-
Gets the phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str
Expand source code
@property def phone_number_id(self): """Gets the phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The phone_number_id of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._phone_number_id
prop to_phone_number
-
Gets the to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501
:return: The to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str
Expand source code
@property def to_phone_number(self): """Gets the to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :return: The to_phone_number of this PhoneMessageThreadItemProjection. # noqa: E501 :rtype: str """ return self._to_phone_number
Methods
def to_dict(self)
-
Returns the model properties as a dict
def to_str(self)
-
Returns the string representation of the model