Build an instance of MessageInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.message.MessageInstance
        :rtype: twilio.rest.api.v2010.account.message.MessageInstance
977466
def get_instance(self, payload):
        
        return MessageInstance(self._version, payload, account_sid=self._solution['account_sid'], )
321286
def create(self, data):
        
        data = values.of({'Data': serialize.object(data), })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return StreamMessageInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            stream_sid=self._solution['stream_sid'],
        )
37076
def get_instance(self, payload):
        
        return FaxMediaInstance(self._version, payload, fax_sid=self._solution['fax_sid'], )
1088649
def get_instance(self, payload):
        
        return ShortCodeInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1217433
def get_instance(self, payload):
        
        return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
1212280
def get_instance(self, payload):
        
        return FunctionInstance(self._version, payload, service_sid=self._solution['service_sid'], )
787263
def get_instance(self, payload):
        
        return WebhookInstance(self._version, payload, session_sid=self._solution['session_sid'], )
1130012
def get_instance(self, payload):
        
        return SampleInstance(
            self._version,
            payload,
            assistant_sid=self._solution['assistant_sid'],
            task_sid=self._solution['task_sid'],
        )
1201832
def InitFromGrrMessage(self, message):
    """"""

    if message.source:
      self.client_id = message.source.Basename()
    self.payload_type = compatibility.GetName(message.payload.__class__)
    self.payload = message.payload
    self.timestamp = message.age

    return self
754894
def get_instance(self, payload):
        
        return TaskInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
924068
def get_instance(self, payload):
        
        return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], )
537623
def message_to_objects(
        message: Dict, sender: str, sender_key_fetcher: Callable[[str], str] = None, user: UserType = None,
) -> List:
    
    # We only really expect one element here for ActivityPub.
    return element_to_objects(message)
5457
def get_instance(self, payload):
        
        return TokenInstance(self._version, payload, account_sid=self._solution['account_sid'], )
316408
def get_instance(self, payload):
        
        return MessageInstance(self._version, payload, session_sid=self._solution['session_sid'], )
48264
def authenticate_credentials(self, payload):
        
        User = get_user_model()
        username = jwt_get_username_from_payload(payload)

        if not username:
            msg = _('Invalid payload.')
            raise exceptions.AuthenticationFailed(msg)

        try:
            user = User.objects.get_by_natural_key(username)
        except User.DoesNotExist:
            msg = _('Invalid signature.')
            raise exceptions.AuthenticationFailed(msg)

        if not user.is_active:
            msg = _('User account is disabled.')
            raise exceptions.AuthenticationFailed(msg)

        return user
1301341
def get_instance(self, payload):
        
        return StepInstance(
            self._version,
            payload,
            flow_sid=self._solution['flow_sid'],
            engagement_sid=self._solution['engagement_sid'],
        )
710490
def get_instance(self, payload):
        
        return InviteInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            channel_sid=self._solution['channel_sid'],
        )