I'm looking for some input on duration of rest between sets and the potential impact on hypertrophy, strength and endurance. I have read a few conflicting opinions on this matter already from reputable sources and would love to hear some more opinions.

"You should take about 1min rest between your work sets. As the weight on the bar
increases and you start struggling to get 5 reps on each set, start taking up to 5 mins rest
between sets, this can make the difference between getting 5 reps or not on your next
work sets. Prevent your workouts from getting too long by not taking any rest between
your warm-up sets – just load the bar then do your next set. But stay focused." That quote is from StrongLifts5X5, which is a strenght focused program; this seems to suggest that less rest is better, but not mandatory for improvements in strenght... and strenght gains will lead to size gains.

"Rest periods
On this you have to listen to your body, autoregulate, but I
put a hard stop of two minutes between ramping sets and
thirty-seconds between clusters. If you’re on fire that day,
make the rest periods as short as you want to." - That's from HCT-12

Some programs, like the fairly straight forward Barnett training system recommend no more than 45 seconds for hypertrophy.

So, what's the consensus? How much rest should I take? When is it NOT okay to rest for say 5 min?