Relativistic models of magnetars: structure and deformations