# Path: messagebird/base.py
# class Base:
#     def load(self, data):
#         if data is not None:
#             for name, value in list(data.items()):
#                 if hasattr(self, name) and not callable(getattr(self, name)):
#                     setattr(self, name, value)
# 
#         return self
# 
#     @staticmethod
#     def value_to_time(value, format='%Y-%m-%dT%H:%M:%S+00:00'):
#         if value is not None:
#             return dateutil.parser.parse(value).replace(microsecond=0)
# 
# Path: messagebird/recipient.py
# class Recipient(Base):
#     def __init__(self):
#         self.recipient = None
#         self.status = None
#         self._statusDatetime = None
# 
#     @property
#     def statusDatetime(self):
#         return self._statusDatetime
# 
#     @statusDatetime.setter
#     def statusDatetime(self, value):
#         self._statusDatetime = self.value_to_time(value)


from messagebird.base import Base
from messagebird.recipient import Recipient
    @property
    def scheduledDatetime(self):
        return self._scheduledDatetime

    @scheduledDatetime.setter
    def scheduledDatetime(self, value):
        self._scheduledDatetime = self.value_to_time(value)

    @property
    def createdDatetime(self):
        return self._createdDatetime

    @createdDatetime.setter
    def createdDatetime(self, value):
        self._createdDatetime = self.value_to_time(value)

    @property
    def recipients(self):
        return self._recipients

    @recipients.setter
    def recipients(self, value):
        value['items'] = [Recipient().load(r) for r in value['items']]
        self._recipients = value

    def __str__(self):
        return "\n".join([
            "id                      : %s" % self.id,
            "href                    : %s" % self.href,
            "direction               : %s" % self.direction,

# Path: messagebird/base.py
# class Base:
#     def load(self, data):
#         if data is not None:
#             for name, value in list(data.items()):
#                 if hasattr(self, name) and not callable(getattr(self, name)):
#                     setattr(self, name, value)
# 
#         return self
# 
#     @staticmethod
#     def value_to_time(value, format='%Y-%m-%dT%H:%M:%S+00:00'):
#         if value is not None:
#             return dateutil.parser.parse(value).replace(microsecond=0)
# 
# Path: messagebird/recipient.py
# class Recipient(Base):
#     def __init__(self):
#         self.recipient = None
#         self.status = None
#         self._statusDatetime = None
# 
#     @property
#     def statusDatetime(self):
#         return self._statusDatetime
# 
#     @statusDatetime.setter
#     def statusDatetime(self, value):
#         self._statusDatetime = self.value_to_time(value)


# Path: messagebird/mms.py
from messagebird.base import Base
from messagebird.recipient import Recipient

    @property
    def scheduledDatetime(self):
        return self._scheduledDatetime

    @scheduledDatetime.setter
    def scheduledDatetime(self, value):
        self._scheduledDatetime = self.value_to_time(value)

    @property
    def createdDatetime(self):
        return self._createdDatetime

    @createdDatetime.setter
    def createdDatetime(self, value):
        self._createdDatetime = self.value_to_time(value)

    @property
    def recipients(self):
        return self._recipients

    @recipients.setter
    def recipients(self, value):
        value['items'] = [Recipient().load(r) for r in value['items']]
        self._recipients = value

    def __str__(self):
        return "\n".join([
            "id                      : %s" % self.id,
            "href                    : %s" % self.href,
            "direction               : %s" % self.direction,

            "originator              : %s" % self.originator,