As always, miles earned are based on the operating carrier. For all of *A.
As proof of this, on the Swiss earning page (
http://www.united.com/CMS/en-US/mark...spx?ItemId=297), the following appears in the notes below the chart (appears on all partner pages):
The award miles accrued on codeshare flights are based on the operating carrier and their equivalent fare class.
LY is the operating carrier, and isn't partners with UA. No miles on this flight.