toolsOzoneReportCloseReports function

Future<XRPCResponse<ReportCloseReportsOutput>> toolsOzoneReportCloseReports({
  1. required String subject,
  2. List<String>? reportTypes,
  3. String? internalNote,
  4. bool? isAutomated,
  5. required ServiceContext $ctx,
  6. String? $service,
  7. Map<String, String>? $headers,
  8. Map<String, String>? $unknown,
})

Close all reports on a subject matching the given criteria. Reports whose current status does not permit a transition to closed are skipped silently. Intended for automated flows that resolve reports without taking action on the subject.

Implementation

Future<XRPCResponse<ReportCloseReportsOutput>> toolsOzoneReportCloseReports({
  required String subject,
  List<String>? reportTypes,
  String? internalNote,
  bool? isAutomated,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneReportCloseReports,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'subject': subject,
    if (reportTypes != null) 'reportTypes': reportTypes,
    if (internalNote != null) 'internalNote': internalNote,
    if (isAutomated != null) 'isAutomated': isAutomated,
  },
  to: const ReportCloseReportsOutputConverter().fromJson,
);