# 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/base_list.py
# class BaseList(Base):
# 
#     def __init__(self, item_type):
#         """When setting items, they are instantiated as objects of type item_type."""
#         self.limit = None
#         self.offset = None
#         self.count = None
#         self.totalCount = None
#         self._links = None
#         self._items = None
# 
#         self.itemType = item_type
# 
#     @property
#     def links(self):
#         return self._links
# 
#     @links.setter
#     def links(self, value):
#         self._links = Links().load(value)
# 
#     @property
#     def items(self):
#         return self._items
# 
#     @items.setter
#     def items(self, value):
#         """Create typed objects from the dicts."""
#         items = []
#         if value is not None:
#             for item in value:
#                 items.append(self.itemType().load(item))
# 
#         self._items = items
# 
#     def __str__(self):
#         items_count = 0 if self.items is None else len(self.items)
#         return "%s with %d items.\n" % (str(self.__class__), items_count)
# 
# 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.base_list import BaseList
from messagebird.recipient import Recipient


class MessageList(BaseList):
    def __init__(self):
        # We're expecting items of type Message
        super(MessageList, self).__init__(Message)


class Message(Base):
    def __init__(self):
        self.id = None
        self.href = None
        self.direction = None
        self.type = None
        self.originator = None
        self.body = None
        self.reference = None
        self.validity = None
        self.gateway = None
        self.typeDetails = None
        self.datacoding = None
        self.mclass = None
        self._scheduledDatetime = None
        self._createdDatetime = None
        self._recipients = None

    @property
    def scheduledDatetime(self):

# 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/base_list.py
# class BaseList(Base):
# 
#     def __init__(self, item_type):
#         """When setting items, they are instantiated as objects of type item_type."""
#         self.limit = None
#         self.offset = None
#         self.count = None
#         self.totalCount = None
#         self._links = None
#         self._items = None
# 
#         self.itemType = item_type
# 
#     @property
#     def links(self):
#         return self._links
# 
#     @links.setter
#     def links(self, value):
#         self._links = Links().load(value)
# 
#     @property
#     def items(self):
#         return self._items
# 
#     @items.setter
#     def items(self, value):
#         """Create typed objects from the dicts."""
#         items = []
#         if value is not None:
#             for item in value:
#                 items.append(self.itemType().load(item))
# 
#         self._items = items
# 
#     def __str__(self):
#         items_count = 0 if self.items is None else len(self.items)
#         return "%s with %d items.\n" % (str(self.__class__), items_count)
# 
# 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/message.py
from messagebird.base import Base
from messagebird.base_list import BaseList
from messagebird.recipient import Recipient



class MessageList(BaseList):
    def __init__(self):
        # We're expecting items of type Message
        super(MessageList, self).__init__(Message)


class Message(Base):
    def __init__(self):
        self.id = None
        self.href = None
        self.direction = None
        self.type = None
        self.originator = None
        self.body = None
        self.reference = None
        self.validity = None
        self.gateway = None
        self.typeDetails = None
        self.datacoding = None
        self.mclass = None
        self._scheduledDatetime = None
        self._createdDatetime = None
        self._recipients = None

    @property
    def scheduledDatetime(self):

        return self._scheduledDatetime