Automatic power selection circuit design and part selection
AO3400A is a N-channel MOSFET while the DMG3415U shown in the diagram is a P-channel device. So, no, the AO3400A is not suitable as a substitute.
I don't see any problem with using the B5819W diode as a substitute. Given it's function in the circuit, it should do fine.
The AO3401A given in the comments is indeed a P-channel device and looks like it is suitable. It has a bit higher ON resistance at around 5Vgs, so it'll dissipate a bit more power but nothing significant.