Syndromes in which there is a deficiency or defect in the mechanisms of immunity, either cellular or humoral.