This is one of the semiconductor types. This part name is SW-18010P.
This product has Shake Switch functions.
Manufacturers of product is Mobicon.
Image and pinout :
SW-18010P PDF Datasheet
Some of the text files within the PDF file
1. The switch is in the open state when the
2. non-directional: any angle can trigger work.
3. models are not P with a fully sealed package, waterproof dust-proof.
4. trigger sensitivity according to the circuit need to choose the appropriate sensitivity switch. [ … ]
Please refer to the file for details.