contestada

What is the function of the noun phrase "the last slice of pizza" in this sentence? I gave the last slice of pizza to my best friend. predicate nominative appositive direct object subject