SAN DIEGO — Zack Cozart has had surgery on his left shoulder twice in two years.

The San Francisco Giants will wait patiently for the 2017 All-Star to heal.

They bolstered their infield Tuesday by acquiring Cozart and prized prospect in Will Wilson in a trade with the Los Angeles Angels for a player to be named or cash.

San Francisco also announced Tuesday it signed right-hander Kevin Gausman to a $9 million, one-year contract.

Cozart, if healthy after missing significant time in 2019 with shoulder and neck injuries, can play second or provide versatility behind third baseman Evan Longoria. The Giants are taking on Cozart's salary for next year of $12,666,667. Cozart is eligible for free agency after 2020.

“He's got a ways to go in rehab," president of baseball operations Farhan Zaidi said. “He's had a couple of shoulder surgeries. He's swinging the bat, but he's got a ways to go and we're obviously going to do everything we can to help him get back on the field.

"All-Star in 2017, his last full season, so he can certainly help us if he's healthy.”

Still, Zaidi said Cozart could be ready by opening day “if things go well."

Wilson was the Angels' first-round draft pick this year at No. 15 overall. The middle infielder batted .275 in rookie ball.

One of the top priorities for Zaidi was finding a starting pitcher during this week's winter meetings, so Gausman fills a need. The team met with representatives for left-hander Madison Bumgarner, but there were few signs that a reunion was imminent. Zaidi declined to offer any details regarding the session but said the club is still having discussions on adding another starter.

Right-handers Johnny Cueto and Jeff Samardzija are projected to be at the front of the rotation, though both have dealt with injuries in recent years.

Gausman, non-tendered by Cincinnati last week, is someone the Giants tried to acquire last season. He can earn an additional $1 million in performance bonuses, $250,000 each for 18, 22, 26 and 30 starts.

Gausman went 3-9 with a 5.72 ERA making 31 appearances and 17 starts between the Braves and Reds last season, 16 of those starts for the Braves before being claimed off waivers by Cincinnati.

The Giants haven't determined where in the minors Wilson will start in 2020.

“For us, we're trying to balance our competitive aspirations in 2020 with some of our long-term goals, so even today kind of getting these deals done together and having a guy who's going to go into our rotation next year and also making this trade, hopefully Cozart can return to health and can certainly help us and Will Wilson we view as really a long-term piece," Zaidi said.

Angels general manager Billy Eppler said he made the trade mostly because of the emergence in infielders David Fletcher, Luis Rengifo and Tommy La Stella.

“That gave us some confidence to explore opening up more resources for other things if they become available,” Eppler said. “We are exploring a lot of things in the trade market and the free agent market and when you want to entertain a lot of different permutations, having more resources available is a little bit more fun to play with."

He said it was "very difficult" to part with Wilson.

“I credit the Giants for being opportunistic," Eppler said. “I was a little surprised more teams didn't jump into an opportunity.”