def _to_dict(self):
        """Return a json dictionary representing this model."""
        _dict = {}
        if hasattr(self, 'document_label') and self.document_label is not None:
            _dict['document_label'] = self.document_label
        if hasattr(self, 'location') and self.location is not None:
            _dict['location'] = self.location._to_dict()
        if hasattr(self, 'text') and self.text is not None:
            _dict['text'] = self.text
        if hasattr(self, 'types') and self.types is not None:
            _dict['types'] = [x._to_dict() for x in self.types]
        if hasattr(self, 'categories') and self.categories is not None:
            _dict['categories'] = [x._to_dict() for x in self.categories]
        if hasattr(self, 'attributes') and self.attributes is not None:
            _dict['attributes'] = [x._to_dict() for x in self.attributes]
        return _dict
def _to_dict ( self ) : _dict = { } if hasattr ( self , 'document_label' ) and self . document_label is not None : _dict [ 'document_label' ] = self . document_label if hasattr ( self , 'location' ) and self . location is not None : _dict [ 'location' ] = self . location . _to_dict ( ) if hasattr ( self , 'text' ) and self . text is not None : _dict [ 'text' ] = self . text if hasattr ( self , 'types' ) and self . types is not None : _dict [ 'types' ] = [ x . _to_dict ( ) for x in self . types ] if hasattr ( self , 'categories' ) and self . categories is not None : _dict [ 'categories' ] = [ x . _to_dict ( ) for x in self . categories ] if hasattr ( self , 'attributes' ) and self . attributes is not None : _dict [ 'attributes' ] = [ x . _to_dict ( ) for x in self . attributes ] return _dict
Return a json dictionary representing this model.