Maximum principles for a class of generalized time-fractional diffusion equations