@classmethod
def _from_dict(cls, _dict):
    """Initialize a ActivityTracking object from a json dictionary."""
    args = {}
    validKeys = ['read_data_events', 'write_data_events',
        'activity_tracker_crn']
    badKeys = set(_dict.keys()) - set(validKeys)
    if badKeys:
        raise ValueError(
            'Unrecognized keys detected in dictionary for class ActivityTracking: '
             + ', '.join(badKeys))
    if 'read_data_events' in _dict:
        args['read_data_events'] = _dict.get('read_data_events')
    if 'write_data_events' in _dict:
        args['write_data_events'] = _dict.get('write_data_events')
    if 'activity_tracker_crn' in _dict:
        args['activity_tracker_crn'] = _dict.get('activity_tracker_crn')
    return cls(**args)
