toolsOzoneSafelinkUpdateRule function

Future<XRPCResponse<Event>> toolsOzoneSafelinkUpdateRule({
  1. required String url,
  2. required PatternType pattern,
  3. required ActionType action,
  4. required ReasonType reason,
  5. String? comment,
  6. String? createdBy,
  7. required ServiceContext $ctx,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

Update an existing URL safety rule

Implementation

Future<XRPCResponse<Event>> toolsOzoneSafelinkUpdateRule({
  required String url,
  required PatternType pattern,
  required ActionType action,
  required ReasonType reason,
  String? comment,
  String? createdBy,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneSafelinkUpdateRule,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'url': url,
    'pattern': pattern.toJson(),
    'action': action.toJson(),
    'reason': reason.toJson(),
    if (comment != null) 'comment': comment,
    if (createdBy != null) 'createdBy': createdBy,
  },
  to: const EventConverter().fromJson,
);