lex_param_helper.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
18 #include <aws/core/utils/logging/LogMacros.h>
19 
20 namespace Aws
21 {
22 namespace Lex
23 {
24 
26  const Client::ParameterReaderInterface & parameter_interface,
27  LexConfiguration & lex_configuration)
28 {
29  bool is_invalid = false;
30  is_invalid |= static_cast<bool>(parameter_interface.ReadParam(
31  lex_configuration.kBotAliasKey_, lex_configuration.bot_alias));
32  is_invalid |= static_cast<bool>(parameter_interface.ReadParam(
33  lex_configuration.kBotNameKey_, lex_configuration.bot_name));
34  is_invalid |= static_cast<bool>(parameter_interface.ReadParam(
35  lex_configuration.kUserIdKey_, lex_configuration.user_id));
36  if (is_invalid) {
37  AWS_LOG_WARN(__func__, "Lex configuration not fully specified");
39  }
40  return SUCCESS;
41 }
42 
43 } // namespace Lex
44 } // namespace Aws
virtual AwsError ReadParam(const ParameterPath &param_path, std::vector< std::string > &out) const =0
ErrorCode LoadLexParameters(const Client::ParameterReaderInterface &parameter_interface, LexConfiguration &lex_configuration)


lex_common
Author(s): AWS RoboMaker
autogenerated on Sat Mar 6 2021 03:43:24