Israel left Gaza in 2005. There are no settlements there. Hamas is only in Gaza.
Regarding the West Bank, according to the international law, some areas are illegally occupied. In addition, even the Supreme Court of Israel has ruled that Israel is holding West Bank under “belligerent occupation”.