listCases method

Future<ListCasesResponse> listCases({
  1. int? maxResults,
  2. String? nextToken,
})

Lists all cases the requester has access to.

Parameter maxResults : Optional element for ListCases to limit the number of responses.

Parameter nextToken : An optional string that, if supplied, must be copied from the output of a previous call to ListCases. When provided in this manner, the API fetches the next page of results.

Implementation

Future<ListCasesResponse> listCases({
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/list-cases',
    exceptionFnMap: _exceptionFns,
  );
  return ListCasesResponse.fromJson(response);
}