public override void WriteTo(pb::ICodedOutputStream output) { int size = SerializedSize; string[] field_names = _msgBuyItemFieldNames; if (hasItemName) { output.WriteString(1, field_names[2], ItemName); } if (hasItemId) { output.WriteInt64(2, field_names[1], ItemId); } if (ids_.Count > 0) { output.WritePackedInt32Array(3, field_names[0], idsMemoizedSerializedSize, ids_); } }