updateFinding method

Future<void> updateFinding({
  1. required String agentSpaceId,
  2. required String findingId,
  3. String? attackScript,
  4. String? customerNote,
  5. String? description,
  6. String? name,
  7. String? reasoning,
  8. RiskLevel? riskLevel,
  9. String? riskScore,
  10. String? riskType,
  11. FindingStatus? status,
})

Updates the status or risk level of a security finding.

Parameter agentSpaceId : The unique identifier of the agent space that contains the finding.

Parameter findingId : The unique identifier of the finding to update.

Parameter attackScript : The updated attack script for the finding.

Parameter customerNote : A customer-provided note on the finding.

Parameter description : The updated description for the finding.

Parameter name : The updated name for the finding.

Parameter reasoning : The updated reasoning for the finding.

Parameter riskLevel : The updated risk level for the finding.

Parameter riskScore : The updated numerical risk score for the finding.

Parameter riskType : The updated risk type for the finding.

Parameter status : The updated status for the finding.

Implementation

Future<void> updateFinding({
  required String agentSpaceId,
  required String findingId,
  String? attackScript,
  String? customerNote,
  String? description,
  String? name,
  String? reasoning,
  RiskLevel? riskLevel,
  String? riskScore,
  String? riskType,
  FindingStatus? status,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    'findingId': findingId,
    if (attackScript != null) 'attackScript': attackScript,
    if (customerNote != null) 'customerNote': customerNote,
    if (description != null) 'description': description,
    if (name != null) 'name': name,
    if (reasoning != null) 'reasoning': reasoning,
    if (riskLevel != null) 'riskLevel': riskLevel.value,
    if (riskScore != null) 'riskScore': riskScore,
    if (riskType != null) 'riskType': riskType,
    if (status != null) 'status': status.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/UpdateFinding',
    exceptionFnMap: _exceptionFns,
  );
}