| @@ 3773-3797 (lines=25) @@ | ||
| 3770 | ||
| 3771 | return self._send_xml_command(cmd) |
|
| 3772 | ||
| 3773 | def clone_report_format( |
|
| 3774 | self, report_format_id: [Union[str, ReportFormatType]] |
|
| 3775 | ) -> Any: |
|
| 3776 | """Clone a report format from an existing one |
|
| 3777 | ||
| 3778 | Arguments: |
|
| 3779 | report_format_id: UUID of the existing report format |
|
| 3780 | or ReportFormatType (enum) |
|
| 3781 | ||
| 3782 | Returns: |
|
| 3783 | The response. See :py:meth:`send_command` for details. |
|
| 3784 | """ |
|
| 3785 | if not report_format_id: |
|
| 3786 | raise RequiredArgument( |
|
| 3787 | function=self.clone_report_format.__name__, |
|
| 3788 | argument='report_format_id', |
|
| 3789 | ) |
|
| 3790 | ||
| 3791 | cmd = XmlCommand("create_report_format") |
|
| 3792 | ||
| 3793 | if isinstance(report_format_id, ReportFormatType): |
|
| 3794 | report_format_id = report_format_id.value |
|
| 3795 | ||
| 3796 | cmd.add_element("copy", report_format_id) |
|
| 3797 | return self._send_xml_command(cmd) |
|
| 3798 | ||
| 3799 | def import_report_format(self, report_format: str) -> Any: |
|
| 3800 | """Import a report format from XML |
|
| @@ 1358-1382 (lines=25) @@ | ||
| 1355 | ||
| 1356 | return self._send_xml_command(cmd) |
|
| 1357 | ||
| 1358 | def clone_report_format( |
|
| 1359 | self, report_format_id: [Union[str, ReportFormatType]] |
|
| 1360 | ) -> Any: |
|
| 1361 | """Clone a report format from an existing one |
|
| 1362 | ||
| 1363 | Arguments: |
|
| 1364 | report_format_id: UUID of the existing report format |
|
| 1365 | or ReportFormatType (enum) |
|
| 1366 | ||
| 1367 | Returns: |
|
| 1368 | The response. See :py:meth:`send_command` for details. |
|
| 1369 | """ |
|
| 1370 | if not report_format_id: |
|
| 1371 | raise RequiredArgument( |
|
| 1372 | function=self.clone_report_format.__name__, |
|
| 1373 | argument='report_format_id', |
|
| 1374 | ) |
|
| 1375 | ||
| 1376 | cmd = XmlCommand("create_report_format") |
|
| 1377 | ||
| 1378 | if isinstance(report_format_id, ReportFormatType): |
|
| 1379 | report_format_id = report_format_id.value |
|
| 1380 | ||
| 1381 | cmd.add_element("copy", report_format_id) |
|
| 1382 | return self._send_xml_command(cmd) |
|
| 1383 | ||
| 1384 | def import_report_format(self, report_format: str) -> Any: |
|
| 1385 | """Import a report format from XML |
|