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