What do you mean by a 'generating function'? Is it a
probability generating function? If so, what is the random variable to which the function is being related?
If it's not a prob-gen function, then what does the 'x' in the above equation represent?
I'm pretty sure that, whatever the intended meaning of your expression, it won't be the answer, as it doesn't use r.
Regarding the meaning of the question itself, I think it's clear enough. Say the candy is arranged in u+v+w cups in a line in front of you. The first u cups each have one candy in, the next v cups have two each and the last w have three each. The candies in the k-th cup all have the number k written on them. You choose r candies from the cups and thus end up with a bunch of r numbers, some of which may be the same. The question is how many different collections of numbers can you get?
Although the question is clear, solving it doesn't seem easy. The answer will be an expression in terms of u, v, w and r. I imagine there's a standard distribution for this sort of thing. I thought maybe hypergeometric, but on a quick consideration, it didn't seem to fit. I can write it as a rather long, messy expression with multiple nested sums. There may be a slicker way though.