@classmethod
def _from_dict(cls, _dict):
    """Initialize a LogMessage object from a json dictionary."""
    args = {}
    xtra = _dict.copy()
    if 'level' in _dict:
        args['level'] = _dict.get('level')
        del xtra['level']
    else:
        raise ValueError(
            "Required property 'level' not present in LogMessage JSON")
    if 'msg' in _dict:
        args['msg'] = _dict.get('msg')
        del xtra['msg']
    else:
        raise ValueError(
            "Required property 'msg' not present in LogMessage JSON")
    args.update(xtra)
    return cls(**args)
