Under US employment law
There's a whole host of laws for different jobs/states/workers.
Federal workers are some of the most protected workers in America, but only when you're vested. Because:
union contract that says otherwise
But you need a year to get those protections
What?
No, it takes a year to be vested, at which much union protections become much stronger.
Vestment isn't just a fed or even American thing.