getRecommender method

Future<GetRecommenderResponse> getRecommender({
  1. required String domainName,
  2. required String recommenderName,
  3. int? trainingMetricsCount,
})

Retrieves a recommender.

May throw AccessDeniedException. May throw BadRequestException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter domainName : The unique name of the domain.

Parameter recommenderName : The name of the recommender.

Parameter trainingMetricsCount : The number of training metrics to retrieve for the recommender.

Implementation

Future<GetRecommenderResponse> getRecommender({
  required String domainName,
  required String recommenderName,
  int? trainingMetricsCount,
}) async {
  _s.validateNumRange(
    'trainingMetricsCount',
    trainingMetricsCount,
    0,
    5,
  );
  final $query = <String, List<String>>{
    if (trainingMetricsCount != null)
      'training-metrics-count': [trainingMetricsCount.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/domains/${Uri.encodeComponent(domainName)}/recommenders/${Uri.encodeComponent(recommenderName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetRecommenderResponse.fromJson(response);
}