@classmethod
def _from_dict(cls, _dict):
    """Initialize a QueryResultMetadata object from a json dictionary."""
    args = {}
    if 'score' in _dict:
        args['score'] = _dict.get('score')
    else:
        raise ValueError(
            "Required property 'score' not present in QueryResultMetadata JSON"
            )
    if 'confidence' in _dict:
        args['confidence'] = _dict.get('confidence')
    else:
        raise ValueError(
            "Required property 'confidence' not present in QueryResultMetadata JSON"
            )
    return cls(**args)
