Infection-acquired versus vaccine-acquired immunity in an SIRWS model