I just wanna make sure google translate has it right. I want to know to say "I got hit" as in "I got hit by the edge of the bed"..."I got hit by a bike".... etc.

is it Я получил удар?