inline ErrorCode BuildLexInteractor()

in lex_common/include/lex_common/lex_common.h [185:201]


inline ErrorCode BuildLexInteractor(
  std::shared_ptr<Client::ParameterReaderInterface> params,
  LexInteractor & lex_interactor)
{
  ErrorCode result;
  auto lex_configuration = std::make_shared<LexConfiguration>();
  result = LoadLexParameters(*params, *lex_configuration);
  if (result != SUCCESS) {
    return result;
  }
  Client::ClientConfigurationProvider configuration_provider(params);
  auto lex_runtime_client = Aws::MakeShared<Aws::LexRuntimeService::LexRuntimeServiceClient>(
    kAllocationTag, configuration_provider.GetClientConfiguration());
  lex_interactor = LexInteractor();
  lex_interactor.ConfigureAwsLex(lex_configuration, lex_runtime_client);
  return result;
}