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