Without any political commentary, I don't care whether you're in LA, NYC, Dallas, or Podunk Holler. I didn't see the original post before it was amended. Still, no political issues follow.
Assumption 1 for this post. You are legally carrying a handgun.
Assumption 2 for this post. You literally see a handgun being pointed at you, regardless if it's out of a car window or a doorway; whatever.
Assumption 3 for this post. The handgun you saw fires and you are hit and you know that you are hit. (This is actually almost irrelevant!)
Firing a weapon in self defense is always justified. It is justified in defense of third parties as well. Never mind the twisting of justification by the political motivations of the local DA, Sheriff, or Police Chief. Keep it simple for this post.
YES, you pull your weapon. Legal. Period. A lawful "movement" under the circumstances.
YES, you are justified in firing your weapon. Legal. A lawful "movement" or action permissible under the circumstances.
The law does not require you to make a determination if the bone head threatening you is using a toy or a real weapon. If you feel there is a threat of death or serious bodily harm you are justified in pulling your self defense tool and then using it.
It's really quite that simple. Anything else is superfluous commentary.
And being hit by rubber bullets or paintball pellets is irrelevant. Your immediate perception rules.
And yes, that's my free legal opinion and I have a law license hanging on my wall. I just waved at it to see if it was awake. It is.