Clearance around electrical panel and solar boxes?


Contractor here, looking for some help. Local authorities aren’t giving me the answers I’m looking for.
The homeowner would like this deck re-built and brought clear over to the wall on the corner. I am not sure if we can build the deck underneath all this electrical.
There would about 2" of clearance below that lowest grey box (which I believe is for the solar supply).
I’m in California
Would appreciate any insight in to this
Thank you