Let A be a nonempty finite set of integers. The h-fold sumset of A, denoted by hA, is the set of all sums of h elements of A with repetitions allowed. A restricted h-fold sumset of A, denoted by hˆA, is the set of all sums of h distinct elements of A. For h≥1 and r≥1, we define a generalized h-fold sumset, denoted by h(r)A, which is the set of all sums of h elements of A, where each element appearing in the sum can be repeated at most r times. Thus the h-fold sumset hA and the restricted h-fold sumset hˆA are particular cases of the sumset h(r)A for r=h and r=1, respectively. The direct problem for h(r)A is to find a lower bound for |h(r)A| in terms of |A|. The inverse problem for h(r)A is to determine the structure of the finite set A of integers for which |h(r)A| is minimal. In this paper we solve both the problems.