The US state of California has filed a legal lawsuit to block the Trump administration from deploying troops to Los Angeles to control protests over immigration raids.