searchAssociatedTranscripts method

Future<SearchAssociatedTranscriptsResponse> searchAssociatedTranscripts({
  1. required String botId,
  2. required String botRecommendationId,
  3. required String botVersion,
  4. required List<AssociatedTranscriptFilter> filters,
  5. required String localeId,
  6. int? maxResults,
  7. int? nextIndex,
  8. SearchOrder? searchOrder,
})

Search for associated transcripts that meet the specified criteria.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter botId : The unique identifier of the bot associated with the transcripts that you are searching.

Parameter botRecommendationId : The unique identifier of the bot recommendation associated with the transcripts to search.

Parameter botVersion : The version of the bot containing the transcripts that you are searching.

Parameter filters : A list of filter objects.

Parameter localeId : The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages

Parameter maxResults : The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

Parameter nextIndex : If the response from the SearchAssociatedTranscriptsRequest operation contains more results than specified in the maxResults parameter, an index is returned in the response. Use that index in the nextIndex parameter to return the next page of results.

Parameter searchOrder : How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.

Implementation

Future<SearchAssociatedTranscriptsResponse> searchAssociatedTranscripts({
  required String botId,
  required String botRecommendationId,
  required String botVersion,
  required List<AssociatedTranscriptFilter> filters,
  required String localeId,
  int? maxResults,
  int? nextIndex,
  SearchOrder? searchOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  _s.validateNumRange(
    'nextIndex',
    nextIndex,
    0,
    10000000,
  );
  final $payload = <String, dynamic>{
    'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextIndex != null) 'nextIndex': nextIndex,
    if (searchOrder != null) 'searchOrder': searchOrder.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}/botrecommendations/${Uri.encodeComponent(botRecommendationId)}/associatedtranscripts',
    exceptionFnMap: _exceptionFns,
  );
  return SearchAssociatedTranscriptsResponse.fromJson(response);
}