Generate SDK by new Generator
This commit is contained in:
@@ -35,13 +35,9 @@ ActivatePerspectiveResult::~ActivatePerspectiveResult()
|
||||
|
||||
void ActivatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ AddSynonymResult::~AddSynonymResult()
|
||||
|
||||
void AddSynonymResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -25,17 +25,6 @@ AppendEntityMemberRequest::AppendEntityMemberRequest() :
|
||||
AppendEntityMemberRequest::~AppendEntityMemberRequest()
|
||||
{}
|
||||
|
||||
std::string AppendEntityMemberRequest::getMember()const
|
||||
{
|
||||
return member_;
|
||||
}
|
||||
|
||||
void AppendEntityMemberRequest::setMember(const std::string& member)
|
||||
{
|
||||
member_ = member;
|
||||
setCoreParameter("Member", member);
|
||||
}
|
||||
|
||||
long AppendEntityMemberRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
@@ -47,6 +36,17 @@ void AppendEntityMemberRequest::setEntityId(long entityId)
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
std::string AppendEntityMemberRequest::getMember()const
|
||||
{
|
||||
return member_;
|
||||
}
|
||||
|
||||
void AppendEntityMemberRequest::setMember(const std::string& member)
|
||||
{
|
||||
member_ = member;
|
||||
setCoreParameter("Member", member);
|
||||
}
|
||||
|
||||
std::string AppendEntityMemberRequest::getApplyType()const
|
||||
{
|
||||
return applyType_;
|
||||
|
||||
@@ -35,13 +35,9 @@ AppendEntityMemberResult::~AppendEntityMemberResult()
|
||||
|
||||
void AppendEntityMemberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
@@ -25,6 +25,39 @@ ChatRequest::ChatRequest() :
|
||||
ChatRequest::~ChatRequest()
|
||||
{}
|
||||
|
||||
bool ChatRequest::getRecommend()const
|
||||
{
|
||||
return recommend_;
|
||||
}
|
||||
|
||||
void ChatRequest::setRecommend(bool recommend)
|
||||
{
|
||||
recommend_ = recommend;
|
||||
setCoreParameter("Recommend", recommend ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ChatRequest::getSessionId()const
|
||||
{
|
||||
return sessionId_;
|
||||
}
|
||||
|
||||
void ChatRequest::setSessionId(const std::string& sessionId)
|
||||
{
|
||||
sessionId_ = sessionId;
|
||||
setCoreParameter("SessionId", sessionId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ChatRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
@@ -81,28 +114,6 @@ void ChatRequest::setPerspective(const std::vector<std::string>& perspective)
|
||||
setCoreParameter("Perspective."+ std::to_string(i), perspective.at(i));
|
||||
}
|
||||
|
||||
bool ChatRequest::getRecommend()const
|
||||
{
|
||||
return recommend_;
|
||||
}
|
||||
|
||||
void ChatRequest::setRecommend(bool recommend)
|
||||
{
|
||||
recommend_ = recommend;
|
||||
setCoreParameter("Recommend", recommend ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ChatRequest::getSessionId()const
|
||||
{
|
||||
return sessionId_;
|
||||
}
|
||||
|
||||
void ChatRequest::setSessionId(const std::string& sessionId)
|
||||
{
|
||||
sessionId_ = sessionId;
|
||||
setCoreParameter("SessionId", sessionId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getTag()const
|
||||
{
|
||||
return tag_;
|
||||
@@ -125,14 +136,3 @@ void ChatRequest::setUtterance(const std::string& utterance)
|
||||
setCoreParameter("Utterance", utterance);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ChatRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ ChatResult::~ChatResult()
|
||||
|
||||
void ChatResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMessages = value["Messages"]["Message"];
|
||||
for (auto value : allMessages)
|
||||
@@ -72,6 +68,8 @@ void ChatResult::parse(const std::string &payload)
|
||||
messagesObject.text.answerSource = textNode["AnswerSource"].asString();
|
||||
if(!textNode["MetaData"].isNull())
|
||||
messagesObject.text.metaData = textNode["MetaData"].asString();
|
||||
if(!textNode["IntentName"].isNull())
|
||||
messagesObject.text.intentName = textNode["IntentName"].asString();
|
||||
auto knowledgeNode = value["Knowledge"];
|
||||
if(!knowledgeNode["Id"].isNull())
|
||||
messagesObject.knowledge.id = knowledgeNode["Id"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateCategoryResult::~CreateCategoryResult()
|
||||
|
||||
void CreateCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CategoryId"].isNull())
|
||||
categoryId_ = std::stol(value["CategoryId"].asString());
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateCoreWordResult::~CreateCoreWordResult()
|
||||
|
||||
void CreateCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CoreWordCode"].isNull())
|
||||
coreWordCode_ = value["CoreWordCode"].asString();
|
||||
|
||||
@@ -25,17 +25,6 @@ CreateDialogRequest::CreateDialogRequest() :
|
||||
CreateDialogRequest::~CreateDialogRequest()
|
||||
{}
|
||||
|
||||
std::string CreateDialogRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CreateDialogRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string CreateDialogRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
@@ -58,3 +47,14 @@ void CreateDialogRequest::setDialogName(const std::string& dialogName)
|
||||
setCoreParameter("DialogName", dialogName);
|
||||
}
|
||||
|
||||
std::string CreateDialogRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CreateDialogRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateDialogResult::~CreateDialogResult()
|
||||
|
||||
void CreateDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = value["DialogId"].asString();
|
||||
|
||||
@@ -25,6 +25,28 @@ CreateEntityRequest::CreateEntityRequest() :
|
||||
CreateEntityRequest::~CreateEntityRequest()
|
||||
{}
|
||||
|
||||
std::string CreateEntityRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = entityName;
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
long CreateEntityRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
std::string CreateEntityRequest::getRegex()const
|
||||
{
|
||||
return regex_;
|
||||
@@ -58,25 +80,3 @@ void CreateEntityRequest::setMembers(const std::string& members)
|
||||
setCoreParameter("Members", members);
|
||||
}
|
||||
|
||||
std::string CreateEntityRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = entityName;
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
long CreateEntityRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateEntityResult::~CreateEntityResult()
|
||||
|
||||
void CreateEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateIntentResult::~CreateIntentResult()
|
||||
|
||||
void CreateIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ CreateKnowledgeResult::~CreateKnowledgeResult()
|
||||
|
||||
void CreateKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgeId_ = std::stol(value["KnowledgeId"].asString());
|
||||
|
||||
@@ -35,13 +35,9 @@ CreatePerspectiveResult::~CreatePerspectiveResult()
|
||||
|
||||
void CreatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["PerspectiveId"].isNull())
|
||||
perspectiveId_ = value["PerspectiveId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteCategoryResult::~DeleteCategoryResult()
|
||||
|
||||
void DeleteCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteCoreWordResult::~DeleteCoreWordResult()
|
||||
|
||||
void DeleteCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteDialogResult::~DeleteDialogResult()
|
||||
|
||||
void DeleteDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteEntityResult::~DeleteEntityResult()
|
||||
|
||||
void DeleteEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteIntentResult::~DeleteIntentResult()
|
||||
|
||||
void DeleteIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ DeleteKnowledgeResult::~DeleteKnowledgeResult()
|
||||
|
||||
void DeleteKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeCategoryResult::~DescribeCategoryResult()
|
||||
|
||||
void DescribeCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ParentCategoryId"].isNull())
|
||||
parentCategoryId_ = std::stol(value["ParentCategoryId"].asString());
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeCoreWordResult::~DescribeCoreWordResult()
|
||||
|
||||
void DescribeCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSynonyms = value["Synonyms"]["Synonym"];
|
||||
for (const auto &item : allSynonyms)
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeDialogFlowResult::~DescribeDialogFlowResult()
|
||||
|
||||
void DescribeDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto moduleDefinitionNode = value["ModuleDefinition"];
|
||||
auto allNodes = value["Nodes"]["NodesItem"];
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeDialogResult::~DescribeDialogResult()
|
||||
|
||||
void DescribeDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = std::stol(value["DialogId"].asString());
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeEntitiesResult::~DescribeEntitiesResult()
|
||||
|
||||
void DescribeEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMembers = value["Members"]["MembersItem"];
|
||||
for (auto value : allMembers)
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeIntentResult::~DescribeIntentResult()
|
||||
|
||||
void DescribeIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRuleCheck = value["RuleCheck"]["RuleCheckItem"];
|
||||
for (auto value : allRuleCheck)
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribeKnowledgeResult::~DescribeKnowledgeResult()
|
||||
|
||||
void DescribeKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allOutlines = value["Outlines"]["Outline"];
|
||||
for (auto value : allOutlines)
|
||||
|
||||
@@ -35,13 +35,9 @@ DescribePerspectiveResult::~DescribePerspectiveResult()
|
||||
|
||||
void DescribePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ DisableDialogFlowResult::~DisableDialogFlowResult()
|
||||
|
||||
void DisableDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ DisableKnowledgeResult::~DisableKnowledgeResult()
|
||||
|
||||
void DisableKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ FeedbackResult::~FeedbackResult()
|
||||
|
||||
void FeedbackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ MoveKnowledgeCategoryResult::~MoveKnowledgeCategoryResult()
|
||||
|
||||
void MoveKnowledgeCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ PublishDialogFlowResult::~PublishDialogFlowResult()
|
||||
|
||||
void PublishDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ PublishKnowledgeResult::~PublishKnowledgeResult()
|
||||
|
||||
void PublishKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryCategoriesResult::~QueryCategoriesResult()
|
||||
|
||||
void QueryCategoriesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCategories = value["Categories"]["Category"];
|
||||
for (auto value : allCategories)
|
||||
|
||||
@@ -25,6 +25,17 @@ QueryCoreWordsRequest::QueryCoreWordsRequest() :
|
||||
QueryCoreWordsRequest::~QueryCoreWordsRequest()
|
||||
{}
|
||||
|
||||
int QueryCoreWordsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string QueryCoreWordsRequest::getSynonym()const
|
||||
{
|
||||
return synonym_;
|
||||
@@ -58,14 +69,3 @@ void QueryCoreWordsRequest::setCoreWordName(const std::string& coreWordName)
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
int QueryCoreWordsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryCoreWordsResult::~QueryCoreWordsResult()
|
||||
|
||||
void QueryCoreWordsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCoreWords = value["CoreWords"]["CoreWord"];
|
||||
for (auto value : allCoreWords)
|
||||
|
||||
@@ -25,28 +25,6 @@ QueryDialogsRequest::QueryDialogsRequest() :
|
||||
QueryDialogsRequest::~QueryDialogsRequest()
|
||||
{}
|
||||
|
||||
std::string QueryDialogsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int QueryDialogsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryDialogsRequest::getDialogName()const
|
||||
{
|
||||
return dialogName_;
|
||||
@@ -69,3 +47,25 @@ void QueryDialogsRequest::setPageNumber(int pageNumber)
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string QueryDialogsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int QueryDialogsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryDialogsResult::~QueryDialogsResult()
|
||||
|
||||
void QueryDialogsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDialogs = value["Dialogs"]["Dialog"];
|
||||
for (auto value : allDialogs)
|
||||
|
||||
@@ -36,17 +36,6 @@ void QueryEntitiesRequest::setEntityName(const std::string& entityName)
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
int QueryEntitiesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryEntitiesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long QueryEntitiesRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
@@ -69,3 +58,14 @@ void QueryEntitiesRequest::setPageNumber(int pageNumber)
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int QueryEntitiesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryEntitiesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryEntitiesResult::~QueryEntitiesResult()
|
||||
|
||||
void QueryEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEntities = value["Entities"]["Entity"];
|
||||
for (auto value : allEntities)
|
||||
|
||||
@@ -25,28 +25,6 @@ QueryIntentsRequest::QueryIntentsRequest() :
|
||||
QueryIntentsRequest::~QueryIntentsRequest()
|
||||
{}
|
||||
|
||||
std::string QueryIntentsRequest::getIntentName()const
|
||||
{
|
||||
return intentName_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setIntentName(const std::string& intentName)
|
||||
{
|
||||
intentName_ = intentName;
|
||||
setCoreParameter("IntentName", intentName);
|
||||
}
|
||||
|
||||
int QueryIntentsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long QueryIntentsRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
@@ -69,3 +47,25 @@ void QueryIntentsRequest::setPageNumber(int pageNumber)
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string QueryIntentsRequest::getIntentName()const
|
||||
{
|
||||
return intentName_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setIntentName(const std::string& intentName)
|
||||
{
|
||||
intentName_ = intentName;
|
||||
setCoreParameter("IntentName", intentName);
|
||||
}
|
||||
|
||||
int QueryIntentsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryIntentsResult::~QueryIntentsResult()
|
||||
|
||||
void QueryIntentsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allIntents = value["Intents"]["Intent"];
|
||||
for (auto value : allIntents)
|
||||
|
||||
@@ -25,28 +25,6 @@ QueryKnowledgesRequest::QueryKnowledgesRequest() :
|
||||
QueryKnowledgesRequest::~QueryKnowledgesRequest()
|
||||
{}
|
||||
|
||||
int QueryKnowledgesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryKnowledgesRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
std::string QueryKnowledgesRequest::getKnowledgeTitle()const
|
||||
{
|
||||
return knowledgeTitle_;
|
||||
@@ -69,6 +47,28 @@ void QueryKnowledgesRequest::setPageNumber(int pageNumber)
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int QueryKnowledgesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryKnowledgesRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
long QueryKnowledgesRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryKnowledgesResult::~QueryKnowledgesResult()
|
||||
|
||||
void QueryKnowledgesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKnowledges = value["Knowledges"]["Knowledge"];
|
||||
for (auto value : allKnowledges)
|
||||
|
||||
@@ -35,13 +35,9 @@ QueryPerspectivesResult::~QueryPerspectivesResult()
|
||||
|
||||
void QueryPerspectivesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPerspectives = value["Perspectives"]["Perspective"];
|
||||
for (auto value : allPerspectives)
|
||||
|
||||
@@ -35,13 +35,9 @@ QuerySystemEntitiesResult::~QuerySystemEntitiesResult()
|
||||
|
||||
void QuerySystemEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSystemEntities = value["SystemEntities"]["Entity"];
|
||||
for (auto value : allSystemEntities)
|
||||
|
||||
@@ -25,6 +25,17 @@ RemoveEntityMemberRequest::RemoveEntityMemberRequest() :
|
||||
RemoveEntityMemberRequest::~RemoveEntityMemberRequest()
|
||||
{}
|
||||
|
||||
long RemoveEntityMemberRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void RemoveEntityMemberRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
std::string RemoveEntityMemberRequest::getRemoveType()const
|
||||
{
|
||||
return removeType_;
|
||||
@@ -47,14 +58,3 @@ void RemoveEntityMemberRequest::setMember(const std::string& member)
|
||||
setCoreParameter("Member", member);
|
||||
}
|
||||
|
||||
long RemoveEntityMemberRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void RemoveEntityMemberRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ RemoveEntityMemberResult::~RemoveEntityMemberResult()
|
||||
|
||||
void RemoveEntityMemberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ RemoveSynonymResult::~RemoveSynonymResult()
|
||||
|
||||
void RemoveSynonymResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ TestDialogFlowResult::~TestDialogFlowResult()
|
||||
|
||||
void TestDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateCategoryResult::~UpdateCategoryResult()
|
||||
|
||||
void UpdateCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateCoreWordResult::~UpdateCoreWordResult()
|
||||
|
||||
void UpdateCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateDialogFlowResult::~UpdateDialogFlowResult()
|
||||
|
||||
void UpdateDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateDialogResult::~UpdateDialogResult()
|
||||
|
||||
void UpdateDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,28 @@ UpdateEntityRequest::UpdateEntityRequest() :
|
||||
UpdateEntityRequest::~UpdateEntityRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateEntityRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = entityName;
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
long UpdateEntityRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
std::string UpdateEntityRequest::getRegex()const
|
||||
{
|
||||
return regex_;
|
||||
@@ -58,25 +80,3 @@ void UpdateEntityRequest::setMembers(const std::string& members)
|
||||
setCoreParameter("Members", members);
|
||||
}
|
||||
|
||||
std::string UpdateEntityRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = entityName;
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
long UpdateEntityRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateEntityResult::~UpdateEntityResult()
|
||||
|
||||
void UpdateEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateIntentResult::~UpdateIntentResult()
|
||||
|
||||
void UpdateIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdateKnowledgeResult::~UpdateKnowledgeResult()
|
||||
|
||||
void UpdateKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgeId_ = std::stol(value["KnowledgeId"].asString());
|
||||
|
||||
@@ -35,13 +35,9 @@ UpdatePerspectiveResult::~UpdatePerspectiveResult()
|
||||
|
||||
void UpdatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user