listEventTypes method Null safety

Future<ListEventTypesResult> listEventTypes(
  1. {List<ListEventTypesFilter>? filters,
  2. int? maxResults,
  3. String? nextToken}
)

Returns information about the event types available for configuring notifications.

May throw InvalidNextTokenException. May throw ValidationException.

Parameter filters : The filters to use to return information by service or resource type.

Parameter maxResults : A non-negative integer used to limit the number of returned results. The default number is 50. The maximum number of results that can be returned is 100.

Parameter nextToken : An enumeration token that, when provided in a request, returns the next batch of the results.

Implementation

Future<ListEventTypesResult> listEventTypes({
  List<ListEventTypesFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (filters != null) 'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/listEventTypes',
    exceptionFnMap: _exceptionFns,
  );
  return ListEventTypesResult.fromJson(response);
}