# 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)


from messagebird.base import Base

    @property
    def updatedDatetime(self):
        return self._updatedDatetime

    @updatedDatetime.setter
    def updatedDatetime(self, value):
        if value is not None:
            self._updatedDatetime = self.value_to_time(value, '%Y-%m-%dT%H:%M:%SZ')

    def __str__(self):
        return "\n".join([
            'message id        : %s' % self.id,
            'channel id        : %s' % self.channelId,
            'direction         : %s' % self.direction,
            'status            : %s' % self.status,
            'type              : %s' % self.type,
            'content           : %s' % self.content,
            'created date time : %s' % self._createdDatetime,
            'updated date time : %s' % self._updatedDatetime
        ])


class ConversationMessageReference(Base):
    def __init__(self):
        self.totalCount = None
        self.href = None
        self.lastMessageId = None



# 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/conversation_message.py
from messagebird.base import Base


    @property
    def updatedDatetime(self):
        return self._updatedDatetime

    @updatedDatetime.setter
    def updatedDatetime(self, value):
        if value is not None:
            self._updatedDatetime = self.value_to_time(value, '%Y-%m-%dT%H:%M:%SZ')

    def __str__(self):
        return "\n".join([
            'message id        : %s' % self.id,
            'channel id        : %s' % self.channelId,
            'direction         : %s' % self.direction,
            'status            : %s' % self.status,
            'type              : %s' % self.type,
            'content           : %s' % self.content,
            'created date time : %s' % self._createdDatetime,
            'updated date time : %s' % self._updatedDatetime
        ])


class ConversationMessageReference(Base):
    def __init__(self):
        self.totalCount = None
        self.href = None
        self.lastMessageId = None



class ConversationMessageList(Base):