A Generalized Description of the Elastic Properties of Nanowires