'Initialize the MessageInstance
:returns: twilio.rest.api.v2010.account.message.MessageInstance
:rtype: twilio.rest.api.v2010.account.message.MessageInstance'

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

    super(MessageInstance, self).__init__(version)
    self._properties = {'account_sid': payload['account_sid'], 'api_version': payload['api_version'], 'body': payload['body'], 'date_created': deserialize.rfc2822_datetime(payload['date_created']), 'date_updated': deserialize.rfc2822_datetime(payload['date_updated']), 'date_sent': deserialize.rfc2822_datetime(payload['date_sent']), 'direction': payload['direction'], 'error_code': deserialize.integer(payload['error_code']), 'error_message': payload['error_message'], 'from_': payload['from'], 'messaging_service_sid': payload['messaging_service_sid'], 'num_media': payload['num_media'], 'num_segments': payload['num_segments'], 'price': deserialize.decimal(payload['price']), 'price_unit': payload['price_unit'], 'sid': payload['sid'], 'status': payload['status'], 'subresource_uris': payload['subresource_uris'], 'to': payload['to'], 'uri': payload['uri']}
    self._context = None
    self._solution = {'account_sid': account_sid, 'sid': (sid or self._properties['sid'])}
