Plaintiff was a sworn police officer working for the Winston-Salem Police Department ("WSPD") beginning on 6 February 1989. In July 1999, she injured her back while away from work. The injury caused her persistent debilitating pain for months, and plaintiff sought treatment. In August 2001, plaintiff was transferred from her position as detective to a street patrol position, but *892plaintiff indicated that she was unable to perform the duties of a patrol officer. Thereafter, plaintiff was assigned to light duty tasks within the WSPD. Because plaintiff's condition did not improve, plaintiff underwent surgery in December 2001 and remained out of work until February 2002 while she recuperated. Plaintiff continued on light duty assignments until May 2002, when her doctor informed her that she was physically incapable of performing the duties of a sworn police officer. As a result, plaintiff inquired about alternatives for reassignment.
The portion of the City of Winston-Salem Code of Ordinances governing retirement of City personnel (the "Retirement Code") states, with regard to disabled police officers:
Any member, who did not have five years of creditable service as of August 20, 1990, and who is no longer able to perform the duties of a sworn police officer as certified by the medical review board may be transferred by the city to other duties within the police department upon recommendation of the police chief and/or human resources director, subject to the review and recommendation of the retirement commission to the city manager. Should a member of the plan desire transfer to a civilian position outside of the police department, the city will assist with the transfer. The following provisions, in order to maintain police officer retirement benefits insofar as possible, will apply to a transfer to another position within the city under this section:
(6) An officer who did not have five years of creditable service as of August 20, 1990, and elects not to accept a transfer to a new position in the police or other city department will not be eligible to continue participation in the city [retirement] plan or to receive [retirement] benefits ..., or to thereafter elect to accept the transfer.
Winston-Salem, N.C., Code of Ordinances § 50-104(g) (2007). Plaintiff did not have five years of creditable service on 20 August 1990. Therefore, under the ordinance, the City could require her to transfer to another position in the WSPD or to a civilian position with the City outside of the WSPD, and if plaintiff refused such a position, she would be entitled to a refund of her entire contributions to the retirement plan, but she would not be eligible to receive benefits under the plan.
Plaintiff met with an attorney for the WSPD, who explained plaintiff's options with respect to the retirement plan, citing the Retirement Code. Plaintiff was informed of three positions that were available within the WSPD for which plaintiff may have been qualified. When plaintiff inquired about employment positions with the City outside the WSPD, she was informed that she also had the option to apply for such positions, and she was directed to call for more information if she was interested. Plaintiff did not pursue the option of employment outside the WSPD, and on 1 August 2002, plaintiff was offered a position in the WSPD as a Police Records Specialist. Plaintiff accepted the position and shortly thereafter began the new job.
In November 2002, when interacting with her supervisor, plaintiff said "you piss me off" and at a later date "I cannot talk to you.... Because I don't want to hurt you." From these incidents, an internal complaint was filed, alleging that plaintiff violated the City's Workplace Violence Policy. Subsequently, plaintiff was suspended pending termination, and after a hearing on the matter, the City Manager upheld her termination.
Plaintiff filed a complaint against defendant (the "City") alleging constitutional violations as well as claims in contract and tort. The City answered the complaint and moved for judgment on the pleadings pursuant to Rule 12(c), moved to dismiss the claim pursuant to Rule 12(b)(6) for failure to state a claim upon which relief could be granted, and moved for summary judgment pursuant to Rule 56. N.C. Gen.Stat. § 1A-1, Rules 12(b)(6), 12(c), and 56 (2007). The trial court granted summary judgment in favor of the City. Plaintiff appeals.
We review a trial court's ruling on a motion for summary judgment de novo to determine whether "there was a genuine issue of material fact and whether the moving party *893is entitled to judgment as a matter of law." Summey v. Barker, 357 N.C. 492, 496, 586 S.E.2d 247, 249 (2003). A motion for summary judgment shall be granted "if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to a judgment as a matter of law." N.C. Gen.Stat. § 1A-1, Rule 56(c).
A defendant moving for summary judgment bears the burden of showing either that (1) an essential element of the plaintiff's claim is nonexistent; (2) the plaintiff is unable to produce evidence that supports an essential element of her claim; or, (3) the plaintiff cannot overcome affirmative defenses raised in contravention of her claims. In ruling on such motion, the trial court must view all evidence in the light most favorable to the non-movant, taking the non-movant's asserted facts as true, and drawing all reasonable inferences in her favor.
Glenn-Robinson v. Acker, 140 N.C.App. 606, 611, 538 S.E.2d 601, 607 (2000) (citation omitted). If the City met its burden of proving, as to each of plaintiff's claims, that there was no genuine issue of material fact, then we must affirm the trial court's grant of summary judgment.
Plaintiff first argues that the trial court erred in granting the City's motion for summary judgment as to her claim that the City violated her substantive due process rights. "In general, substantive due process protects the public from government action that unreasonably deprives them of a liberty or property interest." Toomer v. Garrett, 155 N.C.App. 462, 469, 574 S.E.2d 76, 84 (2002); see also U.S. Const. amend. XIV, § 1 (stating that no government shall "deprive any person of life, liberty, or property, without due process of law."). In the present case, plaintiff argues that she had a protected property interest in her retirement benefits, and she concedes that it is not a fundamental right. "[W]here the interest is not fundamental, the government action need only have a rational relation to a legitimate governmental objective to pass constitutional muster." Toomer, 155 N.C.App. at 469, 574 S.E.2d at 84. Therefore, in order for plaintiff to make a substantive due process claim, she must allege that she had a protected property interest and the government's action depriving her of it was without rational relation to a legitimate governmental interest. Plaintiff's claim fails on both accounts.
Plaintiff's argument presumes that her interest in her retirement benefits is a protected property interest, but in order for this to be so, she must have a legitimate claim of entitlement to the property interest. See Bd. of Regents of State Colls. v. Roth, 408 U.S. 564, 577, 92 S.Ct. 2701, 2709, 33 L.Ed.2d 548, 561 (1972). "Property interests ... are created and their dimensions are defined by existing rules or understandings that stem from an independent source such as state law - rules or understandings that secure certain benefits and that support claims of entitlement to those benefits." Id. Thus, to determine whether plaintiff has a claim of entitlement to her benefits, this Court must look to the Winston-Salem Code of Ordinances, which created the property interest. According to the Retirement Code, plaintiff was never entitled to collect retirement benefits upon her disability because, under § 50-104(g), the City reserved the option to transfer a disabled police officer to another position in the WSPD or elsewhere in the City. Therefore, plaintiff's interest in her retirement benefits was not a protected property interest.
Plaintiff also argues that the City's actions bore no rational relation to a legitimate government interest when the City failed to offer her a position outside the WSPD and when the police chief exercised unfettered discretion under the Retirement Code to approve positions to be made available to disabled police officers. These assertions are without merit. The evidence presented shows the City did provide a mechanism for plaintiff to pursue employment with the City outside the WSPD, in accordance with Code of Ordinances § 50-104(g). Furthermore, § 50-104(g) does not grant the police chief unfettered discretion to approve positions for disabled police officers. The Retirement Code specifies that *894either the police chief or the human resources director may recommend transfer of a disabled police officer to other duties, "subject to the review and recommendation of the retirement commission to the city manager." Winston-Salem, N.C., Code of Ordinances § 50-104(g). Plaintiff has presented no genuine issue of material fact as to any arbitrary governmental action that would substantiate her claim that the City violated her substantive due process rights.
Plaintiff next argues that the trial court erred in granting summary judgment as to her claim for breach of contract. In its motion for summary judgment, the City argued that plaintiff's claims sounding in contract were barred by the statute of limitations appearing in N.C.G.S. § 1-53(1). Section 1-53(1) provides that a statute of limitations is "within two years" for any "action against a local unit of government upon a contract, obligation or liability arising out of a contract, express or implied." N.C. Gen.Stat. § 1-53(1) (2007).
Although plaintiff argues that the City waived the defense of the statute of limitations because the City failed to raise the affirmative defense in its answer, "we have held that absent prejudice to plaintiff, an affirmative defense may be raised by a motion for summary judgment regardless of whether or not it was pleaded in the answer." Miller v. Talton, 112 N.C.App. 484, 487, 435 S.E.2d 793, 796 (1993). Plaintiff has not demonstrated any prejudice arising from the City's failure to raise the defense in its answer.
Alternatively, plaintiff argues that the statute of limitations for her claim is not two years, as provided in N.C.G.S. § 1-53(1), but rather is three years, as provided in the Winston-Salem Code of Ordinances. We reject plaintiff's argument. The Retirement Code provides:
No action shall be commenced against the city, the plan, the commission or any person specified in section 50-34(a) by any retired member or beneficiary, or other person nominated to receive benefits under the plan, respecting any deficiency in the payment of benefits more than three years after such deficiency arose.
Winston-Salem, N.C., Code of Ordinances § 50-105(d) (2007). Plaintiff would have us read this language to extend the statute of limitations to three years for a claim which is otherwise subject to a two-year statute of limitations. However, we read the language in the ordinance as purporting only to further limit a plaintiff's ability to make a claim for which the statute of limitations may be longer than three years.
In the present case, the contract between plaintiff and the City with respect to plaintiff's retirement benefits was formed when plaintiff became vested. Schimmeck v. City of Winston-Salem, 130 N.C.App. 471, 473, 502 S.E.2d 909, 911 (1998) ("In the context of retirement benefits, a contractual obligation exists once the employee's rights have vested."). Pursuant to the Retirement Code, plaintiff's right to benefits under the retirement plan vested after five years of service. Winston-Salem, N.C., Code of Ordinances § 50-104(a). Since plaintiff began working as a sworn police officer on 6 February 1989 and worked continuously for five years, her rights to her retirement benefits became vested on 6 February 1994. The alleged breach of contract occurred between May and August of 2002. Plaintiff filed her complaint on 13 January 2005, more than two years after the alleged breach. Accordingly, plaintiff's claims against the City for breach of contract arising from the retirement plan were properly barred by the statute of limitations described in N.C.G.S. § 1-53(1).
We further comment that, even if the statute of limitations had not barred plaintiff's contractual claims, the trial court properly granted summary judgment. Plaintiff's claim, as stated in her complaint, was that the City's denial of her disability retirement benefits was a material breach of contract. In her brief, plaintiff claims that the City breached the implied duty of good faith and fair dealing by requiring plaintiff to accept another position in order to retain her benefits and by failing to assist with her transfer to another position within the City. Members of the retirement plan have "a contractual right to rely on the terms of the *895retirement plan as these terms existed at the moment their retirement rights [become] vested." Simpson v. N.C. Local Gov't Employees' Retirement Sys., 88 N.C.App. 218, 224, 363 S.E.2d 90, 94 (1987), aff'd per curiam, 323 N.C. 362, 372 S.E.2d 559 (1988). Plaintiff alleged no genuine issue of material fact that the WSPD failed to follow the terms of the retirement plan as it existed in the Winston-Salem Code of Ordinances when plaintiff became vested.
Plaintiff ultimately argues, based on this Court's decision in Hogan v. City of Winston-Salem, 121 N.C.App. 414, 466 S.E.2d 303, aff'd per curiam, 344 N.C. 728, 477 S.E.2d 150 (1996), that the 20 August 1990 amendment to the Winston-Salem Code of Ordinances gives rise to an impairment of contract claim, where plaintiff was a member of the retirement plan when the Retirement Code was amended but whose rights had not vested. This Court addressed this issue in Schimmeck, stating where the plaintiff did not have five years of service at the time of the amendment to the Retirement Code, there was no contractual obligation and no impairment of contract. Schimmeck, 130 N.C.App. at 475, 502 S.E.2d at 912. Accordingly, plaintiff in this case cannot make a claim for impairment of contract based on the 1990 amendment to the Retirement Code.
Judges McGEE and STEPHENS concur.