rejectPredictions method

Future<RejectPredictionsOutput> rejectPredictions({
  1. required String domainIdentifier,
  2. required String identifier,
  3. String? clientToken,
  4. List<RejectChoice>? rejectChoices,
  5. RejectRule? rejectRule,
  6. String? revision,
})

Rejects automatically generated business-friendly metadata for your Amazon DataZone assets.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon DataZone domain.

Parameter identifier : The identifier of the prediction.

Parameter clientToken : A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Parameter rejectChoices : Specifies the prediction (aka, the automatically generated piece of metadata) and the target (for example, a column name) that can be rejected.

Parameter rejectRule : Specifies the rule (or the conditions) under which a prediction can be rejected.

Parameter revision : The revision that is to be made to the asset.

Implementation

Future<RejectPredictionsOutput> rejectPredictions({
  required String domainIdentifier,
  required String identifier,
  String? clientToken,
  List<RejectChoice>? rejectChoices,
  RejectRule? rejectRule,
  String? revision,
}) async {
  final $query = <String, List<String>>{
    if (revision != null) 'revision': [revision],
  };
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (rejectChoices != null) 'rejectChoices': rejectChoices,
    if (rejectRule != null) 'rejectRule': rejectRule,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/assets/${Uri.encodeComponent(identifier)}/reject-predictions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return RejectPredictionsOutput.fromJson(response);
}