
480 N.W.2d 576 (1991)
CITY OF McGREGOR, Iowa, Plaintiff,
v.
Robert A. JANETT, Virginia M. Janett and James Janett, Defendants.
Robert A. JANETT, Virginia M. Janett and James Janett, Third-Party Plaintiffs-Appellants,
v.
CITY OF McGREGOR, Iowa, Donald P. Hattery and Shive-Hattery Engineers, Inc., Third-Party Defendants-Appellees.
No. 90-1916.
Court of Appeals of Iowa.
November 26, 1991.
*577 James H. Reynolds, Dubuque, for third-party plaintiffs-appellants.
James D. Hodges, Jr. and John M. Bickel of Shuttleworth & Ingersoll, P.C., Cedar Rapids, for third-party defendants-appellees Hattery and Shive-Hattery Engineers.
William C. Fuerste and Norman J. Wangburg of Fuerste, Carrew, Coyle, Juergens & Sudmeier, P.C., Dubuque, and Steve McCorkindale of Ehrhardt, Gnagy & McCorkindale, Elkader, for third-party defendant-appellee City of McGregor.
Heard by OXBERGER, C.J., and DONIELSON and HABHAB, JJ.
DONIELSON, Judge.
Robert and Virginia Janett were the owners of a parcel of real estate near McGregor, Iowa, consisting of shoreline property along the Mississippi River. The property is located immediately south of the city's sewage treatment plant. The defendant, Donald Hattery, is the McGregor City Engineer who also owns shoreline property adjacent to the treatment plant. His property, however, is located north of the plant.
In the early 1980s, the City of McGregor decided to expand its sewage treatment facilities. By request of the city, Hattery proposed a plan to expand the facility at the lowest possible cost.[1] According to Hattery's plan, the city would save approximately $50,000 by expanding the treatment plant to the south, extending onto the Janetts' property.
On November 20, 1987, the city's application for condemnation of the Janetts' property was approved by the district court, and on December 16, 1987, the compensation committee assessed an award to the Janetts of $29,500 in compensation for the taking.
On January 5, 1988, after the commission entered its award, the Janetts attended a *578 city council meeting where the plans for the sewage treatment plant were again discussed. At the meeting, Scott Bryan, an engineer employed by the firm of Shive-Hattery Engineers, restated Hattery's original position regarding expansion of the plant. Bryan told the city council that although the plant could be designed so as not to require the Janett property, acquisition of the property would result in substantial construction savings and make future expansion possible.
However, the matter was discussed by the council in the open meeting, and the Janetts apparently left the meeting with the impression that their property would not be needed. Therefore, relying on the open meeting actions of the council and the assurances of certain council members, the Janetts did not appeal the condemnation award.
After the open meeting, however, the council went into executive session. During the executive session, the council telephoned Hattery, who advised the council that the city needed the Janett property. The council then decided to go ahead with the condemnation but failed to alert the Janetts.
On December 13, 1988, well after the Janetts' time for appeal had lapsed, the city filed an action against the Janetts requesting that they be ordered to vacate the property. The Janetts filed an answer and also filed a counterclaim under 42 U.S.C. section 1983, which is the subject of this action. On June 8, 1989, the district court granted partial summary judgment in favor of the city, ordering the Janetts to vacate their property, but made no findings regarding the counterclaim.
The third-party defendants, Hattery and Shive-Hattery Engineers, moved for summary judgment on the counterclaim on August 22, 1990. They asserted that the Janetts' constitutional rights had not been violated. They also alleged that if there had been a violation, it was not as a result of any direct action on Hattery's part. Finally, they asserted that they were entitled to qualified immunity. On October 1, 1990, the district court denied the motion for summary judgment, stating there were genuine issues of material fact which existed surrounding the January 8, 1988, council meeting.
Hattery then filed a rule 179(b) motion requesting that the court reconsider its ruling. On November 9, 1990, the district court reversed itself and granted summary judgment against the Janetts. The district court concluded that it was undisputed that Hattery and Shive-Hattery Engineers had no input in the city council's decision to enforce the condemnation order. Based on what it found to be the undisputed facts, the court concluded that:
no material issue of fact exists which would prove that the Third-Party Defendants, Donald P. Hattery and Shive-Hattery Engineers, Inc., violated any clearly established constitutional rights of the Third-Party Plaintiffs. The Court further concludes that the Third-Party Defendants are entitled to qualified immunity in a situation such as this.
The Janetts have appealed. They assert that genuine issues of material fact remain. We disagree and affirm the trial court.
Our review of this action is for the correction of errors of law. Iowa R.App.P. 4. "Our task on appeal is to determine whether a genuine issue of material fact exists and whether the law was correctly applied." Adam v. Mount Pleasant Bank & Trust Co., 355 N.W.2d 868, 872 (Iowa 1984). Summary judgment is appropriate "if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue of material fact and that the moving party is entitled to a judgment as a matter of law." Iowa R.Civ.P. 237(c); see Farm Bureau Mutual Insurance Co. v. Milne, 424 N.W.2d 422, 423 (Iowa 1988). A fact issue is generated if reasonable minds can differ on how the issue should be resolved, but if the conflict in the record consists only of the legal consequences flowing from undisputed facts, entry of summary judgment is proper. Thorp Credit, Inc. v. Gott, 387 N.W.2d 342, 343 (Iowa 1986); Milne, 424 N.W.2d at 423. An issue of fact is material when its *579 resolution might effect the outcome of the suit, given the applicable governing law. Kapadia v. Preferred Risk Mutual Insurance Co., 418 N.W.2d 848, 850 (Iowa 1988). "The requirement of a `genuine' issue of fact means that the evidence is such that a reasonable jury could return a verdict for the nonmoving party." Id.
The moving party has the burden to show the nonexistence of a material fact, Milne, 424 N.W.2d at 423, and the evidence must be viewed in the light most favorable to the nonmoving party, Gott, 387 N.W.2d at 343. The procedure is functionally akin to a directed verdict, and every legitimate inference that reasonably can be deduced from the evidence should be afforded the nonmoving party. Id.; Sherwood v. Nissen, 179 N.W.2d 336, 339 (Iowa 1970). If the motion is properly supported, however, the resisting party "must set forth specific facts showing that there is a genuine issue for trial." Iowa R.Civ.P. 237(e). Iowa Rule of Civil Procedure, Rule 237 is substantially similar to Federal Rule of Civil Procedure, Rule 56. As such, we draw on federal case law for guidance in the interpretation of our own rule. Sherwood, 179 N.W.2d at 339.
The Janetts' brought their counterclaim under 42 U.S.C. section 1983. To recover on such a claim, one must generally show that a person has deprived him or her of a federally protected right and that the person acted under color of state law at the time. Bennett v. City of Redfield, 446 N.W.2d 467, 470 (Iowa 1989). Hattery, however, argues that he is shielded from liability by qualified immunity.
The Supreme Court, in Harlow v. Fitzgerald, held that "government officials performing discretionary functions generally are shielded from liability for civil damages insofar as their conduct does not violate clearly established statutory or constitutional rights of which a reasonable person would have known." 457 U.S. 800, 819, 102 S.Ct. 2727, 2738, 73 L.Ed.2d 396, 410 (1982).
In so holding, the court struck a balance between two competing interests. "When government officials abuse their offices, `action[s] for damages may offer the only realistic avenue for vindication of constitutional guarantees.'" Anderson v. Creighton, 483 U.S. 635, 639, 107 S.Ct. 3034, 3038, 97 L.Ed.2d 523, 529 (1987) (quoting Harlow v. Fitzgerald, 457 U.S. at 815, 102 S.Ct. at 2736, 73 L.Ed.2d at 404). "On the other hand, permitting damages suits against government officials can entail substantial social costs, including the risk that fear of personal monetary liability and harassing litigation will unduly inhibit officials in the discharge of their duties." Id.
Qualified immunity is an affirmative defense, and the defendant official must plead it. Harlow v. Fitzgerald, 457 U.S. at 816, 102 S.Ct. at 2736, 73 L.Ed.2d at 408. Once the defense has been pleaded, and the case has proceeded to summary judgment, "the judge appropriately may determine, not only the currently applicable law, but whether that law was clearly established at the time an action occurred." Harlow v. Fitzgerald, 457 U.S. 800, 819, 102 S.Ct. 2727, 2738, 73 L.Ed.2d 396, 410 (1982).
The test for qualified immunity at the summary judgment stage of a proceeding is an objective one: "to be clearly established, `[t]he contours of the right must be sufficiently clear that a reasonable official would understand that what he is doing violates that right.'" .... The plaintiff must demonstrate that the law is clearly established, for reasonable doubts about the state of the law implicate the central concerns of the defense.... The defendant bears the burden of proof with respect to all other elements of the defense, including whether there were extraordinary circumstances and whether he neither knew nor should have known of the relevant legal standard.
Johnson-El v. Schoemehl, 878 F.2d 1043, 1048 (8th Cir.1989) (citations omitted). The clearly stated policy behind this standard and procedure is to permit "[i]nsubstantial lawsuits [to] be quickly terminated." Harlow v. Fitzgerald, 457 U.S. at 815, 102 S.Ct. at 2736, 73 L.Ed.2d at 408 (citing cases).
Unless the complaint states a compensable claim for relief ..., it should not *580 survive a motion to dismiss. Moreover, the Court recognized in Scheuer that damages suits concerning constitutional violations need not proceed to trial, but can be terminated on a properly supported motion for summary judgment based on the defense of immunity.... In responding to such a motion, plaintiffs may not play dog in the manger. . . .
Id. (quoting Butz v. Economou, 438 U.S. 478, 507-508, 98 S.Ct. 2894, 2911, 57 L.Ed.2d 895, 917 (1978)).
Nowhere in the record do the Janetts even allege, let alone support, the assertion that the defendants knew or should have known that they were violating a particular constitutional right enjoyed by the Janetts.
In Anderson v. Creighton, the Supreme Court stated:
The operation of this standard ... depends substantially upon the level of generality at which the relevant "legal rule" is to be identified. For example, the right to due process is quite clearly established by the Due Process Clause, and thus there is a sense in which any action that violated that Clause (no matter how unclear it may be that the particular action is a violation) violates a clearly established right. Much the same could be said of any other constitutional or statutory violation. But if the test of "clearly established law" were to be applied at this level of generality, it would bear no relationship to the "objective legal reasonableness" that is the touchstone of [Harlow v. Fitzgerald]. Plaintiffs would be able to convert the rule of qualified immunity that our cases plainly establish into a rule of virtually unqualified liability simply by alleging violation of extremely abstract rights. [Harlow v. Fitzgerald] would be transformed from a guarantee of immunity into a rule of pleading. Such an approach, in sum, would destroy "the balance that our cases strike between the interests in vindication of citizens' constitutional rights and in public officials' effective performance of their duties," by making it impossible for officials "reasonably [to] anticipate when their conduct may give rise to liability for damages."
483 U.S. at 640, 107 S.Ct. at 3038-39, 97 L.Ed.2d at 530 (citing cases).
It is clear from this passage that the Janetts have not met their burden. The Janetts have merely alleged violations of extremely abstract rights.
Furthermore, any allegations that the defendants violated sections of the Iowa Code or professional codes of conduct are misplaced. In violating a state statute or regulation, an official does not deprive himself or herself of qualified immunity unless the statute or regulation is the source of the constitutional right the plaintiffs have sued to vindicate. See Coleman v. Frantz, 754 F.2d 719, 729-30 (7th Cir. 1985); Myers v. Morris, 810 F.2d 1437, 1469 (8th Cir.1987).
It is not at all clear, in the instant case, what rights the Janetts allege the defendants violated. In their counterclaim, the Janetts state in relevant part:
3The City of McGregor has acted through and on behalf of Donald P. Hattery, individually, and through and on behalf of Shive-Hattery Engineers, Inc., and as City Engineer for the City of McGregor in attempting to dispossess Plaintiffs of their ownership and peaceful possession of the aforesaid real estate under color of law and in violation of Counterclaimants' State and Federal Constitutional rights
(1) to due process under the 14th Amendment of the U.S. Constitution and Article I, Sec. 1 of Iowa Constitution;
(2) to equal protection and eminent domain provisions of Article I, Sec. 6 of the State of Iowa Constitution; and
(3) to the property rights of the 5th Amendment of the U.S. Constitution and [Article I, Section 18] of the Constitution of the State of Iowa.
In their resistance to the motion for summary judgment, the plaintiffs assert:

