I mean, realistically speaking, the IDF is a powerful force, while Hamas is not. Israel has the ability to completely take over Gaza, but Gaza does not have the ability to take over Israel. So, as macabre as it may be, Hamas' right to exist, technically speaking, is controlled by Israel.
(All of this assuming no outside intervention for 3rd-party nations or groups of nations, of course.)
(All of this assuming no outside intervention for 3rd-party nations or groups of nations, of course.)