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("actions", self.actions)
        writer.write_object_value("conditions", self.conditions)
        writer.write_str_value("displayName", self.display_name)
        writer.write_object_value("exceptions", self.exceptions)
        writer.write_bool_value("hasError", self.has_error)
        writer.write_bool_value("isEnabled", self.is_enabled)
        writer.write_bool_value("isReadOnly", self.is_read_only)
        writer.write_int_value("sequence", self.sequence)

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