Possible meanings are 1) the author speaks of God causing bad things to happen to him as if he were a city and God was an enemy that built up siege works against him. Alternate translation: "God attacked me like an enemy army that sets up siege works around a city" or 2) the author speaks of God causing the enemy army to attack Jerusalem as if God were the enemy. Alternate translation: "God caused the enemy army to build up siege works against me" (See: [[rc://en/ta/man/jit/figs-metaphor]])
This represents God causing him to experience much bitterness and hardship. Alternate translation: "caused me to experience much bitterness and hardship" or "caused me to suffer and have many problems" (See: [[rc://en/ta/man/jit/figs-metaphor]])