*581 Donald P. Hattery and Shive-Hattery Engineers, Inc. also knew, or should have known, of the Engineering Codes of Ethics for engineers ... [and] also knew or should have known about Iowa Code Secs. 362.5 and 403.16 concerning the duties of municipal officials and conflicts of interest in their professional work. These conflicts could be in such a character as to remove any question of good faith or any cloud on a claim of good faith so as to present a genuine issue of fact for the trier of fact in our litigation against Donald P. Hattery and Shive-Hattery Engineers, Inc.
Again in their Brief and Argument to this court, the Janetts state "The main thrust of the Janett's Complaint is that Donald Hattery and Shive-Hattery Engineers, Inc. in the capacity of the City engineer were acting for their own benefit in violation of the standards for conflicts of interest and ethics for engineers on the Hattery's property immediately adjacent to the North of the sewer treatment project, with the Janetts' property to the South of the project."
We agree with the trial court that the defendants did not at any time know, nor should they have known, that their actions were violative of a clearly established constitutional right enjoyed by the Janetts. The third-party defendants' motion for summary judgment was properly granted.
The costs of this appeal are taxed to the Janetts.
For all the reasons stated, the judgment of the district court is affirmed.
AFFIRMED.
NOTES
[1]  The behavior of Donald Hattery and the McGregor City Council in this matter presents a glaring conflict of interest. It is truly a lesson in what not to do in such a litigious situation. Hattery owned land which might have been an alternative expansion site for the sewage treatment plant. Therefore, his judgment in recommending the direction of the expansion was subject to the influence of his own self-interest.

It is also possible that Hattery's judgment regarding the necessity of acquiring more land for the expansion may have been influenced by a profit motive on his part. One might be able to show that the value of Hattery's shoreline real estate will increase due to the resultant decrease in the supply of other nearby, privately-owned, parcels of shoreline property.
Furthermore, it is the unrebutted contention of the appellants that McGregor City Councilman William Gruever moonlights as the caretaker of Donald Hattery's riverfront property.
