Serialize, validate and save pin types