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("completedDateTime", self.completed_date_time)
        writer.write_int_value("completionPercentage", self.completion_percentage)
        writer.write_str_value("externalcourseActivityId", self.externalcourse_activity_id)
        writer.write_str_value("learnerUserId", self.learner_user_id)
        writer.write_str_value("learningContentId", self.learning_content_id)
        writer.write_str_value("learningProviderId", self.learning_provider_id)
        writer.write_enum_value("status", self.status)

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