U.S. Rep. Joaquin Castro has provided the Trump campaign and its high-end donors a lesson in the First Amendment, and they don’t like it.

Castro, a Democrat who represents San Antonio, tweeted that it was “sad to see so many San Antonians as 2019 maximum donors to Donald Trump,” adding that “their contributions are fueling a campaign of hate that labels Hispanic immigrants as ‘invaders.’ ”

Team Trump’s outrage was immediate. The Trump campaign’s communications director, Tim Murtaugh, blasted Castro for “inviting harassment of these private citizens.” The Washington Examiner and other outlets condemned Castro’s “shaming” of Trump supporters.

Meanwhile, seven Republican lawmakers called for an investigation of Castro by the House Ethics Committee. They wrote, “Posting a target list of private citizens simply for supporting his political opponent is antithetical to our principles and serves to suppress the free speech and free association rights of Americans.”

The argument that Castro has published a “target list” — “at worst, he’s encouraging violence,” wrote Murtaugh — is especially rich coming from a crowd led by a president one of whose only actual accomplishments is elevating the schoolyard threat into a feature of American presidential politics.

The larger irony is that the aggrieved howls of protest for violation of Americans’ free-speech rights have it exactly backward.

It is Castro’s publication of the list of maximum donors that is protected by the First Amendment, which in fact requires the high rollers to accept their outing as the price of free speech.

There are many instructive cases, but one particularly salient decision is the unanimous 2014 opinion from the Supreme Court in McCullen v. Coakley, which involved the free-speech rights of abortion protesters.

Coakley concerned the constitutionality of a Massachusetts law making it a crime to knowingly stand on a public way or sidewalk within 35 feet of an entrance to an abortion clinic.

Antiabortion activists sued to invalidate the law as a violation of their free-speech rights. Chief Justice John Roberts’s opinion striking down the law noted the “vital first amendment interests at stake” — i.e., the interests of activists in presenting their antiabortion advocacy to pregnant women — and the serious burdens imposed on those interests. Roberts noted that the state’s interest in preventing harassment could be accomplished through far less intrusive means than the 35-foot buffer, which made it difficult for the activists to initiate close, personal conversations and distribute literature.

Justice Antonin Scalia concurred and characteristically relied on a sharper and cleaner principle than the majority: “Protecting people from speech they do not want to hear is not a function that the First Amendment allows the government to undertake in the public streets and sidewalks.”

The Coakley principle controls here. First, as is well known, the donors’ contributions of maximum donations constituted acts of speech under Citizens United v. FEC. They have spoken — and loudly — yet now want their speech to go unnoticed and unchallenged. But just as in Coakley, Castro is entitled to confront and criticize the donors, particularly since he is merely disseminating publicly available information.

Indeed, Citizens United instructs that you can’t restrict people from using their money to support disfavored ideas; you can only debate those ideas with them, and the only way to do that is to identify and challenge that speech. Exactly as Castro did.

The “shaming” that partisans refer to is no more than the bringing of their own speech to wider public attention. Castro’s publication and criticism of that speech were the classic responses the First Amendment prescribes. And to the extent the pro-Trump speakers are chagrined, their constitutional remedy is more speech — which of course they are doing by criticizing Castro.

As for the concerns of the donors that they will be subject to harassment as a result of their speech acts, the short answer under the Constitution is that they need to show, at a minimum, a concrete “reasonable probability” of illegal harassment to curb the First Amendment rights of Castro and his allies. That is, again, the lesson of a number of cases, including Doe v. Reed, the 2010 case in which eight justices joined in upholding Washington state’s compelled disclosure of signatory information on referendum petitions.

Many of Castro’s critics here are thin-skinned hypocrites who want to have their cake and eat it, too. They seek to harvest the contributions of Trump’s biggest donors but then shield them from the hurly-burly of public debate. They would do better to engage head-on, and counteract with more speech if they can, just what it is that is so shameful about being known to support this president.