# Path: will/utils.py
# class Bunch(dict):
#     def __init__(self, **kw):
#         dict.__init__(self, kw)
#         self.__dict__ = self
# 
#     def __getstate__(self):
#         return self
# 
#     def __setstate__(self, state):
#         self.update(state)
#         self.__dict__ = self


import datetime
import hashlib
import logging
from pytz import timezone as pytz_timezone
from will.utils import Bunch
        "will_is_mentioned",
        "will_said_it",
        "sender",
        "backend_supports_acl",
        "content",
        "backend",
        "original_incoming_event",
    ]

    def __init__(self, *args, **kwargs):
        for f in self.REQUIRED_FIELDS:
            if not f in kwargs:
                raise Exception("Missing %s in Message construction." % f)

        for f in kwargs:
            self.__dict__[f] = kwargs[f]

        if "timestamp" in kwargs:
            self.timestamp = kwargs["timestamp"]
        else:
            self.timestamp = datetime.datetime.now()

        # Clean content.
        self.content = self._clean_message_content(self.content)

        h = hashlib.md5()
        h.update(self.timestamp.strftime("%s").encode("utf-8"))
        h.update(self.content.encode("utf-8"))
        self.hash = h.hexdigest()


# Path: will/utils.py
# class Bunch(dict):
#     def __init__(self, **kw):
#         dict.__init__(self, kw)
#         self.__dict__ = self
# 
#     def __getstate__(self):
#         return self
# 
#     def __setstate__(self, state):
#         self.update(state)
#         self.__dict__ = self


# Path: will/abstractions.py
import datetime
import hashlib
import logging
from pytz import timezone as pytz_timezone
from will.utils import Bunch

        "will_is_mentioned",
        "will_said_it",
        "sender",
        "backend_supports_acl",
        "content",
        "backend",
        "original_incoming_event",
    ]

    def __init__(self, *args, **kwargs):
        for f in self.REQUIRED_FIELDS:
            if not f in kwargs:
                raise Exception("Missing %s in Message construction." % f)

        for f in kwargs:
            self.__dict__[f] = kwargs[f]

        if "timestamp" in kwargs:
            self.timestamp = kwargs["timestamp"]
        else:
            self.timestamp = datetime.datetime.now()

        # Clean content.
        self.content = self._clean_message_content(self.content)

        h = hashlib.md5()
        h.update(self.timestamp.strftime("%s").encode("utf-8"))
        h.update(self.content.encode("utf-8"))
        self.hash = h.hexdigest()


        self.metadata = Bunch()