Does this "defined event" actually have any legal status? How long can it take until the defined event occurs? It's possible that this is an intentionally murky area of the law (i.e., a judge can decide that preventing a person from leaving for an hour in case X is okay but 1 minute in case Y is not). Even so, it seems like if there's a person in front of you with legal authority to let you out of a secured area and you are asking them to let you out, then either they have to let you out or you are being detained.
That sounds precisely like 'detention'. For instance, people are detained pending trial. In fact, imprisonment is also being free to leave after some defined event occurs - namely the completion of sentence. This third option is exactly the first option.
No. In that case you are detained until that event occurs, like the person showing up to escort you out, or someone posting bail, or the police handing you your ticket and saying you are free to leave.