Semiparametric And Nonparametric Model Approaches To Causal Mediation Analysis For Longitudinal Data