listAdapters method

Future<ListAdaptersResponse> listAdapters({
  1. DateTime? afterCreationTime,
  2. DateTime? beforeCreationTime,
  3. int? maxResults,
  4. String? nextToken,
})

Lists all adapters that match the specified filtration criteria.

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidParameterException. May throw ProvisionedThroughputExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter afterCreationTime : Specifies the lower bound for the ListAdapters operation. Ensures ListAdapters returns only adapters created after the specified creation time.

Parameter beforeCreationTime : Specifies the upper bound for the ListAdapters operation. Ensures ListAdapters returns only adapters created before the specified creation time.

Parameter maxResults : The maximum number of results to return when listing adapters.

Parameter nextToken : Identifies the next page of results to return when listing adapters.

Implementation

Future<ListAdaptersResponse> listAdapters({
  DateTime? afterCreationTime,
  DateTime? beforeCreationTime,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Textract.ListAdapters'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (afterCreationTime != null)
        'AfterCreationTime': unixTimestampToJson(afterCreationTime),
      if (beforeCreationTime != null)
        'BeforeCreationTime': unixTimestampToJson(beforeCreationTime),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListAdaptersResponse.fromJson(jsonResponse.body);
}