def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_datetime_value("cancelationDateTime", self.cancelation_date_time)
        writer.write_str_value("email", self.email)
        writer.write_object_value("externalRegistrationInformation", self.external_registration_information)
        writer.write_str_value("firstName", self.first_name)
        writer.write_str_value("lastName", self.last_name)
        writer.write_str_value("preferredLanguage", self.preferred_language)
        writer.write_str_value("preferredTimezone", self.preferred_timezone)
        writer.write_datetime_value("registrationDateTime", self.registration_date_time)
        writer.write_collection_of_object_values("registrationQuestionAnswers", self.registration_question_answers)
        writer.write_collection_of_object_values("sessions", self.sessions)
        writer.write_enum_value("status", self.status)
        writer.write_str_value("userId", self.user_id)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/virtual_event_registration.py