MODE-2294: Make server side classes serializable

Adds serialization to the server side classes.
Is there any reason to import this? This import appears to be unused.