'Initialize the MessageInstance
:returns: twilio.rest.chat.v1.service.channel.message.MessageInstance
:rtype: twilio.rest.chat.v1.service.channel.message.MessageInstance'

def __init__(self, version, payload, service_sid, channel_sid, sid=None):

    super(MessageInstance, self).__init__(version)
    self._properties = {'sid': payload['sid'], 'account_sid': payload['account_sid'], 'attributes': payload['attributes'], 'service_sid': payload['service_sid'], 'to': payload['to'], 'channel_sid': payload['channel_sid'], 'date_created': deserialize.iso8601_datetime(payload['date_created']), 'date_updated': deserialize.iso8601_datetime(payload['date_updated']), 'was_edited': payload['was_edited'], 'from_': payload['from'], 'body': payload['body'], 'index': deserialize.integer(payload['index']), 'url': payload['url']}
    self._context = None
    self._solution = {'service_sid': service_sid, 'channel_sid': channel_sid, 'sid': (sid or self._properties['sid'])}
