@classmethod
def _from_dict(cls, _dict):
    """Initialize a QueryRelationsEntity object from a json dictionary."""
    args = {}
    if 'text' in _dict:
        args['text'] = _dict.get('text')
    if 'type' in _dict:
        args['type'] = _dict.get('type')
    if 'exact' in _dict:
        args['exact'] = _dict.get('exact')
    return cls(**args)
