getBuiltinSlotTypes method

Future<GetBuiltinSlotTypesResponse> getBuiltinSlotTypes({
  1. Locale? locale,
  2. int? maxResults,
  3. String? nextToken,
  4. String? signatureContains,
})

Gets a list of built-in slot types that meet the specified criteria.

For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit.

This operation requires permission for the lex:GetBuiltInSlotTypes action.

May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.

Parameter locale : A list of locales that the slot type supports.

Parameter maxResults : The maximum number of slot types to return in the response. The default is 10.

Parameter nextToken : A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of slot types, specify the pagination token in the next request.

Parameter signatureContains : Substring to match in built-in slot type signatures. A slot type will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."

Implementation

Future<GetBuiltinSlotTypesResponse> getBuiltinSlotTypes({
  Locale? locale,
  int? maxResults,
  String? nextToken,
  String? signatureContains,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (locale != null) 'locale': [locale.toValue()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (signatureContains != null) 'signatureContains': [signatureContains],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/builtins/slottypes/',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetBuiltinSlotTypesResponse.fromJson(response);
}