Hastings City Attorney to retire Thursday