getCase method

Future<GetCaseResponse> getCase({
  1. required String caseId,
  2. required String domainId,
  3. required List<FieldIdentifier> fields,
  4. String? nextToken,
})

Returns information about a specific case if it exists.

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

Parameter caseId : A unique identifier of the case.

Parameter domainId : The unique identifier of the Cases domain.

Parameter fields : A list of unique field identifiers.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Implementation

Future<GetCaseResponse> getCase({
  required String caseId,
  required String domainId,
  required List<FieldIdentifier> fields,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    'fields': fields,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/domains/${Uri.encodeComponent(domainId)}/cases/${Uri.encodeComponent(caseId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetCaseResponse.fromJson(response);
}