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_object_value("onAttributeCollection", self.on_attribute_collection)
        writer.write_object_value("onAttributeCollectionStart", self.on_attribute_collection_start)
        writer.write_object_value("onAttributeCollectionSubmit", self.on_attribute_collection_submit)
        writer.write_object_value("onAuthenticationMethodLoadStart", self.on_authentication_method_load_start)
        writer.write_object_value("onInteractiveAuthFlowStart", self.on_interactive_auth_flow_start)
        writer.write_object_value("onUserCreateStart", self.on_user_create_start)

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