def _collect_fields(self):
        '''
        Collects all the attributes that are instance of
        :class:`incoming.datatypes.Types`. These attributes are used for
        defining rules of validation for every field/key in the incoming JSON
        payload.

        :returns: a tuple of attribute names from an instance of a sub-class
                  of :class:`PayloadValidator`.
        '''

        fields = []
        for prop in dir(self):
            if isinstance(getattr(self, prop), Types):
                fields.append(prop)

        if not len(fields):
            raise Exception('No keys/fields defined in the validator class.')

        return tuple(fields)
Collects all the attributes that are instance of
        :class:`incoming.datatypes.Types`. These attributes are used for
        defining rules of validation for every field/key in the incoming JSON
        payload.

        :returns: a tuple of attribute names from an instance of a sub-class
                  of :class:`PayloadValidator`.