| @@ 2620-2638 (lines=19) @@ | ||
| 2617 | ||
| 2618 | return self._send_xml_command(cmd) |
|
| 2619 | ||
| 2620 | def delete_target( |
|
| 2621 | self, target_id: str, *, ultimate: Optional[bool] = False |
|
| 2622 | ) -> Any: |
|
| 2623 | """Deletes an existing target |
|
| 2624 | ||
| 2625 | Arguments: |
|
| 2626 | target_id: UUID of the target to be deleted. |
|
| 2627 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 2628 | """ |
|
| 2629 | if not target_id: |
|
| 2630 | raise RequiredArgument( |
|
| 2631 | function=self.delete_target.__name__, argument='target_id' |
|
| 2632 | ) |
|
| 2633 | ||
| 2634 | cmd = XmlCommand("delete_target") |
|
| 2635 | cmd.set_attribute("target_id", target_id) |
|
| 2636 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 2637 | ||
| 2638 | return self._send_xml_command(cmd) |
|
| 2639 | ||
| 2640 | def delete_task( |
|
| 2641 | self, task_id: str, *, ultimate: Optional[bool] = False |
|
| @@ 4529-4547 (lines=19) @@ | ||
| 4526 | ||
| 4527 | return self._send_xml_command(cmd) |
|
| 4528 | ||
| 4529 | def delete_target( |
|
| 4530 | self, target_id: str, *, ultimate: Optional[bool] = False |
|
| 4531 | ) -> Any: |
|
| 4532 | """Deletes an existing target |
|
| 4533 | ||
| 4534 | Arguments: |
|
| 4535 | target_id: UUID of the target to be deleted. |
|
| 4536 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 4537 | """ |
|
| 4538 | if not target_id: |
|
| 4539 | raise RequiredArgument( |
|
| 4540 | function=self.delete_target.__name__, argument='target_id' |
|
| 4541 | ) |
|
| 4542 | ||
| 4543 | cmd = XmlCommand("delete_target") |
|
| 4544 | cmd.set_attribute("target_id", target_id) |
|
| 4545 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 4546 | ||
| 4547 | return self._send_xml_command(cmd) |
|
| 4548 | ||
| 4549 | def delete_task( |
|
| 4550 | self, task_id: str, *, ultimate: Optional[bool] = False |
|