First-principles study of structural and electronic properties of gallium based nanowires