listResolvers method

Future<ListResolversResponse> listResolvers({
  1. required String apiId,
  2. required String typeName,
  3. int? maxResults,
  4. String? nextToken,
})

Lists the resolvers for a given API and type.

May throw BadRequestException. May throw NotFoundException. May throw UnauthorizedException. May throw InternalFailureException.

Parameter apiId : The API ID.

Parameter typeName : The type name.

Parameter maxResults : The maximum number of results you want the request to return.

Parameter nextToken : An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Implementation

Future<ListResolversResponse> listResolvers({
  required String apiId,
  required String typeName,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(apiId, 'apiId');
  ArgumentError.checkNotNull(typeName, 'typeName');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    25,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    65536,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/apis/${Uri.encodeComponent(apiId)}/types/${Uri.encodeComponent(typeName)}/resolvers',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListResolversResponse.fromJson(response);
}