The firing of a Google engineer who sent a controversial anti-diversity memo raises the question: what exactly can you say at work?

The answer? Only what your individual employer allows.

“When you go to work for a private employer, you forgo your rights to express yourself,’’ says Roy Gutterman, a lawyer and communication law professor at Syracuse University in Syracuse, New York. “It’s perhaps ironic, but within a private workplace your rights to express yourself are pretty limited.”

James Damore was fired in the wake of writing an essay that asserted that it wasn't sexism keeping women from making up half of the company’s tech and leadership positions, but women's preferences and biological differences from men. First reported by Bloomberg, a person familiar with the matter confirmed to USA TODAY that Damore was fired.

On Tuesday, Damore appears to have filed an official complaint against Google with the National Labor Relations Board alleging "coercive statements," though the substance of the charge was not publicly available.

Conservative groups have condemned what they say is Google’s trampling of Damore’s right to free speech. But within the workplace, only federal and state government workers have protections under the First Amendment, and then only to a limited extent, says Elizabeth Owens Bille, general counsel for the Society for Human Resource Management.

And while the National Labor Relations Act generally protects privately employed workers from being punished for political expression related to the workplace — like forming a union — or from being singled out for a particular political point of view, employers can clamp down on pretty much any other form of speech they deem unacceptable.

More:Work and politics: What rights do employees have?

More:Diversity debate divides Silicon Valley

More:5 signs of a bad workplace

"In most states, employers can maintain civility policies,'' says Catherine Fisk, a labor and employment law professor at U.C. Berkeley, "so certainly the employer can enforce a policy prohibiting offensive speech, and offensive is in the judgment of the employers.’’

In a company-wide memo, Google CEO Sundar Pichai said that Google is strongly in favor of employees being able to express themselves “and much of what was in that memo is fair to debate, regardless of whether a vast majority of Googlers disagree with it,” Pichai wrote.

But Google's Code of Conduct states that the company "strictly'' prohibits unlawful discrimination or harassment on the basis of race, color and sex among other characteristics. And Pichal said that parts of the engineer's manifesto violate the code by advancing harmful gender stereotypes.

Whether or not an employee has recently read the company's policy on conduct, decisions on what to say in the office sometimes boil down to common sense.

"Certainly circulating a memo suggesting that women are innately as a group less able to do certain kinds of jobs than men, most people would recognize that while a perfectly acceptable view to express privately or outside the workplace, it's not wise to express it in the workplace,'' Fisk says.

Fatima Goss Graves, president and CEO of the National Women's Law Center, says that companies should actively outline to employees what is not acceptable at the office.

“I think employers should be both describing, and reminding their employees of their non-discrimination and harassment policies,’’ she says. “Whether they are public employers or private employers, (they) can take steps to ban discrimination based on any protected class — race, sex disability, age — and that includes discrimination that takes the form of speech."

California is an at-will work state, meaning that employers can terminate a worker for any reason, at any time, unless there is a contract or public policy that allows for an exception.

But some human resource professionals say that the Google workplace may have benefited more from encouraging dialogue around Damore's controversial perspective, rather than clamping down on it by firing him.

“There needs to be a safe, secure place within the company where people can discuss these issues and have their questions answered,” said Janine Yancey, CEO of Emtrain, a company that helps companies train workers on issues such as code of conduct compliance. Firing Damore, or any employee in such a situation is, in many ways, the worst possible outcome for the company, she said.

Google’s previous chief of diversity has said she believes one-third of the staff don’t fully buy into the company’s diversity program. Given such resistance, Google might have done better by keeping Damore on staff, but removing him from any management or hiring positions, and then actually talking through Damore's grievances because he’s clearly not the only one with such beliefs, Yancey says.

Only when companies have a process that allows for true give and take by all employees can actual learning and change occur. All too often, it can instead mean a four-hour diversity and unconscious bias workshop where participants are "preached at and where they don’t feel comfortable expressing their frustrations because as soon as they do, they get screamed at.”

Yancey's company has programs designed to allow clients’ staff to ask honest questions anonymously, and have them answered in a way that airs the issues that are simmering and hopefully addresses them and changes minds.

“People need to start having conversations,'' she says. "They need to hear the personal stories of people who didn’t have doors opened to them, who don’t have a tail wind at their back that makes everything slightly easier,” she said.

Damore is already getting other potential job offers. Many on Twitter have told him to send them his resume, including WikiLeaks founder Julian Assange,

"Censorship is for losers,'' Assange tweeted on Tuesday. "@Wikileaks is offering a job to fired Google engineer James Damore.''