You thought you could figure this one out all by yourself, right? You can read Code of Civil Procedure section 1032. It's written in English (sort of). You know what a "prevailing party" is without some Supreme Court telling you what it means. But this is law, and when we are talking about the law, you can guarantee that somebody figures out how to find that exception that threads the needle. Thus, we have DeSaulles v. Community Hospital of the Monterey Peninsula (March 10, 2016), in which the Supreme Court had to determine whether a plaintiff who voluntarily dismisses an action after obtaining a monetary settlement on a few of the claims remaining in the case is the "prevailing party" for purposes of section 1032.
The Court of Appeal held that the plaintiff was a prevailing party because he received a net monetary recovery as consideration for his dismissal. In so holding, the Court of Appeal disapproved of Chinn v. KMR Property Management, 166 Cal. App. 4th 17 (2008), which held that settlements were not net monetary recoveries. The Supreme Court affirmed. In affirming, the Supreme Court also did everyone a favor by saying that the presumption of section 1032 could be altered by agreement of the settling parties. Regardless, it's a good thing the Supreme Court held as it did; given the sorry state of our court funding, we don't need more issues complicating settlement discussions.