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_enum_value("category", self.category)
        writer.write_bool_value("continueOnError", self.continue_on_error)
        writer.write_str_value("description", self.description)
        writer.write_str_value("displayName", self.display_name)
        writer.write_collection_of_object_values("parameters", self.parameters)
        writer.write_int_value("version", self.version)

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