38
chatbot/src/model/ActivatePerspectiveRequest.cc
Normal file
38
chatbot/src/model/ActivatePerspectiveRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/ActivatePerspectiveRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::ActivatePerspectiveRequest;
|
||||
|
||||
ActivatePerspectiveRequest::ActivatePerspectiveRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "ActivatePerspective")
|
||||
{}
|
||||
|
||||
ActivatePerspectiveRequest::~ActivatePerspectiveRequest()
|
||||
{}
|
||||
|
||||
std::string ActivatePerspectiveRequest::getPerspectiveId()const
|
||||
{
|
||||
return perspectiveId_;
|
||||
}
|
||||
|
||||
void ActivatePerspectiveRequest::setPerspectiveId(const std::string& perspectiveId)
|
||||
{
|
||||
perspectiveId_ = perspectiveId;
|
||||
setCoreParameter("PerspectiveId", perspectiveId);
|
||||
}
|
||||
|
||||
48
chatbot/src/model/ActivatePerspectiveResult.cc
Normal file
48
chatbot/src/model/ActivatePerspectiveResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/ActivatePerspectiveResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
ActivatePerspectiveResult::ActivatePerspectiveResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ActivatePerspectiveResult::ActivatePerspectiveResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ActivatePerspectiveResult::~ActivatePerspectiveResult()
|
||||
{}
|
||||
|
||||
void ActivatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
chatbot/src/model/AddSynonymRequest.cc
Normal file
49
chatbot/src/model/AddSynonymRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/AddSynonymRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::AddSynonymRequest;
|
||||
|
||||
AddSynonymRequest::AddSynonymRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "AddSynonym")
|
||||
{}
|
||||
|
||||
AddSynonymRequest::~AddSynonymRequest()
|
||||
{}
|
||||
|
||||
std::string AddSynonymRequest::getSynonym()const
|
||||
{
|
||||
return synonym_;
|
||||
}
|
||||
|
||||
void AddSynonymRequest::setSynonym(const std::string& synonym)
|
||||
{
|
||||
synonym_ = synonym;
|
||||
setCoreParameter("Synonym", synonym);
|
||||
}
|
||||
|
||||
std::string AddSynonymRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void AddSynonymRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
48
chatbot/src/model/AddSynonymResult.cc
Normal file
48
chatbot/src/model/AddSynonymResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/AddSynonymResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
AddSynonymResult::AddSynonymResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddSynonymResult::AddSynonymResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddSynonymResult::~AddSynonymResult()
|
||||
{}
|
||||
|
||||
void AddSynonymResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
chatbot/src/model/AppendEntityMemberRequest.cc
Normal file
60
chatbot/src/model/AppendEntityMemberRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/AppendEntityMemberRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::AppendEntityMemberRequest;
|
||||
|
||||
AppendEntityMemberRequest::AppendEntityMemberRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "AppendEntityMember")
|
||||
{}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void AppendEntityMemberRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
std::string AppendEntityMemberRequest::getApplyType()const
|
||||
{
|
||||
return applyType_;
|
||||
}
|
||||
|
||||
void AppendEntityMemberRequest::setApplyType(const std::string& applyType)
|
||||
{
|
||||
applyType_ = applyType;
|
||||
setCoreParameter("ApplyType", applyType);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/AppendEntityMemberResult.cc
Normal file
55
chatbot/src/model/AppendEntityMemberResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/AppendEntityMemberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
AppendEntityMemberResult::AppendEntityMemberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AppendEntityMemberResult::AppendEntityMemberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AppendEntityMemberResult::~AppendEntityMemberResult()
|
||||
{}
|
||||
|
||||
void AppendEntityMemberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AppendEntityMemberResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string ChatRequest::getKnowledgeId()const
|
||||
void ChatRequest::setKnowledgeId(const std::string& knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setParameter("KnowledgeId", knowledgeId);
|
||||
setCoreParameter("KnowledgeId", knowledgeId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getSenderId()const
|
||||
@@ -44,7 +44,7 @@ std::string ChatRequest::getSenderId()const
|
||||
void ChatRequest::setSenderId(const std::string& senderId)
|
||||
{
|
||||
senderId_ = senderId;
|
||||
setParameter("SenderId", senderId);
|
||||
setCoreParameter("SenderId", senderId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getInstanceId()const
|
||||
@@ -55,7 +55,7 @@ std::string ChatRequest::getInstanceId()const
|
||||
void ChatRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getSenderNick()const
|
||||
@@ -66,7 +66,7 @@ std::string ChatRequest::getSenderNick()const
|
||||
void ChatRequest::setSenderNick(const std::string& senderNick)
|
||||
{
|
||||
senderNick_ = senderNick;
|
||||
setParameter("SenderNick", senderNick);
|
||||
setCoreParameter("SenderNick", senderNick);
|
||||
}
|
||||
|
||||
std::vector<std::string> ChatRequest::getPerspective()const
|
||||
@@ -78,7 +78,18 @@ void ChatRequest::setPerspective(const std::vector<std::string>& perspective)
|
||||
{
|
||||
perspective_ = perspective;
|
||||
for(int i = 0; i!= perspective.size(); i++)
|
||||
setParameter("Perspective."+ std::to_string(i), perspective.at(i));
|
||||
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
|
||||
@@ -89,7 +100,7 @@ std::string ChatRequest::getSessionId()const
|
||||
void ChatRequest::setSessionId(const std::string& sessionId)
|
||||
{
|
||||
sessionId_ = sessionId;
|
||||
setParameter("SessionId", sessionId);
|
||||
setCoreParameter("SessionId", sessionId);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getTag()const
|
||||
@@ -100,7 +111,7 @@ std::string ChatRequest::getTag()const
|
||||
void ChatRequest::setTag(const std::string& tag)
|
||||
{
|
||||
tag_ = tag;
|
||||
setParameter("Tag", tag);
|
||||
setCoreParameter("Tag", tag);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getUtterance()const
|
||||
@@ -111,7 +122,7 @@ std::string ChatRequest::getUtterance()const
|
||||
void ChatRequest::setUtterance(const std::string& utterance)
|
||||
{
|
||||
utterance_ = utterance;
|
||||
setParameter("Utterance", utterance);
|
||||
setCoreParameter("Utterance", utterance);
|
||||
}
|
||||
|
||||
std::string ChatRequest::getAccessKeyId()const
|
||||
@@ -122,6 +133,6 @@ std::string ChatRequest::getAccessKeyId()const
|
||||
void ChatRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ChatResult::~ChatResult()
|
||||
|
||||
void ChatResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMessages = value["Messages"]["Message"];
|
||||
for (auto value : allMessages)
|
||||
@@ -67,6 +70,8 @@ void ChatResult::parse(const std::string &payload)
|
||||
messagesObject.text.content = textNode["Content"].asString();
|
||||
if(!textNode["AnswerSource"].isNull())
|
||||
messagesObject.text.answerSource = textNode["AnswerSource"].asString();
|
||||
if(!textNode["MetaData"].isNull())
|
||||
messagesObject.text.metaData = textNode["MetaData"].asString();
|
||||
auto knowledgeNode = value["Knowledge"];
|
||||
if(!knowledgeNode["Id"].isNull())
|
||||
messagesObject.knowledge.id = knowledgeNode["Id"].asString();
|
||||
|
||||
49
chatbot/src/model/CreateCategoryRequest.cc
Normal file
49
chatbot/src/model/CreateCategoryRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateCategoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateCategoryRequest;
|
||||
|
||||
CreateCategoryRequest::CreateCategoryRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateCategory")
|
||||
{}
|
||||
|
||||
CreateCategoryRequest::~CreateCategoryRequest()
|
||||
{}
|
||||
|
||||
long CreateCategoryRequest::getParentCategoryId()const
|
||||
{
|
||||
return parentCategoryId_;
|
||||
}
|
||||
|
||||
void CreateCategoryRequest::setParentCategoryId(long parentCategoryId)
|
||||
{
|
||||
parentCategoryId_ = parentCategoryId;
|
||||
setCoreParameter("ParentCategoryId", std::to_string(parentCategoryId));
|
||||
}
|
||||
|
||||
std::string CreateCategoryRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateCategoryRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
62
chatbot/src/model/CreateCategoryResult.cc
Normal file
62
chatbot/src/model/CreateCategoryResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateCategoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateCategoryResult::CreateCategoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCategoryResult::CreateCategoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCategoryResult::~CreateCategoryResult()
|
||||
{}
|
||||
|
||||
void CreateCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CategoryId"].isNull())
|
||||
categoryId_ = std::stol(value["CategoryId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
long CreateCategoryResult::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
bool CreateCategoryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/CreateCoreWordRequest.cc
Normal file
38
chatbot/src/model/CreateCoreWordRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateCoreWordRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateCoreWordRequest;
|
||||
|
||||
CreateCoreWordRequest::CreateCoreWordRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateCoreWord")
|
||||
{}
|
||||
|
||||
CreateCoreWordRequest::~CreateCoreWordRequest()
|
||||
{}
|
||||
|
||||
std::string CreateCoreWordRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void CreateCoreWordRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreateCoreWordResult.cc
Normal file
55
chatbot/src/model/CreateCoreWordResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateCoreWordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateCoreWordResult::CreateCoreWordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCoreWordResult::CreateCoreWordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCoreWordResult::~CreateCoreWordResult()
|
||||
{}
|
||||
|
||||
void CreateCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CoreWordCode"].isNull())
|
||||
coreWordCode_ = value["CoreWordCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCoreWordResult::getCoreWordCode()const
|
||||
{
|
||||
return coreWordCode_;
|
||||
}
|
||||
|
||||
60
chatbot/src/model/CreateDialogRequest.cc
Normal file
60
chatbot/src/model/CreateDialogRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateDialogRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateDialogRequest;
|
||||
|
||||
CreateDialogRequest::CreateDialogRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateDialog")
|
||||
{}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void CreateDialogRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateDialogRequest::getDialogName()const
|
||||
{
|
||||
return dialogName_;
|
||||
}
|
||||
|
||||
void CreateDialogRequest::setDialogName(const std::string& dialogName)
|
||||
{
|
||||
dialogName_ = dialogName;
|
||||
setCoreParameter("DialogName", dialogName);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreateDialogResult.cc
Normal file
55
chatbot/src/model/CreateDialogResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateDialogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateDialogResult::CreateDialogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateDialogResult::CreateDialogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateDialogResult::~CreateDialogResult()
|
||||
{}
|
||||
|
||||
void CreateDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = value["DialogId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateDialogResult::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
82
chatbot/src/model/CreateEntityRequest.cc
Normal file
82
chatbot/src/model/CreateEntityRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateEntityRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateEntityRequest;
|
||||
|
||||
CreateEntityRequest::CreateEntityRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateEntity")
|
||||
{}
|
||||
|
||||
CreateEntityRequest::~CreateEntityRequest()
|
||||
{}
|
||||
|
||||
std::string CreateEntityRequest::getRegex()const
|
||||
{
|
||||
return regex_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setRegex(const std::string& regex)
|
||||
{
|
||||
regex_ = regex;
|
||||
setCoreParameter("Regex", regex);
|
||||
}
|
||||
|
||||
std::string CreateEntityRequest::getEntityType()const
|
||||
{
|
||||
return entityType_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setEntityType(const std::string& entityType)
|
||||
{
|
||||
entityType_ = entityType;
|
||||
setCoreParameter("EntityType", entityType);
|
||||
}
|
||||
|
||||
std::string CreateEntityRequest::getMembers()const
|
||||
{
|
||||
return members_;
|
||||
}
|
||||
|
||||
void CreateEntityRequest::setMembers(const std::string& members)
|
||||
{
|
||||
members_ = 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));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreateEntityResult.cc
Normal file
55
chatbot/src/model/CreateEntityResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateEntityResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateEntityResult::CreateEntityResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateEntityResult::CreateEntityResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateEntityResult::~CreateEntityResult()
|
||||
{}
|
||||
|
||||
void CreateEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateEntityResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/CreateIntentRequest.cc
Normal file
49
chatbot/src/model/CreateIntentRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateIntentRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateIntentRequest;
|
||||
|
||||
CreateIntentRequest::CreateIntentRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateIntent")
|
||||
{}
|
||||
|
||||
CreateIntentRequest::~CreateIntentRequest()
|
||||
{}
|
||||
|
||||
std::string CreateIntentRequest::getIntentDefinition()const
|
||||
{
|
||||
return intentDefinition_;
|
||||
}
|
||||
|
||||
void CreateIntentRequest::setIntentDefinition(const std::string& intentDefinition)
|
||||
{
|
||||
intentDefinition_ = intentDefinition;
|
||||
setCoreParameter("IntentDefinition", intentDefinition);
|
||||
}
|
||||
|
||||
long CreateIntentRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void CreateIntentRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreateIntentResult.cc
Normal file
55
chatbot/src/model/CreateIntentResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateIntentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateIntentResult::CreateIntentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateIntentResult::CreateIntentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateIntentResult::~CreateIntentResult()
|
||||
{}
|
||||
|
||||
void CreateIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateIntentResult::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/CreateKnowledgeRequest.cc
Normal file
38
chatbot/src/model/CreateKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreateKnowledgeRequest;
|
||||
|
||||
CreateKnowledgeRequest::CreateKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreateKnowledge")
|
||||
{}
|
||||
|
||||
CreateKnowledgeRequest::~CreateKnowledgeRequest()
|
||||
{}
|
||||
|
||||
std::string CreateKnowledgeRequest::getKnowledge()const
|
||||
{
|
||||
return knowledge_;
|
||||
}
|
||||
|
||||
void CreateKnowledgeRequest::setKnowledge(const std::string& knowledge)
|
||||
{
|
||||
knowledge_ = knowledge;
|
||||
setCoreParameter("Knowledge", knowledge);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreateKnowledgeResult.cc
Normal file
55
chatbot/src/model/CreateKnowledgeResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreateKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreateKnowledgeResult::CreateKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateKnowledgeResult::CreateKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateKnowledgeResult::~CreateKnowledgeResult()
|
||||
{}
|
||||
|
||||
void CreateKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgeId_ = std::stol(value["KnowledgeId"].asString());
|
||||
|
||||
}
|
||||
|
||||
long CreateKnowledgeResult::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/CreatePerspectiveRequest.cc
Normal file
38
chatbot/src/model/CreatePerspectiveRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreatePerspectiveRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::CreatePerspectiveRequest;
|
||||
|
||||
CreatePerspectiveRequest::CreatePerspectiveRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "CreatePerspective")
|
||||
{}
|
||||
|
||||
CreatePerspectiveRequest::~CreatePerspectiveRequest()
|
||||
{}
|
||||
|
||||
std::string CreatePerspectiveRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreatePerspectiveRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/CreatePerspectiveResult.cc
Normal file
55
chatbot/src/model/CreatePerspectiveResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/CreatePerspectiveResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
CreatePerspectiveResult::CreatePerspectiveResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreatePerspectiveResult::CreatePerspectiveResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreatePerspectiveResult::~CreatePerspectiveResult()
|
||||
{}
|
||||
|
||||
void CreatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["PerspectiveId"].isNull())
|
||||
perspectiveId_ = value["PerspectiveId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreatePerspectiveResult::getPerspectiveId()const
|
||||
{
|
||||
return perspectiveId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteCategoryRequest.cc
Normal file
38
chatbot/src/model/DeleteCategoryRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteCategoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteCategoryRequest;
|
||||
|
||||
DeleteCategoryRequest::DeleteCategoryRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteCategory")
|
||||
{}
|
||||
|
||||
DeleteCategoryRequest::~DeleteCategoryRequest()
|
||||
{}
|
||||
|
||||
long DeleteCategoryRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
void DeleteCategoryRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/DeleteCategoryResult.cc
Normal file
55
chatbot/src/model/DeleteCategoryResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteCategoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteCategoryResult::DeleteCategoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteCategoryResult::DeleteCategoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteCategoryResult::~DeleteCategoryResult()
|
||||
{}
|
||||
|
||||
void DeleteCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool DeleteCategoryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteCoreWordRequest.cc
Normal file
38
chatbot/src/model/DeleteCoreWordRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteCoreWordRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteCoreWordRequest;
|
||||
|
||||
DeleteCoreWordRequest::DeleteCoreWordRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteCoreWord")
|
||||
{}
|
||||
|
||||
DeleteCoreWordRequest::~DeleteCoreWordRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteCoreWordRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void DeleteCoreWordRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/DeleteCoreWordResult.cc
Normal file
55
chatbot/src/model/DeleteCoreWordResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteCoreWordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteCoreWordResult::DeleteCoreWordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteCoreWordResult::DeleteCoreWordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteCoreWordResult::~DeleteCoreWordResult()
|
||||
{}
|
||||
|
||||
void DeleteCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool DeleteCoreWordResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteDialogRequest.cc
Normal file
38
chatbot/src/model/DeleteDialogRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteDialogRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteDialogRequest;
|
||||
|
||||
DeleteDialogRequest::DeleteDialogRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteDialog")
|
||||
{}
|
||||
|
||||
DeleteDialogRequest::~DeleteDialogRequest()
|
||||
{}
|
||||
|
||||
long DeleteDialogRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void DeleteDialogRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/DeleteDialogResult.cc
Normal file
48
chatbot/src/model/DeleteDialogResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteDialogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteDialogResult::DeleteDialogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDialogResult::DeleteDialogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDialogResult::~DeleteDialogResult()
|
||||
{}
|
||||
|
||||
void DeleteDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteEntityRequest.cc
Normal file
38
chatbot/src/model/DeleteEntityRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteEntityRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteEntityRequest;
|
||||
|
||||
DeleteEntityRequest::DeleteEntityRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteEntity")
|
||||
{}
|
||||
|
||||
DeleteEntityRequest::~DeleteEntityRequest()
|
||||
{}
|
||||
|
||||
long DeleteEntityRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void DeleteEntityRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/DeleteEntityResult.cc
Normal file
55
chatbot/src/model/DeleteEntityResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteEntityResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteEntityResult::DeleteEntityResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteEntityResult::DeleteEntityResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteEntityResult::~DeleteEntityResult()
|
||||
{}
|
||||
|
||||
void DeleteEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteEntityResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteIntentRequest.cc
Normal file
38
chatbot/src/model/DeleteIntentRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteIntentRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteIntentRequest;
|
||||
|
||||
DeleteIntentRequest::DeleteIntentRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteIntent")
|
||||
{}
|
||||
|
||||
DeleteIntentRequest::~DeleteIntentRequest()
|
||||
{}
|
||||
|
||||
long DeleteIntentRequest::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
void DeleteIntentRequest::setIntentId(long intentId)
|
||||
{
|
||||
intentId_ = intentId;
|
||||
setCoreParameter("IntentId", std::to_string(intentId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/DeleteIntentResult.cc
Normal file
55
chatbot/src/model/DeleteIntentResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteIntentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteIntentResult::DeleteIntentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteIntentResult::DeleteIntentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteIntentResult::~DeleteIntentResult()
|
||||
{}
|
||||
|
||||
void DeleteIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteIntentResult::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DeleteKnowledgeRequest.cc
Normal file
38
chatbot/src/model/DeleteKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DeleteKnowledgeRequest;
|
||||
|
||||
DeleteKnowledgeRequest::DeleteKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DeleteKnowledge")
|
||||
{}
|
||||
|
||||
DeleteKnowledgeRequest::~DeleteKnowledgeRequest()
|
||||
{}
|
||||
|
||||
long DeleteKnowledgeRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
void DeleteKnowledgeRequest::setKnowledgeId(long knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setCoreParameter("KnowledgeId", std::to_string(knowledgeId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/DeleteKnowledgeResult.cc
Normal file
48
chatbot/src/model/DeleteKnowledgeResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DeleteKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DeleteKnowledgeResult::DeleteKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteKnowledgeResult::DeleteKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteKnowledgeResult::~DeleteKnowledgeResult()
|
||||
{}
|
||||
|
||||
void DeleteKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeCategoryRequest.cc
Normal file
38
chatbot/src/model/DescribeCategoryRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeCategoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeCategoryRequest;
|
||||
|
||||
DescribeCategoryRequest::DescribeCategoryRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeCategory")
|
||||
{}
|
||||
|
||||
DescribeCategoryRequest::~DescribeCategoryRequest()
|
||||
{}
|
||||
|
||||
long DescribeCategoryRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
void DescribeCategoryRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
69
chatbot/src/model/DescribeCategoryResult.cc
Normal file
69
chatbot/src/model/DescribeCategoryResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeCategoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeCategoryResult::DescribeCategoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeCategoryResult::DescribeCategoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeCategoryResult::~DescribeCategoryResult()
|
||||
{}
|
||||
|
||||
void DescribeCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ParentCategoryId"].isNull())
|
||||
parentCategoryId_ = std::stol(value["ParentCategoryId"].asString());
|
||||
if(!value["CategoryId"].isNull())
|
||||
categoryId_ = std::stol(value["CategoryId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
|
||||
}
|
||||
|
||||
long DescribeCategoryResult::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
long DescribeCategoryResult::getParentCategoryId()const
|
||||
{
|
||||
return parentCategoryId_;
|
||||
}
|
||||
|
||||
std::string DescribeCategoryResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeCoreWordRequest.cc
Normal file
38
chatbot/src/model/DescribeCoreWordRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeCoreWordRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeCoreWordRequest;
|
||||
|
||||
DescribeCoreWordRequest::DescribeCoreWordRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeCoreWord")
|
||||
{}
|
||||
|
||||
DescribeCoreWordRequest::~DescribeCoreWordRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeCoreWordRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void DescribeCoreWordRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
84
chatbot/src/model/DescribeCoreWordResult.cc
Normal file
84
chatbot/src/model/DescribeCoreWordResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeCoreWordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeCoreWordResult::DescribeCoreWordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeCoreWordResult::DescribeCoreWordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeCoreWordResult::~DescribeCoreWordResult()
|
||||
{}
|
||||
|
||||
void DescribeCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSynonyms = value["Synonyms"]["Synonym"];
|
||||
for (const auto &item : allSynonyms)
|
||||
synonyms_.push_back(item.asString());
|
||||
if(!value["CoreWordCode"].isNull())
|
||||
coreWordCode_ = value["CoreWordCode"].asString();
|
||||
if(!value["CoreWordName"].isNull())
|
||||
coreWordName_ = value["CoreWordName"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeCoreWordResult::getSynonyms()const
|
||||
{
|
||||
return synonyms_;
|
||||
}
|
||||
|
||||
std::string DescribeCoreWordResult::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
std::string DescribeCoreWordResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribeCoreWordResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeCoreWordResult::getCoreWordCode()const
|
||||
{
|
||||
return coreWordCode_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeDialogFlowRequest.cc
Normal file
38
chatbot/src/model/DescribeDialogFlowRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeDialogFlowRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeDialogFlowRequest;
|
||||
|
||||
DescribeDialogFlowRequest::DescribeDialogFlowRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeDialogFlow")
|
||||
{}
|
||||
|
||||
DescribeDialogFlowRequest::~DescribeDialogFlowRequest()
|
||||
{}
|
||||
|
||||
long DescribeDialogFlowRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void DescribeDialogFlowRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
320
chatbot/src/model/DescribeDialogFlowResult.cc
Normal file
320
chatbot/src/model/DescribeDialogFlowResult.cc
Normal file
@@ -0,0 +1,320 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeDialogFlowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeDialogFlowResult::DescribeDialogFlowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDialogFlowResult::DescribeDialogFlowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDialogFlowResult::~DescribeDialogFlowResult()
|
||||
{}
|
||||
|
||||
void DescribeDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto moduleDefinitionNode = value["ModuleDefinition"];
|
||||
auto allNodes = value["Nodes"]["NodesItem"];
|
||||
for (auto value : allNodes)
|
||||
{
|
||||
ModuleDefinition::NodesItem nodesItemObject;
|
||||
if(!value["Code"].isNull())
|
||||
nodesItemObject.code = value["Code"].asString();
|
||||
if(!value["ComponentCode"].isNull())
|
||||
nodesItemObject.componentCode = value["ComponentCode"].asString();
|
||||
if(!value["PluginDataUpdate"].isNull())
|
||||
nodesItemObject.pluginDataUpdate = value["PluginDataUpdate"].asString() == "true";
|
||||
if(!value["Xx"].isNull())
|
||||
nodesItemObject.xx = value["Xx"].asString();
|
||||
if(!value["Yy"].isNull())
|
||||
nodesItemObject.yy = value["Yy"].asString();
|
||||
if(!value["Id"].isNull())
|
||||
nodesItemObject.id = value["Id"].asString();
|
||||
if(!value["Label"].isNull())
|
||||
nodesItemObject.label = value["Label"].asString();
|
||||
auto pluginDataNode = value["PluginData"];
|
||||
auto entryNode = pluginDataNode["Entry"];
|
||||
auto pluginFieldDataEntryNode = entryNode["PluginFieldDataEntry"];
|
||||
if(!pluginFieldDataEntryNode["LifeSpan"].isNull())
|
||||
nodesItemObject.pluginData.entry.pluginFieldDataEntry.lifeSpan = std::stoi(pluginFieldDataEntryNode["LifeSpan"].asString());
|
||||
if(!pluginFieldDataEntryNode["Name"].isNull())
|
||||
nodesItemObject.pluginData.entry.pluginFieldDataEntry.name = pluginFieldDataEntryNode["Name"].asString();
|
||||
auto allContentEntry = value["ContentEntry"]["ContentEntryItem"];
|
||||
for (auto value : allContentEntry)
|
||||
{
|
||||
ModuleDefinition::NodesItem::PluginData::Entry::PluginFieldDataEntry::ContentEntryItem contentEntryItemObject;
|
||||
auto allConditionEntries = value["ConditionEntries"]["ConditionEntriesItem"];
|
||||
for (auto value : allConditionEntries)
|
||||
{
|
||||
ModuleDefinition::NodesItem::PluginData::Entry::PluginFieldDataEntry::ContentEntryItem::ConditionEntriesItem conditionEntriesObject;
|
||||
if(!value["Id"].isNull())
|
||||
conditionEntriesObject.id = value["Id"].asString();
|
||||
if(!value["Term"].isNull())
|
||||
conditionEntriesObject.term = value["Term"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
conditionEntriesObject.name = value["Name"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
conditionEntriesObject.type = value["Type"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
conditionEntriesObject.value = value["Value"].asString();
|
||||
contentEntryItemObject.conditionEntries.push_back(conditionEntriesObject);
|
||||
}
|
||||
nodesItemObject.pluginData.entry.pluginFieldDataEntry.contentEntry.push_back(contentEntryItemObject);
|
||||
}
|
||||
auto functionNode = pluginDataNode["Function"];
|
||||
auto pluginFieldDataFunctionNode = functionNode["PluginFieldDataFunction"];
|
||||
if(!pluginFieldDataFunctionNode["Code"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.code = pluginFieldDataFunctionNode["Code"].asString();
|
||||
if(!pluginFieldDataFunctionNode["Description"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.description = pluginFieldDataFunctionNode["Description"].asString();
|
||||
if(!pluginFieldDataFunctionNode["Function"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.function = pluginFieldDataFunctionNode["Function"].asString();
|
||||
if(!pluginFieldDataFunctionNode["Name"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.name = pluginFieldDataFunctionNode["Name"].asString();
|
||||
if(!pluginFieldDataFunctionNode["AliyunService"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.aliyunService = pluginFieldDataFunctionNode["AliyunService"].asString();
|
||||
if(!pluginFieldDataFunctionNode["AliyunFunction"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.aliyunFunction = pluginFieldDataFunctionNode["AliyunFunction"].asString();
|
||||
if(!pluginFieldDataFunctionNode["EndPoint"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.endPoint = pluginFieldDataFunctionNode["EndPoint"].asString();
|
||||
if(!pluginFieldDataFunctionNode["Type"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.type = pluginFieldDataFunctionNode["Type"].asString();
|
||||
if(!pluginFieldDataFunctionNode["Params"].isNull())
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.params = pluginFieldDataFunctionNode["Params"].asString();
|
||||
auto allSwitch = value["Switch"]["SwitchItem"];
|
||||
for (auto value : allSwitch)
|
||||
{
|
||||
ModuleDefinition::NodesItem::PluginData::Function::PluginFieldDataFunction::SwitchItem switchItemObject;
|
||||
if(!value["Id"].isNull())
|
||||
switchItemObject.id = value["Id"].asString();
|
||||
if(!value["Label"].isNull())
|
||||
switchItemObject.label = value["Label"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
switchItemObject.type = value["Type"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
switchItemObject.value = value["Value"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
switchItemObject.name = value["Name"].asString();
|
||||
nodesItemObject.pluginData.function.pluginFieldDataFunction.switch.push_back(switchItemObject);
|
||||
}
|
||||
auto responseNode = pluginDataNode["Response"];
|
||||
auto pluginFieldDataResponseNode = responseNode["PluginFieldDataResponse"];
|
||||
if(!pluginFieldDataResponseNode["Name"].isNull())
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.name = pluginFieldDataResponseNode["Name"].asString();
|
||||
auto contentResponseNode = pluginFieldDataResponseNode["ContentResponse"];
|
||||
if(!contentResponseNode["Text"].isNull())
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.contentResponse.text = contentResponseNode["Text"].asString();
|
||||
if(!contentResponseNode["Type"].isNull())
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.contentResponse.type = contentResponseNode["Type"].asString();
|
||||
if(!contentResponseNode["Image"].isNull())
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.contentResponse.image = contentResponseNode["Image"].asString();
|
||||
auto buttonListNode = contentResponseNode["ButtonList"];
|
||||
if(!buttonListNode["Intro"].isNull())
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.contentResponse.buttonList.intro = buttonListNode["Intro"].asString();
|
||||
auto allButton = value["Button"]["ButtonItem"];
|
||||
for (auto value : allButton)
|
||||
{
|
||||
ModuleDefinition::NodesItem::PluginData::Response::PluginFieldDataResponse::ContentResponse::ButtonList::ButtonItem buttonItemObject;
|
||||
if(!value["Name"].isNull())
|
||||
buttonItemObject.name = value["Name"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
buttonItemObject.type = value["Type"].asString();
|
||||
if(!value["Text"].isNull())
|
||||
buttonItemObject.text = value["Text"].asString();
|
||||
nodesItemObject.pluginData.response.pluginFieldDataResponse.contentResponse.buttonList.button.push_back(buttonItemObject);
|
||||
}
|
||||
auto slotNode = pluginDataNode["Slot"];
|
||||
auto pluginFieldDataSlotNode = slotNode["PluginFieldDataSlot"];
|
||||
if(!pluginFieldDataSlotNode["IntentId"].isNull())
|
||||
nodesItemObject.pluginData.slot.pluginFieldDataSlot.intentId = pluginFieldDataSlotNode["IntentId"].asString();
|
||||
if(!pluginFieldDataSlotNode["IntentName"].isNull())
|
||||
nodesItemObject.pluginData.slot.pluginFieldDataSlot.intentName = pluginFieldDataSlotNode["IntentName"].asString();
|
||||
if(!pluginFieldDataSlotNode["IsSysIntent"].isNull())
|
||||
nodesItemObject.pluginData.slot.pluginFieldDataSlot.isSysIntent = pluginFieldDataSlotNode["IsSysIntent"].asString() == "true";
|
||||
if(!pluginFieldDataSlotNode["Name"].isNull())
|
||||
nodesItemObject.pluginData.slot.pluginFieldDataSlot.name = pluginFieldDataSlotNode["Name"].asString();
|
||||
auto allContentSlot = value["ContentSlot"]["ContentSlotItem"];
|
||||
for (auto value : allContentSlot)
|
||||
{
|
||||
ModuleDefinition::NodesItem::PluginData::Slot::PluginFieldDataSlot::ContentSlotItem contentSlotItemObject;
|
||||
if(!value["IsArray"].isNull())
|
||||
contentSlotItemObject.isArray = value["IsArray"].asString() == "true";
|
||||
if(!value["IsNecessary"].isNull())
|
||||
contentSlotItemObject.isNecessary = value["IsNecessary"].asString() == "true";
|
||||
if(!value["LifeSpan"].isNull())
|
||||
contentSlotItemObject.lifeSpan = std::stoi(value["LifeSpan"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
contentSlotItemObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
contentSlotItemObject.value = value["Value"].asString();
|
||||
auto allQuestion = value["Question"]["Question"];
|
||||
for (auto value : allQuestion)
|
||||
contentSlotItemObject.question.push_back(value.asString());
|
||||
nodesItemObject.pluginData.slot.pluginFieldDataSlot.contentSlot.push_back(contentSlotItemObject);
|
||||
}
|
||||
moduleDefinition_.nodes.push_back(nodesItemObject);
|
||||
}
|
||||
auto allEdges = value["Edges"]["EdgesItem"];
|
||||
for (auto value : allEdges)
|
||||
{
|
||||
ModuleDefinition::EdgesItem edgesItemObject;
|
||||
if(!value["Id"].isNull())
|
||||
edgesItemObject.id = value["Id"].asString();
|
||||
if(!value["Label"].isNull())
|
||||
edgesItemObject.label = value["Label"].asString();
|
||||
if(!value["Source"].isNull())
|
||||
edgesItemObject.source = value["Source"].asString();
|
||||
if(!value["Target"].isNull())
|
||||
edgesItemObject.target = value["Target"].asString();
|
||||
moduleDefinition_.edges.push_back(edgesItemObject);
|
||||
}
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = std::stol(value["DialogId"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
if(!value["DialogName"].isNull())
|
||||
dialogName_ = value["DialogName"].asString();
|
||||
if(!value["ModuleId"].isNull())
|
||||
moduleId_ = std::stol(value["ModuleId"].asString());
|
||||
if(!value["ModuleName"].isNull())
|
||||
moduleName_ = value["ModuleName"].asString();
|
||||
if(!value["Templates"].isNull())
|
||||
templates_ = value["Templates"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
createUserId_ = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
modifyUserId_ = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
if(!value["AccountId"].isNull())
|
||||
accountId_ = value["AccountId"].asString();
|
||||
if(!value["Tags"].isNull())
|
||||
tags_ = value["Tags"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = std::stoi(value["Status"].asString());
|
||||
if(!value["GlobalVars"].isNull())
|
||||
globalVars_ = value["GlobalVars"].asString();
|
||||
|
||||
}
|
||||
|
||||
int DescribeDialogFlowResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getAccountId()const
|
||||
{
|
||||
return accountId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getModuleName()const
|
||||
{
|
||||
return moduleName_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
long DescribeDialogFlowResult::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getTemplates()const
|
||||
{
|
||||
return templates_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getCreateUserId()const
|
||||
{
|
||||
return createUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getGlobalVars()const
|
||||
{
|
||||
return globalVars_;
|
||||
}
|
||||
|
||||
DescribeDialogFlowResult::ModuleDefinition DescribeDialogFlowResult::getModuleDefinition()const
|
||||
{
|
||||
return moduleDefinition_;
|
||||
}
|
||||
|
||||
long DescribeDialogFlowResult::getModuleId()const
|
||||
{
|
||||
return moduleId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getDialogName()const
|
||||
{
|
||||
return dialogName_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getModifyUserId()const
|
||||
{
|
||||
return modifyUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogFlowResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeDialogRequest.cc
Normal file
38
chatbot/src/model/DescribeDialogRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeDialogRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeDialogRequest;
|
||||
|
||||
DescribeDialogRequest::DescribeDialogRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeDialog")
|
||||
{}
|
||||
|
||||
DescribeDialogRequest::~DescribeDialogRequest()
|
||||
{}
|
||||
|
||||
long DescribeDialogRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void DescribeDialogRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
132
chatbot/src/model/DescribeDialogResult.cc
Normal file
132
chatbot/src/model/DescribeDialogResult.cc
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeDialogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeDialogResult::DescribeDialogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDialogResult::DescribeDialogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDialogResult::~DescribeDialogResult()
|
||||
{}
|
||||
|
||||
void DescribeDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = std::stol(value["DialogId"].asString());
|
||||
if(!value["DialogName"].isNull())
|
||||
dialogName_ = value["DialogName"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
createUserId_ = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
modifyUserId_ = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
if(!value["IsSampleDialog"].isNull())
|
||||
isSampleDialog_ = value["IsSampleDialog"].asString() == "true";
|
||||
if(!value["Status"].isNull())
|
||||
status_ = std::stoi(value["Status"].asString());
|
||||
if(!value["IsOnline"].isNull())
|
||||
isOnline_ = value["IsOnline"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int DescribeDialogResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getDialogName()const
|
||||
{
|
||||
return dialogName_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getModifyUserId()const
|
||||
{
|
||||
return modifyUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
long DescribeDialogResult::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getCreateUserId()const
|
||||
{
|
||||
return createUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeDialogResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
bool DescribeDialogResult::getIsSampleDialog()const
|
||||
{
|
||||
return isSampleDialog_;
|
||||
}
|
||||
|
||||
bool DescribeDialogResult::getIsOnline()const
|
||||
{
|
||||
return isOnline_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeEntitiesRequest.cc
Normal file
38
chatbot/src/model/DescribeEntitiesRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeEntitiesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeEntitiesRequest;
|
||||
|
||||
DescribeEntitiesRequest::DescribeEntitiesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeEntities")
|
||||
{}
|
||||
|
||||
DescribeEntitiesRequest::~DescribeEntitiesRequest()
|
||||
{}
|
||||
|
||||
long DescribeEntitiesRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void DescribeEntitiesRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
134
chatbot/src/model/DescribeEntitiesResult.cc
Normal file
134
chatbot/src/model/DescribeEntitiesResult.cc
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeEntitiesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeEntitiesResult::DescribeEntitiesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeEntitiesResult::DescribeEntitiesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeEntitiesResult::~DescribeEntitiesResult()
|
||||
{}
|
||||
|
||||
void DescribeEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMembers = value["Members"]["MembersItem"];
|
||||
for (auto value : allMembers)
|
||||
{
|
||||
MembersItem membersObject;
|
||||
if(!value["MemberName"].isNull())
|
||||
membersObject.memberName = value["MemberName"].asString();
|
||||
auto allSynonyms = value["Synonyms"]["Synonyms"];
|
||||
for (auto value : allSynonyms)
|
||||
membersObject.synonyms.push_back(value.asString());
|
||||
members_.push_back(membersObject);
|
||||
}
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = std::stol(value["EntityId"].asString());
|
||||
if(!value["EntityName"].isNull())
|
||||
entityName_ = value["EntityName"].asString();
|
||||
if(!value["EntityType"].isNull())
|
||||
entityType_ = value["EntityType"].asString();
|
||||
if(!value["Regex"].isNull())
|
||||
regex_ = value["Regex"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
createUserId_ = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
modifyUserId_ = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
|
||||
}
|
||||
|
||||
long DescribeEntitiesResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getEntityType()const
|
||||
{
|
||||
return entityType_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getModifyUserId()const
|
||||
{
|
||||
return modifyUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getRegex()const
|
||||
{
|
||||
return regex_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getCreateUserId()const
|
||||
{
|
||||
return createUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeEntitiesResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
std::vector<DescribeEntitiesResult::MembersItem> DescribeEntitiesResult::getMembers()const
|
||||
{
|
||||
return members_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeIntentRequest.cc
Normal file
38
chatbot/src/model/DescribeIntentRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeIntentRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeIntentRequest;
|
||||
|
||||
DescribeIntentRequest::DescribeIntentRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeIntent")
|
||||
{}
|
||||
|
||||
DescribeIntentRequest::~DescribeIntentRequest()
|
||||
{}
|
||||
|
||||
long DescribeIntentRequest::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
void DescribeIntentRequest::setIntentId(long intentId)
|
||||
{
|
||||
intentId_ = intentId;
|
||||
setCoreParameter("IntentId", std::to_string(intentId));
|
||||
}
|
||||
|
||||
200
chatbot/src/model/DescribeIntentResult.cc
Normal file
200
chatbot/src/model/DescribeIntentResult.cc
Normal file
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeIntentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeIntentResult::DescribeIntentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeIntentResult::DescribeIntentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeIntentResult::~DescribeIntentResult()
|
||||
{}
|
||||
|
||||
void DescribeIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRuleCheck = value["RuleCheck"]["RuleCheckItem"];
|
||||
for (auto value : allRuleCheck)
|
||||
{
|
||||
RuleCheckItem ruleCheckObject;
|
||||
if(!value["Text"].isNull())
|
||||
ruleCheckObject.text = value["Text"].asString();
|
||||
if(!value["Strict"].isNull())
|
||||
ruleCheckObject.strict = value["Strict"].asString() == "true";
|
||||
auto allWarning = value["Warning"]["Warning"];
|
||||
for (auto value : allWarning)
|
||||
ruleCheckObject.warning.push_back(value.asString());
|
||||
auto allError = value["Error"]["Error"];
|
||||
for (auto value : allError)
|
||||
ruleCheckObject.error.push_back(value.asString());
|
||||
ruleCheck_.push_back(ruleCheckObject);
|
||||
}
|
||||
auto allSlot = value["Slot"]["SlotItem"];
|
||||
for (auto value : allSlot)
|
||||
{
|
||||
SlotItem slotObject;
|
||||
if(!value["Name"].isNull())
|
||||
slotObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
slotObject.value = value["Value"].asString();
|
||||
if(!value["IsNecessary"].isNull())
|
||||
slotObject.isNecessary = value["IsNecessary"].asString() == "true";
|
||||
if(!value["IsArray"].isNull())
|
||||
slotObject.isArray = value["IsArray"].asString() == "true";
|
||||
if(!value["LifeSpan"].isNull())
|
||||
slotObject.lifeSpan = std::stoi(value["LifeSpan"].asString());
|
||||
if(!value["SlotId"].isNull())
|
||||
slotObject.slotId = value["SlotId"].asString();
|
||||
auto allTags = value["Tags"]["TagsItem"];
|
||||
for (auto value : allTags)
|
||||
{
|
||||
SlotItem::TagsItem tagsObject;
|
||||
if(!value["Value"].isNull())
|
||||
tagsObject.value = value["Value"].asString();
|
||||
if(!value["UserSayId"].isNull())
|
||||
tagsObject.userSayId = value["UserSayId"].asString();
|
||||
slotObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allQuestion = value["Question"]["Question"];
|
||||
for (auto value : allQuestion)
|
||||
slotObject.question.push_back(value.asString());
|
||||
slot_.push_back(slotObject);
|
||||
}
|
||||
auto allUserSay = value["UserSay"]["UserSayItem"];
|
||||
for (auto value : allUserSay)
|
||||
{
|
||||
UserSayItem userSayObject;
|
||||
if(!value["Strict"].isNull())
|
||||
userSayObject.strict = value["Strict"].asString() == "true";
|
||||
if(!value["UserSayId"].isNull())
|
||||
userSayObject.userSayId = value["UserSayId"].asString();
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
UserSayItem::DataItem dataObject;
|
||||
if(!value["Text"].isNull())
|
||||
dataObject.text = value["Text"].asString();
|
||||
if(!value["SlotId"].isNull())
|
||||
dataObject.slotId = value["SlotId"].asString();
|
||||
userSayObject.data.push_back(dataObject);
|
||||
}
|
||||
userSay_.push_back(userSayObject);
|
||||
}
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = std::stol(value["IntentId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
type_ = value["Type"].asString();
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogId_ = std::stol(value["DialogId"].asString());
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
createUserId_ = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
modifyUserId_ = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
long DescribeIntentResult::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getCreateUserId()const
|
||||
{
|
||||
return createUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
long DescribeIntentResult::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
std::vector<DescribeIntentResult::UserSayItem> DescribeIntentResult::getUserSay()const
|
||||
{
|
||||
return userSay_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getModifyUserId()const
|
||||
{
|
||||
return modifyUserId_;
|
||||
}
|
||||
|
||||
std::string DescribeIntentResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
std::vector<DescribeIntentResult::SlotItem> DescribeIntentResult::getSlot()const
|
||||
{
|
||||
return slot_;
|
||||
}
|
||||
|
||||
std::vector<DescribeIntentResult::RuleCheckItem> DescribeIntentResult::getRuleCheck()const
|
||||
{
|
||||
return ruleCheck_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribeKnowledgeRequest.cc
Normal file
38
chatbot/src/model/DescribeKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribeKnowledgeRequest;
|
||||
|
||||
DescribeKnowledgeRequest::DescribeKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribeKnowledge")
|
||||
{}
|
||||
|
||||
DescribeKnowledgeRequest::~DescribeKnowledgeRequest()
|
||||
{}
|
||||
|
||||
long DescribeKnowledgeRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
void DescribeKnowledgeRequest::setKnowledgeId(long knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setCoreParameter("KnowledgeId", std::to_string(knowledgeId));
|
||||
}
|
||||
|
||||
210
chatbot/src/model/DescribeKnowledgeResult.cc
Normal file
210
chatbot/src/model/DescribeKnowledgeResult.cc
Normal file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribeKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribeKnowledgeResult::DescribeKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeKnowledgeResult::DescribeKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeKnowledgeResult::~DescribeKnowledgeResult()
|
||||
{}
|
||||
|
||||
void DescribeKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allOutlines = value["Outlines"]["Outline"];
|
||||
for (auto value : allOutlines)
|
||||
{
|
||||
Outline outlinesObject;
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
outlinesObject.knowledgeId = std::stol(value["KnowledgeId"].asString());
|
||||
if(!value["Title"].isNull())
|
||||
outlinesObject.title = value["Title"].asString();
|
||||
if(!value["OutlineId"].isNull())
|
||||
outlinesObject.outlineId = std::stol(value["OutlineId"].asString());
|
||||
outlines_.push_back(outlinesObject);
|
||||
}
|
||||
auto allSimQuestions = value["SimQuestions"]["SimQuestion"];
|
||||
for (auto value : allSimQuestions)
|
||||
{
|
||||
SimQuestion simQuestionsObject;
|
||||
if(!value["ModifyTime"].isNull())
|
||||
simQuestionsObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
simQuestionsObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["SimQuestionId"].isNull())
|
||||
simQuestionsObject.simQuestionId = std::stol(value["SimQuestionId"].asString());
|
||||
if(!value["Title"].isNull())
|
||||
simQuestionsObject.title = value["Title"].asString();
|
||||
simQuestions_.push_back(simQuestionsObject);
|
||||
}
|
||||
auto allSolutions = value["Solutions"]["Solution"];
|
||||
for (auto value : allSolutions)
|
||||
{
|
||||
Solution solutionsObject;
|
||||
if(!value["Summary"].isNull())
|
||||
solutionsObject.summary = value["Summary"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
solutionsObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
solutionsObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["SolutionId"].isNull())
|
||||
solutionsObject.solutionId = std::stol(value["SolutionId"].asString());
|
||||
if(!value["Content"].isNull())
|
||||
solutionsObject.content = value["Content"].asString();
|
||||
if(!value["PlainText"].isNull())
|
||||
solutionsObject.plainText = value["PlainText"].asString();
|
||||
auto allPerspectiveIds = value["PerspectiveIds"]["PerspectiveId"];
|
||||
for (auto value : allPerspectiveIds)
|
||||
solutionsObject.perspectiveIds.push_back(value.asString());
|
||||
solutions_.push_back(solutionsObject);
|
||||
}
|
||||
auto allKeyWords = value["KeyWords"]["KeyWord"];
|
||||
for (const auto &item : allKeyWords)
|
||||
keyWords_.push_back(item.asString());
|
||||
auto allCoreWords = value["CoreWords"]["CoreWord"];
|
||||
for (const auto &item : allCoreWords)
|
||||
coreWords_.push_back(item.asString());
|
||||
if(!value["EndDate"].isNull())
|
||||
endDate_ = value["EndDate"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["KnowledgeTitle"].isNull())
|
||||
knowledgeTitle_ = value["KnowledgeTitle"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
version_ = std::stoi(value["Version"].asString());
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgeId_ = std::stol(value["KnowledgeId"].asString());
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["KnowledgeType"].isNull())
|
||||
knowledgeType_ = std::stoi(value["KnowledgeType"].asString());
|
||||
if(!value["CategoryId"].isNull())
|
||||
categoryId_ = std::stol(value["CategoryId"].asString());
|
||||
if(!value["StartDate"].isNull())
|
||||
startDate_ = value["StartDate"].asString();
|
||||
if(!value["KnowledgeStatus"].isNull())
|
||||
knowledgeStatus_ = std::stoi(value["KnowledgeStatus"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getKnowledgeTitle()const
|
||||
{
|
||||
return knowledgeTitle_;
|
||||
}
|
||||
|
||||
long DescribeKnowledgeResult::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeKnowledgeResult::getCoreWords()const
|
||||
{
|
||||
return coreWords_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
long DescribeKnowledgeResult::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeKnowledgeResult::getKeyWords()const
|
||||
{
|
||||
return keyWords_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getEndDate()const
|
||||
{
|
||||
return endDate_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getStartDate()const
|
||||
{
|
||||
return startDate_;
|
||||
}
|
||||
|
||||
std::vector<DescribeKnowledgeResult::SimQuestion> DescribeKnowledgeResult::getSimQuestions()const
|
||||
{
|
||||
return simQuestions_;
|
||||
}
|
||||
|
||||
std::vector<DescribeKnowledgeResult::Solution> DescribeKnowledgeResult::getSolutions()const
|
||||
{
|
||||
return solutions_;
|
||||
}
|
||||
|
||||
int DescribeKnowledgeResult::getVersion()const
|
||||
{
|
||||
return version_;
|
||||
}
|
||||
|
||||
std::string DescribeKnowledgeResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
std::vector<DescribeKnowledgeResult::Outline> DescribeKnowledgeResult::getOutlines()const
|
||||
{
|
||||
return outlines_;
|
||||
}
|
||||
|
||||
int DescribeKnowledgeResult::getKnowledgeStatus()const
|
||||
{
|
||||
return knowledgeStatus_;
|
||||
}
|
||||
|
||||
int DescribeKnowledgeResult::getKnowledgeType()const
|
||||
{
|
||||
return knowledgeType_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DescribePerspectiveRequest.cc
Normal file
38
chatbot/src/model/DescribePerspectiveRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribePerspectiveRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DescribePerspectiveRequest;
|
||||
|
||||
DescribePerspectiveRequest::DescribePerspectiveRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DescribePerspective")
|
||||
{}
|
||||
|
||||
DescribePerspectiveRequest::~DescribePerspectiveRequest()
|
||||
{}
|
||||
|
||||
std::string DescribePerspectiveRequest::getPerspectiveId()const
|
||||
{
|
||||
return perspectiveId_;
|
||||
}
|
||||
|
||||
void DescribePerspectiveRequest::setPerspectiveId(const std::string& perspectiveId)
|
||||
{
|
||||
perspectiveId_ = perspectiveId;
|
||||
setCoreParameter("PerspectiveId", perspectiveId);
|
||||
}
|
||||
|
||||
111
chatbot/src/model/DescribePerspectiveResult.cc
Normal file
111
chatbot/src/model/DescribePerspectiveResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DescribePerspectiveResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DescribePerspectiveResult::DescribePerspectiveResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribePerspectiveResult::DescribePerspectiveResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribePerspectiveResult::~DescribePerspectiveResult()
|
||||
{}
|
||||
|
||||
void DescribePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
modifyUserName_ = value["ModifyUserName"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
modifyTime_ = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["SelfDefine"].isNull())
|
||||
selfDefine_ = value["SelfDefine"].asString() == "true";
|
||||
if(!value["PerspectiveId"].isNull())
|
||||
perspectiveId_ = value["PerspectiveId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
createUserName_ = value["CreateUserName"].asString();
|
||||
if(!value["PerspectiveCode"].isNull())
|
||||
perspectiveCode_ = value["PerspectiveCode"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = std::stoi(value["Status"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
|
||||
}
|
||||
|
||||
int DescribePerspectiveResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getPerspectiveCode()const
|
||||
{
|
||||
return perspectiveCode_;
|
||||
}
|
||||
|
||||
bool DescribePerspectiveResult::getSelfDefine()const
|
||||
{
|
||||
return selfDefine_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getModifyUserName()const
|
||||
{
|
||||
return modifyUserName_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getPerspectiveId()const
|
||||
{
|
||||
return perspectiveId_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getCreateUserName()const
|
||||
{
|
||||
return createUserName_;
|
||||
}
|
||||
|
||||
std::string DescribePerspectiveResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DisableDialogFlowRequest.cc
Normal file
38
chatbot/src/model/DisableDialogFlowRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DisableDialogFlowRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DisableDialogFlowRequest;
|
||||
|
||||
DisableDialogFlowRequest::DisableDialogFlowRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DisableDialogFlow")
|
||||
{}
|
||||
|
||||
DisableDialogFlowRequest::~DisableDialogFlowRequest()
|
||||
{}
|
||||
|
||||
long DisableDialogFlowRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void DisableDialogFlowRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/DisableDialogFlowResult.cc
Normal file
48
chatbot/src/model/DisableDialogFlowResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DisableDialogFlowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DisableDialogFlowResult::DisableDialogFlowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DisableDialogFlowResult::DisableDialogFlowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DisableDialogFlowResult::~DisableDialogFlowResult()
|
||||
{}
|
||||
|
||||
void DisableDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/DisableKnowledgeRequest.cc
Normal file
38
chatbot/src/model/DisableKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DisableKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::DisableKnowledgeRequest;
|
||||
|
||||
DisableKnowledgeRequest::DisableKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "DisableKnowledge")
|
||||
{}
|
||||
|
||||
DisableKnowledgeRequest::~DisableKnowledgeRequest()
|
||||
{}
|
||||
|
||||
long DisableKnowledgeRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
void DisableKnowledgeRequest::setKnowledgeId(long knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setCoreParameter("KnowledgeId", std::to_string(knowledgeId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/DisableKnowledgeResult.cc
Normal file
48
chatbot/src/model/DisableKnowledgeResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/DisableKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
DisableKnowledgeResult::DisableKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DisableKnowledgeResult::DisableKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DisableKnowledgeResult::~DisableKnowledgeResult()
|
||||
{}
|
||||
|
||||
void DisableKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
chatbot/src/model/FeedbackRequest.cc
Normal file
71
chatbot/src/model/FeedbackRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/FeedbackRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::FeedbackRequest;
|
||||
|
||||
FeedbackRequest::FeedbackRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "Feedback")
|
||||
{}
|
||||
|
||||
FeedbackRequest::~FeedbackRequest()
|
||||
{}
|
||||
|
||||
std::string FeedbackRequest::getFeedback()const
|
||||
{
|
||||
return feedback_;
|
||||
}
|
||||
|
||||
void FeedbackRequest::setFeedback(const std::string& feedback)
|
||||
{
|
||||
feedback_ = feedback;
|
||||
setCoreParameter("Feedback", feedback);
|
||||
}
|
||||
|
||||
std::string FeedbackRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void FeedbackRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string FeedbackRequest::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
void FeedbackRequest::setMessageId(const std::string& messageId)
|
||||
{
|
||||
messageId_ = messageId;
|
||||
setCoreParameter("MessageId", messageId);
|
||||
}
|
||||
|
||||
std::string FeedbackRequest::getSessionId()const
|
||||
{
|
||||
return sessionId_;
|
||||
}
|
||||
|
||||
void FeedbackRequest::setSessionId(const std::string& sessionId)
|
||||
{
|
||||
sessionId_ = sessionId;
|
||||
setCoreParameter("SessionId", sessionId);
|
||||
}
|
||||
|
||||
62
chatbot/src/model/FeedbackResult.cc
Normal file
62
chatbot/src/model/FeedbackResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/FeedbackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
FeedbackResult::FeedbackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
FeedbackResult::FeedbackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
FeedbackResult::~FeedbackResult()
|
||||
{}
|
||||
|
||||
void FeedbackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
if(!value["Feedback"].isNull())
|
||||
feedback_ = value["Feedback"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string FeedbackResult::getFeedback()const
|
||||
{
|
||||
return feedback_;
|
||||
}
|
||||
|
||||
std::string FeedbackResult::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/MoveKnowledgeCategoryRequest.cc
Normal file
49
chatbot/src/model/MoveKnowledgeCategoryRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/MoveKnowledgeCategoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::MoveKnowledgeCategoryRequest;
|
||||
|
||||
MoveKnowledgeCategoryRequest::MoveKnowledgeCategoryRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "MoveKnowledgeCategory")
|
||||
{}
|
||||
|
||||
MoveKnowledgeCategoryRequest::~MoveKnowledgeCategoryRequest()
|
||||
{}
|
||||
|
||||
long MoveKnowledgeCategoryRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
void MoveKnowledgeCategoryRequest::setKnowledgeId(long knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setCoreParameter("KnowledgeId", std::to_string(knowledgeId));
|
||||
}
|
||||
|
||||
long MoveKnowledgeCategoryRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
void MoveKnowledgeCategoryRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/MoveKnowledgeCategoryResult.cc
Normal file
48
chatbot/src/model/MoveKnowledgeCategoryResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/MoveKnowledgeCategoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
MoveKnowledgeCategoryResult::MoveKnowledgeCategoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MoveKnowledgeCategoryResult::MoveKnowledgeCategoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MoveKnowledgeCategoryResult::~MoveKnowledgeCategoryResult()
|
||||
{}
|
||||
|
||||
void MoveKnowledgeCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/PublishDialogFlowRequest.cc
Normal file
38
chatbot/src/model/PublishDialogFlowRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/PublishDialogFlowRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::PublishDialogFlowRequest;
|
||||
|
||||
PublishDialogFlowRequest::PublishDialogFlowRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "PublishDialogFlow")
|
||||
{}
|
||||
|
||||
PublishDialogFlowRequest::~PublishDialogFlowRequest()
|
||||
{}
|
||||
|
||||
long PublishDialogFlowRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void PublishDialogFlowRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/PublishDialogFlowResult.cc
Normal file
48
chatbot/src/model/PublishDialogFlowResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/PublishDialogFlowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
PublishDialogFlowResult::PublishDialogFlowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PublishDialogFlowResult::PublishDialogFlowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PublishDialogFlowResult::~PublishDialogFlowResult()
|
||||
{}
|
||||
|
||||
void PublishDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/PublishKnowledgeRequest.cc
Normal file
38
chatbot/src/model/PublishKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/PublishKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::PublishKnowledgeRequest;
|
||||
|
||||
PublishKnowledgeRequest::PublishKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "PublishKnowledge")
|
||||
{}
|
||||
|
||||
PublishKnowledgeRequest::~PublishKnowledgeRequest()
|
||||
{}
|
||||
|
||||
long PublishKnowledgeRequest::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
void PublishKnowledgeRequest::setKnowledgeId(long knowledgeId)
|
||||
{
|
||||
knowledgeId_ = knowledgeId;
|
||||
setCoreParameter("KnowledgeId", std::to_string(knowledgeId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/PublishKnowledgeResult.cc
Normal file
48
chatbot/src/model/PublishKnowledgeResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/PublishKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
PublishKnowledgeResult::PublishKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PublishKnowledgeResult::PublishKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PublishKnowledgeResult::~PublishKnowledgeResult()
|
||||
{}
|
||||
|
||||
void PublishKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
chatbot/src/model/QueryCategoriesRequest.cc
Normal file
49
chatbot/src/model/QueryCategoriesRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryCategoriesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryCategoriesRequest;
|
||||
|
||||
QueryCategoriesRequest::QueryCategoriesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryCategories")
|
||||
{}
|
||||
|
||||
QueryCategoriesRequest::~QueryCategoriesRequest()
|
||||
{}
|
||||
|
||||
bool QueryCategoriesRequest::getShowChildrens()const
|
||||
{
|
||||
return showChildrens_;
|
||||
}
|
||||
|
||||
void QueryCategoriesRequest::setShowChildrens(bool showChildrens)
|
||||
{
|
||||
showChildrens_ = showChildrens;
|
||||
setCoreParameter("ShowChildrens", showChildrens ? "true" : "false");
|
||||
}
|
||||
|
||||
long QueryCategoriesRequest::getParentCategoryId()const
|
||||
{
|
||||
return parentCategoryId_;
|
||||
}
|
||||
|
||||
void QueryCategoriesRequest::setParentCategoryId(long parentCategoryId)
|
||||
{
|
||||
parentCategoryId_ = parentCategoryId;
|
||||
setCoreParameter("ParentCategoryId", std::to_string(parentCategoryId));
|
||||
}
|
||||
|
||||
68
chatbot/src/model/QueryCategoriesResult.cc
Normal file
68
chatbot/src/model/QueryCategoriesResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryCategoriesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryCategoriesResult::QueryCategoriesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryCategoriesResult::QueryCategoriesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryCategoriesResult::~QueryCategoriesResult()
|
||||
{}
|
||||
|
||||
void QueryCategoriesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCategories = value["Categories"]["Category"];
|
||||
for (auto value : allCategories)
|
||||
{
|
||||
Category categoriesObject;
|
||||
if(!value["CategoryId"].isNull())
|
||||
categoriesObject.categoryId = std::stol(value["CategoryId"].asString());
|
||||
if(!value["ParentCategoryId"].isNull())
|
||||
categoriesObject.parentCategoryId = std::stol(value["ParentCategoryId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
categoriesObject.name = value["Name"].asString();
|
||||
auto allChildrens = value["Childrens"]["Children"];
|
||||
for (auto value : allChildrens)
|
||||
categoriesObject.childrens.push_back(value.asString());
|
||||
categories_.push_back(categoriesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<QueryCategoriesResult::Category> QueryCategoriesResult::getCategories()const
|
||||
{
|
||||
return categories_;
|
||||
}
|
||||
|
||||
71
chatbot/src/model/QueryCoreWordsRequest.cc
Normal file
71
chatbot/src/model/QueryCoreWordsRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryCoreWordsRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryCoreWordsRequest;
|
||||
|
||||
QueryCoreWordsRequest::QueryCoreWordsRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryCoreWords")
|
||||
{}
|
||||
|
||||
QueryCoreWordsRequest::~QueryCoreWordsRequest()
|
||||
{}
|
||||
|
||||
std::string QueryCoreWordsRequest::getSynonym()const
|
||||
{
|
||||
return synonym_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setSynonym(const std::string& synonym)
|
||||
{
|
||||
synonym_ = synonym;
|
||||
setCoreParameter("Synonym", synonym);
|
||||
}
|
||||
|
||||
int QueryCoreWordsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryCoreWordsRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
int QueryCoreWordsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryCoreWordsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
91
chatbot/src/model/QueryCoreWordsResult.cc
Normal file
91
chatbot/src/model/QueryCoreWordsResult.cc
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryCoreWordsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryCoreWordsResult::QueryCoreWordsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryCoreWordsResult::QueryCoreWordsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryCoreWordsResult::~QueryCoreWordsResult()
|
||||
{}
|
||||
|
||||
void QueryCoreWordsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCoreWords = value["CoreWords"]["CoreWord"];
|
||||
for (auto value : allCoreWords)
|
||||
{
|
||||
CoreWord coreWordsObject;
|
||||
if(!value["CoreWordCode"].isNull())
|
||||
coreWordsObject.coreWordCode = value["CoreWordCode"].asString();
|
||||
if(!value["CoreWordName"].isNull())
|
||||
coreWordsObject.coreWordName = value["CoreWordName"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
coreWordsObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
coreWordsObject.createTime = value["CreateTime"].asString();
|
||||
auto allSynonyms = value["Synonyms"]["Synonym"];
|
||||
for (auto value : allSynonyms)
|
||||
coreWordsObject.synonyms.push_back(value.asString());
|
||||
coreWords_.push_back(coreWordsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int QueryCoreWordsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<QueryCoreWordsResult::CoreWord> QueryCoreWordsResult::getCoreWords()const
|
||||
{
|
||||
return coreWords_;
|
||||
}
|
||||
|
||||
int QueryCoreWordsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryCoreWordsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
71
chatbot/src/model/QueryDialogsRequest.cc
Normal file
71
chatbot/src/model/QueryDialogsRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryDialogsRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryDialogsRequest;
|
||||
|
||||
QueryDialogsRequest::QueryDialogsRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryDialogs")
|
||||
{}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setDialogName(const std::string& dialogName)
|
||||
{
|
||||
dialogName_ = dialogName;
|
||||
setCoreParameter("DialogName", dialogName);
|
||||
}
|
||||
|
||||
int QueryDialogsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryDialogsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
104
chatbot/src/model/QueryDialogsResult.cc
Normal file
104
chatbot/src/model/QueryDialogsResult.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryDialogsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryDialogsResult::QueryDialogsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryDialogsResult::QueryDialogsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryDialogsResult::~QueryDialogsResult()
|
||||
{}
|
||||
|
||||
void QueryDialogsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDialogs = value["Dialogs"]["Dialog"];
|
||||
for (auto value : allDialogs)
|
||||
{
|
||||
Dialog dialogsObject;
|
||||
if(!value["DialogId"].isNull())
|
||||
dialogsObject.dialogId = std::stol(value["DialogId"].asString());
|
||||
if(!value["DialogName"].isNull())
|
||||
dialogsObject.dialogName = value["DialogName"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
dialogsObject.description = value["Description"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
dialogsObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
dialogsObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
dialogsObject.createUserId = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
dialogsObject.createUserName = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
dialogsObject.modifyUserId = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
dialogsObject.modifyUserName = value["ModifyUserName"].asString();
|
||||
if(!value["IsSampleDialog"].isNull())
|
||||
dialogsObject.isSampleDialog = value["IsSampleDialog"].asString() == "true";
|
||||
if(!value["Status"].isNull())
|
||||
dialogsObject.status = std::stoi(value["Status"].asString());
|
||||
if(!value["IsOnline"].isNull())
|
||||
dialogsObject.isOnline = value["IsOnline"].asString() == "true";
|
||||
dialogs_.push_back(dialogsObject);
|
||||
}
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int QueryDialogsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int QueryDialogsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
std::vector<QueryDialogsResult::Dialog> QueryDialogsResult::getDialogs()const
|
||||
{
|
||||
return dialogs_;
|
||||
}
|
||||
|
||||
int QueryDialogsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
71
chatbot/src/model/QueryEntitiesRequest.cc
Normal file
71
chatbot/src/model/QueryEntitiesRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryEntitiesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryEntitiesRequest;
|
||||
|
||||
QueryEntitiesRequest::QueryEntitiesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryEntities")
|
||||
{}
|
||||
|
||||
QueryEntitiesRequest::~QueryEntitiesRequest()
|
||||
{}
|
||||
|
||||
std::string QueryEntitiesRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void QueryEntitiesRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = 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_;
|
||||
}
|
||||
|
||||
void QueryEntitiesRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
int QueryEntitiesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryEntitiesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
111
chatbot/src/model/QueryEntitiesResult.cc
Normal file
111
chatbot/src/model/QueryEntitiesResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryEntitiesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryEntitiesResult::QueryEntitiesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryEntitiesResult::QueryEntitiesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryEntitiesResult::~QueryEntitiesResult()
|
||||
{}
|
||||
|
||||
void QueryEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEntities = value["Entities"]["Entity"];
|
||||
for (auto value : allEntities)
|
||||
{
|
||||
Entity entitiesObject;
|
||||
if(!value["EntityId"].isNull())
|
||||
entitiesObject.entityId = std::stol(value["EntityId"].asString());
|
||||
if(!value["EntityName"].isNull())
|
||||
entitiesObject.entityName = value["EntityName"].asString();
|
||||
if(!value["EntityType"].isNull())
|
||||
entitiesObject.entityType = value["EntityType"].asString();
|
||||
if(!value["Regex"].isNull())
|
||||
entitiesObject.regex = value["Regex"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
entitiesObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
entitiesObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
entitiesObject.createUserId = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
entitiesObject.createUserName = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
entitiesObject.modifyUserId = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
entitiesObject.modifyUserName = value["ModifyUserName"].asString();
|
||||
auto allMembers = value["Members"]["MembersItem"];
|
||||
for (auto value : allMembers)
|
||||
{
|
||||
Entity::MembersItem membersObject;
|
||||
if(!value["MemberName"].isNull())
|
||||
membersObject.memberName = value["MemberName"].asString();
|
||||
auto allSynonyms = value["Synonyms"]["Synonyms"];
|
||||
for (auto value : allSynonyms)
|
||||
membersObject.synonyms.push_back(value.asString());
|
||||
entitiesObject.members.push_back(membersObject);
|
||||
}
|
||||
entities_.push_back(entitiesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int QueryEntitiesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int QueryEntitiesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryEntitiesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<QueryEntitiesResult::Entity> QueryEntitiesResult::getEntities()const
|
||||
{
|
||||
return entities_;
|
||||
}
|
||||
|
||||
71
chatbot/src/model/QueryIntentsRequest.cc
Normal file
71
chatbot/src/model/QueryIntentsRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryIntentsRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryIntentsRequest;
|
||||
|
||||
QueryIntentsRequest::QueryIntentsRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryIntents")
|
||||
{}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
int QueryIntentsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryIntentsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
163
chatbot/src/model/QueryIntentsResult.cc
Normal file
163
chatbot/src/model/QueryIntentsResult.cc
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryIntentsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryIntentsResult::QueryIntentsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryIntentsResult::QueryIntentsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryIntentsResult::~QueryIntentsResult()
|
||||
{}
|
||||
|
||||
void QueryIntentsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allIntents = value["Intents"]["Intent"];
|
||||
for (auto value : allIntents)
|
||||
{
|
||||
Intent intentsObject;
|
||||
if(!value["IntentId"].isNull())
|
||||
intentsObject.intentId = std::stol(value["IntentId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
intentsObject.name = value["Name"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
intentsObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
intentsObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateUserId"].isNull())
|
||||
intentsObject.createUserId = value["CreateUserId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
intentsObject.createUserName = value["CreateUserName"].asString();
|
||||
if(!value["ModifyUserId"].isNull())
|
||||
intentsObject.modifyUserId = value["ModifyUserId"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
intentsObject.modifyUserName = value["ModifyUserName"].asString();
|
||||
auto allUserSay = value["UserSay"]["UserSayItem"];
|
||||
for (auto value : allUserSay)
|
||||
{
|
||||
Intent::UserSayItem userSayObject;
|
||||
if(!value["Strict"].isNull())
|
||||
userSayObject.strict = value["Strict"].asString() == "true";
|
||||
if(!value["UserSayId"].isNull())
|
||||
userSayObject.userSayId = value["UserSayId"].asString();
|
||||
auto allData = value["Data"]["DataItem"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Intent::UserSayItem::DataItem dataObject;
|
||||
if(!value["Text"].isNull())
|
||||
dataObject.text = value["Text"].asString();
|
||||
if(!value["SlotId"].isNull())
|
||||
dataObject.slotId = value["SlotId"].asString();
|
||||
userSayObject.data.push_back(dataObject);
|
||||
}
|
||||
intentsObject.userSay.push_back(userSayObject);
|
||||
}
|
||||
auto allRuleCheck = value["RuleCheck"]["RuleCheckItem"];
|
||||
for (auto value : allRuleCheck)
|
||||
{
|
||||
Intent::RuleCheckItem ruleCheckObject;
|
||||
if(!value["Text"].isNull())
|
||||
ruleCheckObject.text = value["Text"].asString();
|
||||
if(!value["Strict"].isNull())
|
||||
ruleCheckObject.strict = value["Strict"].asString() == "true";
|
||||
auto allWarning = value["Warning"]["Warning"];
|
||||
for (auto value : allWarning)
|
||||
ruleCheckObject.warning.push_back(value.asString());
|
||||
auto allError = value["Error"]["Error"];
|
||||
for (auto value : allError)
|
||||
ruleCheckObject.error.push_back(value.asString());
|
||||
intentsObject.ruleCheck.push_back(ruleCheckObject);
|
||||
}
|
||||
auto allSlot = value["Slot"]["SlotItem"];
|
||||
for (auto value : allSlot)
|
||||
{
|
||||
Intent::SlotItem slotObject;
|
||||
if(!value["Name"].isNull())
|
||||
slotObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
slotObject.value = value["Value"].asString();
|
||||
if(!value["IsNecessary"].isNull())
|
||||
slotObject.isNecessary = value["IsNecessary"].asString() == "true";
|
||||
if(!value["IsArray"].isNull())
|
||||
slotObject.isArray = value["IsArray"].asString() == "true";
|
||||
if(!value["LifeSpan"].isNull())
|
||||
slotObject.lifeSpan = std::stoi(value["LifeSpan"].asString());
|
||||
if(!value["SlotId"].isNull())
|
||||
slotObject.slotId = value["SlotId"].asString();
|
||||
auto allTags = value["Tags"]["TagsItem"];
|
||||
for (auto value : allTags)
|
||||
{
|
||||
Intent::SlotItem::TagsItem tagsObject;
|
||||
if(!value["Value"].isNull())
|
||||
tagsObject.value = value["Value"].asString();
|
||||
if(!value["UserSayId"].isNull())
|
||||
tagsObject.userSayId = value["UserSayId"].asString();
|
||||
slotObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allQuestion = value["Question"]["Question"];
|
||||
for (auto value : allQuestion)
|
||||
slotObject.question.push_back(value.asString());
|
||||
intentsObject.slot.push_back(slotObject);
|
||||
}
|
||||
intents_.push_back(intentsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int QueryIntentsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int QueryIntentsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryIntentsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<QueryIntentsResult::Intent> QueryIntentsResult::getIntents()const
|
||||
{
|
||||
return intents_;
|
||||
}
|
||||
|
||||
82
chatbot/src/model/QueryKnowledgesRequest.cc
Normal file
82
chatbot/src/model/QueryKnowledgesRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryKnowledgesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryKnowledgesRequest;
|
||||
|
||||
QueryKnowledgesRequest::QueryKnowledgesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryKnowledges")
|
||||
{}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setKnowledgeTitle(const std::string& knowledgeTitle)
|
||||
{
|
||||
knowledgeTitle_ = knowledgeTitle;
|
||||
setCoreParameter("KnowledgeTitle", knowledgeTitle);
|
||||
}
|
||||
|
||||
int QueryKnowledgesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
long QueryKnowledgesRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
void QueryKnowledgesRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
105
chatbot/src/model/QueryKnowledgesResult.cc
Normal file
105
chatbot/src/model/QueryKnowledgesResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryKnowledgesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryKnowledgesResult::QueryKnowledgesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryKnowledgesResult::QueryKnowledgesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryKnowledgesResult::~QueryKnowledgesResult()
|
||||
{}
|
||||
|
||||
void QueryKnowledgesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKnowledges = value["Knowledges"]["Knowledge"];
|
||||
for (auto value : allKnowledges)
|
||||
{
|
||||
Knowledge knowledgesObject;
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgesObject.knowledgeId = std::stol(value["KnowledgeId"].asString());
|
||||
if(!value["ModifyTime"].isNull())
|
||||
knowledgesObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
knowledgesObject.modifyUserName = value["ModifyUserName"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
knowledgesObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
knowledgesObject.createUserName = value["CreateUserName"].asString();
|
||||
if(!value["CategoryId"].isNull())
|
||||
knowledgesObject.categoryId = std::stol(value["CategoryId"].asString());
|
||||
if(!value["KnowledgeStatus"].isNull())
|
||||
knowledgesObject.knowledgeStatus = std::stoi(value["KnowledgeStatus"].asString());
|
||||
if(!value["KnowledgeTitle"].isNull())
|
||||
knowledgesObject.knowledgeTitle = value["KnowledgeTitle"].asString();
|
||||
if(!value["StartDate"].isNull())
|
||||
knowledgesObject.startDate = value["StartDate"].asString();
|
||||
if(!value["EndDate"].isNull())
|
||||
knowledgesObject.endDate = value["EndDate"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
knowledgesObject.version = value["Version"].asString();
|
||||
auto allCoreWords = value["CoreWords"]["CoreWord"];
|
||||
for (auto value : allCoreWords)
|
||||
knowledgesObject.coreWords.push_back(value.asString());
|
||||
knowledges_.push_back(knowledgesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int QueryKnowledgesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int QueryKnowledgesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryKnowledgesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<QueryKnowledgesResult::Knowledge> QueryKnowledgesResult::getKnowledges()const
|
||||
{
|
||||
return knowledges_;
|
||||
}
|
||||
|
||||
27
chatbot/src/model/QueryPerspectivesRequest.cc
Normal file
27
chatbot/src/model/QueryPerspectivesRequest.cc
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryPerspectivesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QueryPerspectivesRequest;
|
||||
|
||||
QueryPerspectivesRequest::QueryPerspectivesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QueryPerspectives")
|
||||
{}
|
||||
|
||||
QueryPerspectivesRequest::~QueryPerspectivesRequest()
|
||||
{}
|
||||
|
||||
77
chatbot/src/model/QueryPerspectivesResult.cc
Normal file
77
chatbot/src/model/QueryPerspectivesResult.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QueryPerspectivesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QueryPerspectivesResult::QueryPerspectivesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryPerspectivesResult::QueryPerspectivesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryPerspectivesResult::~QueryPerspectivesResult()
|
||||
{}
|
||||
|
||||
void QueryPerspectivesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPerspectives = value["Perspectives"]["Perspective"];
|
||||
for (auto value : allPerspectives)
|
||||
{
|
||||
Perspective perspectivesObject;
|
||||
if(!value["ModifyUserName"].isNull())
|
||||
perspectivesObject.modifyUserName = value["ModifyUserName"].asString();
|
||||
if(!value["ModifyTime"].isNull())
|
||||
perspectivesObject.modifyTime = value["ModifyTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
perspectivesObject.createTime = value["CreateTime"].asString();
|
||||
if(!value["SelfDefine"].isNull())
|
||||
perspectivesObject.selfDefine = value["SelfDefine"].asString();
|
||||
if(!value["PerspectiveId"].isNull())
|
||||
perspectivesObject.perspectiveId = value["PerspectiveId"].asString();
|
||||
if(!value["CreateUserName"].isNull())
|
||||
perspectivesObject.createUserName = value["CreateUserName"].asString();
|
||||
if(!value["PerspectiveCode"].isNull())
|
||||
perspectivesObject.perspectiveCode = value["PerspectiveCode"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
perspectivesObject.status = std::stoi(value["Status"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
perspectivesObject.name = value["Name"].asString();
|
||||
perspectives_.push_back(perspectivesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<QueryPerspectivesResult::Perspective> QueryPerspectivesResult::getPerspectives()const
|
||||
{
|
||||
return perspectives_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/QuerySystemEntitiesRequest.cc
Normal file
38
chatbot/src/model/QuerySystemEntitiesRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QuerySystemEntitiesRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::QuerySystemEntitiesRequest;
|
||||
|
||||
QuerySystemEntitiesRequest::QuerySystemEntitiesRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "QuerySystemEntities")
|
||||
{}
|
||||
|
||||
QuerySystemEntitiesRequest::~QuerySystemEntitiesRequest()
|
||||
{}
|
||||
|
||||
std::string QuerySystemEntitiesRequest::getEntityName()const
|
||||
{
|
||||
return entityName_;
|
||||
}
|
||||
|
||||
void QuerySystemEntitiesRequest::setEntityName(const std::string& entityName)
|
||||
{
|
||||
entityName_ = entityName;
|
||||
setCoreParameter("EntityName", entityName);
|
||||
}
|
||||
|
||||
65
chatbot/src/model/QuerySystemEntitiesResult.cc
Normal file
65
chatbot/src/model/QuerySystemEntitiesResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/QuerySystemEntitiesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
QuerySystemEntitiesResult::QuerySystemEntitiesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QuerySystemEntitiesResult::QuerySystemEntitiesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QuerySystemEntitiesResult::~QuerySystemEntitiesResult()
|
||||
{}
|
||||
|
||||
void QuerySystemEntitiesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSystemEntities = value["SystemEntities"]["Entity"];
|
||||
for (auto value : allSystemEntities)
|
||||
{
|
||||
Entity systemEntitiesObject;
|
||||
if(!value["DefaultQuestion"].isNull())
|
||||
systemEntitiesObject.defaultQuestion = value["DefaultQuestion"].asString();
|
||||
if(!value["EntityName"].isNull())
|
||||
systemEntitiesObject.entityName = value["EntityName"].asString();
|
||||
if(!value["EntityCode"].isNull())
|
||||
systemEntitiesObject.entityCode = value["EntityCode"].asString();
|
||||
systemEntities_.push_back(systemEntitiesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<QuerySystemEntitiesResult::Entity> QuerySystemEntitiesResult::getSystemEntities()const
|
||||
{
|
||||
return systemEntities_;
|
||||
}
|
||||
|
||||
60
chatbot/src/model/RemoveEntityMemberRequest.cc
Normal file
60
chatbot/src/model/RemoveEntityMemberRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/RemoveEntityMemberRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::RemoveEntityMemberRequest;
|
||||
|
||||
RemoveEntityMemberRequest::RemoveEntityMemberRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "RemoveEntityMember")
|
||||
{}
|
||||
|
||||
RemoveEntityMemberRequest::~RemoveEntityMemberRequest()
|
||||
{}
|
||||
|
||||
std::string RemoveEntityMemberRequest::getRemoveType()const
|
||||
{
|
||||
return removeType_;
|
||||
}
|
||||
|
||||
void RemoveEntityMemberRequest::setRemoveType(const std::string& removeType)
|
||||
{
|
||||
removeType_ = removeType;
|
||||
setCoreParameter("RemoveType", removeType);
|
||||
}
|
||||
|
||||
std::string RemoveEntityMemberRequest::getMember()const
|
||||
{
|
||||
return member_;
|
||||
}
|
||||
|
||||
void RemoveEntityMemberRequest::setMember(const std::string& member)
|
||||
{
|
||||
member_ = member;
|
||||
setCoreParameter("Member", member);
|
||||
}
|
||||
|
||||
long RemoveEntityMemberRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void RemoveEntityMemberRequest::setEntityId(long entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setCoreParameter("EntityId", std::to_string(entityId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/RemoveEntityMemberResult.cc
Normal file
55
chatbot/src/model/RemoveEntityMemberResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/RemoveEntityMemberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
RemoveEntityMemberResult::RemoveEntityMemberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RemoveEntityMemberResult::RemoveEntityMemberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RemoveEntityMemberResult::~RemoveEntityMemberResult()
|
||||
{}
|
||||
|
||||
void RemoveEntityMemberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RemoveEntityMemberResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/RemoveSynonymRequest.cc
Normal file
49
chatbot/src/model/RemoveSynonymRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/RemoveSynonymRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::RemoveSynonymRequest;
|
||||
|
||||
RemoveSynonymRequest::RemoveSynonymRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "RemoveSynonym")
|
||||
{}
|
||||
|
||||
RemoveSynonymRequest::~RemoveSynonymRequest()
|
||||
{}
|
||||
|
||||
std::string RemoveSynonymRequest::getSynonym()const
|
||||
{
|
||||
return synonym_;
|
||||
}
|
||||
|
||||
void RemoveSynonymRequest::setSynonym(const std::string& synonym)
|
||||
{
|
||||
synonym_ = synonym;
|
||||
setCoreParameter("Synonym", synonym);
|
||||
}
|
||||
|
||||
std::string RemoveSynonymRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void RemoveSynonymRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
48
chatbot/src/model/RemoveSynonymResult.cc
Normal file
48
chatbot/src/model/RemoveSynonymResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/RemoveSynonymResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
RemoveSynonymResult::RemoveSynonymResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RemoveSynonymResult::RemoveSynonymResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RemoveSynonymResult::~RemoveSynonymResult()
|
||||
{}
|
||||
|
||||
void RemoveSynonymResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
38
chatbot/src/model/TestDialogFlowRequest.cc
Normal file
38
chatbot/src/model/TestDialogFlowRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/TestDialogFlowRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::TestDialogFlowRequest;
|
||||
|
||||
TestDialogFlowRequest::TestDialogFlowRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "TestDialogFlow")
|
||||
{}
|
||||
|
||||
TestDialogFlowRequest::~TestDialogFlowRequest()
|
||||
{}
|
||||
|
||||
long TestDialogFlowRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void TestDialogFlowRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/TestDialogFlowResult.cc
Normal file
48
chatbot/src/model/TestDialogFlowResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/TestDialogFlowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
TestDialogFlowResult::TestDialogFlowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TestDialogFlowResult::TestDialogFlowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TestDialogFlowResult::~TestDialogFlowResult()
|
||||
{}
|
||||
|
||||
void TestDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
chatbot/src/model/UpdateCategoryRequest.cc
Normal file
49
chatbot/src/model/UpdateCategoryRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateCategoryRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateCategoryRequest;
|
||||
|
||||
UpdateCategoryRequest::UpdateCategoryRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateCategory")
|
||||
{}
|
||||
|
||||
UpdateCategoryRequest::~UpdateCategoryRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCategoryRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void UpdateCategoryRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
long UpdateCategoryRequest::getCategoryId()const
|
||||
{
|
||||
return categoryId_;
|
||||
}
|
||||
|
||||
void UpdateCategoryRequest::setCategoryId(long categoryId)
|
||||
{
|
||||
categoryId_ = categoryId;
|
||||
setCoreParameter("CategoryId", std::to_string(categoryId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/UpdateCategoryResult.cc
Normal file
55
chatbot/src/model/UpdateCategoryResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateCategoryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateCategoryResult::UpdateCategoryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCategoryResult::UpdateCategoryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCategoryResult::~UpdateCategoryResult()
|
||||
{}
|
||||
|
||||
void UpdateCategoryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool UpdateCategoryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/UpdateCoreWordRequest.cc
Normal file
49
chatbot/src/model/UpdateCoreWordRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateCoreWordRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateCoreWordRequest;
|
||||
|
||||
UpdateCoreWordRequest::UpdateCoreWordRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateCoreWord")
|
||||
{}
|
||||
|
||||
UpdateCoreWordRequest::~UpdateCoreWordRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCoreWordRequest::getCoreWordName()const
|
||||
{
|
||||
return coreWordName_;
|
||||
}
|
||||
|
||||
void UpdateCoreWordRequest::setCoreWordName(const std::string& coreWordName)
|
||||
{
|
||||
coreWordName_ = coreWordName;
|
||||
setCoreParameter("CoreWordName", coreWordName);
|
||||
}
|
||||
|
||||
std::string UpdateCoreWordRequest::getCoreWordCode()const
|
||||
{
|
||||
return coreWordCode_;
|
||||
}
|
||||
|
||||
void UpdateCoreWordRequest::setCoreWordCode(const std::string& coreWordCode)
|
||||
{
|
||||
coreWordCode_ = coreWordCode;
|
||||
setCoreParameter("CoreWordCode", coreWordCode);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/UpdateCoreWordResult.cc
Normal file
55
chatbot/src/model/UpdateCoreWordResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateCoreWordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateCoreWordResult::UpdateCoreWordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCoreWordResult::UpdateCoreWordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCoreWordResult::~UpdateCoreWordResult()
|
||||
{}
|
||||
|
||||
void UpdateCoreWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool UpdateCoreWordResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/UpdateDialogFlowRequest.cc
Normal file
49
chatbot/src/model/UpdateDialogFlowRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateDialogFlowRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateDialogFlowRequest;
|
||||
|
||||
UpdateDialogFlowRequest::UpdateDialogFlowRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateDialogFlow")
|
||||
{}
|
||||
|
||||
UpdateDialogFlowRequest::~UpdateDialogFlowRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateDialogFlowRequest::getModuleDefinition()const
|
||||
{
|
||||
return moduleDefinition_;
|
||||
}
|
||||
|
||||
void UpdateDialogFlowRequest::setModuleDefinition(const std::string& moduleDefinition)
|
||||
{
|
||||
moduleDefinition_ = moduleDefinition;
|
||||
setCoreParameter("ModuleDefinition", moduleDefinition);
|
||||
}
|
||||
|
||||
long UpdateDialogFlowRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void UpdateDialogFlowRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
48
chatbot/src/model/UpdateDialogFlowResult.cc
Normal file
48
chatbot/src/model/UpdateDialogFlowResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateDialogFlowResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateDialogFlowResult::UpdateDialogFlowResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateDialogFlowResult::UpdateDialogFlowResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateDialogFlowResult::~UpdateDialogFlowResult()
|
||||
{}
|
||||
|
||||
void UpdateDialogFlowResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
chatbot/src/model/UpdateDialogRequest.cc
Normal file
60
chatbot/src/model/UpdateDialogRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateDialogRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateDialogRequest;
|
||||
|
||||
UpdateDialogRequest::UpdateDialogRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateDialog")
|
||||
{}
|
||||
|
||||
UpdateDialogRequest::~UpdateDialogRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateDialogRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateDialogRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
long UpdateDialogRequest::getDialogId()const
|
||||
{
|
||||
return dialogId_;
|
||||
}
|
||||
|
||||
void UpdateDialogRequest::setDialogId(long dialogId)
|
||||
{
|
||||
dialogId_ = dialogId;
|
||||
setCoreParameter("DialogId", std::to_string(dialogId));
|
||||
}
|
||||
|
||||
std::string UpdateDialogRequest::getDialogName()const
|
||||
{
|
||||
return dialogName_;
|
||||
}
|
||||
|
||||
void UpdateDialogRequest::setDialogName(const std::string& dialogName)
|
||||
{
|
||||
dialogName_ = dialogName;
|
||||
setCoreParameter("DialogName", dialogName);
|
||||
}
|
||||
|
||||
48
chatbot/src/model/UpdateDialogResult.cc
Normal file
48
chatbot/src/model/UpdateDialogResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateDialogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateDialogResult::UpdateDialogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateDialogResult::UpdateDialogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateDialogResult::~UpdateDialogResult()
|
||||
{}
|
||||
|
||||
void UpdateDialogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
82
chatbot/src/model/UpdateEntityRequest.cc
Normal file
82
chatbot/src/model/UpdateEntityRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateEntityRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateEntityRequest;
|
||||
|
||||
UpdateEntityRequest::UpdateEntityRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateEntity")
|
||||
{}
|
||||
|
||||
UpdateEntityRequest::~UpdateEntityRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateEntityRequest::getRegex()const
|
||||
{
|
||||
return regex_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setRegex(const std::string& regex)
|
||||
{
|
||||
regex_ = regex;
|
||||
setCoreParameter("Regex", regex);
|
||||
}
|
||||
|
||||
std::string UpdateEntityRequest::getEntityType()const
|
||||
{
|
||||
return entityType_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setEntityType(const std::string& entityType)
|
||||
{
|
||||
entityType_ = entityType;
|
||||
setCoreParameter("EntityType", entityType);
|
||||
}
|
||||
|
||||
std::string UpdateEntityRequest::getMembers()const
|
||||
{
|
||||
return members_;
|
||||
}
|
||||
|
||||
void UpdateEntityRequest::setMembers(const std::string& members)
|
||||
{
|
||||
members_ = 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));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/UpdateEntityResult.cc
Normal file
55
chatbot/src/model/UpdateEntityResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateEntityResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateEntityResult::UpdateEntityResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateEntityResult::UpdateEntityResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateEntityResult::~UpdateEntityResult()
|
||||
{}
|
||||
|
||||
void UpdateEntityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EntityId"].isNull())
|
||||
entityId_ = value["EntityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateEntityResult::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/UpdateIntentRequest.cc
Normal file
49
chatbot/src/model/UpdateIntentRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateIntentRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateIntentRequest;
|
||||
|
||||
UpdateIntentRequest::UpdateIntentRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateIntent")
|
||||
{}
|
||||
|
||||
UpdateIntentRequest::~UpdateIntentRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateIntentRequest::getIntentDefinition()const
|
||||
{
|
||||
return intentDefinition_;
|
||||
}
|
||||
|
||||
void UpdateIntentRequest::setIntentDefinition(const std::string& intentDefinition)
|
||||
{
|
||||
intentDefinition_ = intentDefinition;
|
||||
setCoreParameter("IntentDefinition", intentDefinition);
|
||||
}
|
||||
|
||||
long UpdateIntentRequest::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
void UpdateIntentRequest::setIntentId(long intentId)
|
||||
{
|
||||
intentId_ = intentId;
|
||||
setCoreParameter("IntentId", std::to_string(intentId));
|
||||
}
|
||||
|
||||
55
chatbot/src/model/UpdateIntentResult.cc
Normal file
55
chatbot/src/model/UpdateIntentResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateIntentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateIntentResult::UpdateIntentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateIntentResult::UpdateIntentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateIntentResult::~UpdateIntentResult()
|
||||
{}
|
||||
|
||||
void UpdateIntentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["IntentId"].isNull())
|
||||
intentId_ = value["IntentId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateIntentResult::getIntentId()const
|
||||
{
|
||||
return intentId_;
|
||||
}
|
||||
|
||||
38
chatbot/src/model/UpdateKnowledgeRequest.cc
Normal file
38
chatbot/src/model/UpdateKnowledgeRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateKnowledgeRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdateKnowledgeRequest;
|
||||
|
||||
UpdateKnowledgeRequest::UpdateKnowledgeRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdateKnowledge")
|
||||
{}
|
||||
|
||||
UpdateKnowledgeRequest::~UpdateKnowledgeRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateKnowledgeRequest::getKnowledge()const
|
||||
{
|
||||
return knowledge_;
|
||||
}
|
||||
|
||||
void UpdateKnowledgeRequest::setKnowledge(const std::string& knowledge)
|
||||
{
|
||||
knowledge_ = knowledge;
|
||||
setCoreParameter("Knowledge", knowledge);
|
||||
}
|
||||
|
||||
55
chatbot/src/model/UpdateKnowledgeResult.cc
Normal file
55
chatbot/src/model/UpdateKnowledgeResult.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdateKnowledgeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdateKnowledgeResult::UpdateKnowledgeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateKnowledgeResult::UpdateKnowledgeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateKnowledgeResult::~UpdateKnowledgeResult()
|
||||
{}
|
||||
|
||||
void UpdateKnowledgeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["KnowledgeId"].isNull())
|
||||
knowledgeId_ = std::stol(value["KnowledgeId"].asString());
|
||||
|
||||
}
|
||||
|
||||
long UpdateKnowledgeResult::getKnowledgeId()const
|
||||
{
|
||||
return knowledgeId_;
|
||||
}
|
||||
|
||||
49
chatbot/src/model/UpdatePerspectiveRequest.cc
Normal file
49
chatbot/src/model/UpdatePerspectiveRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdatePerspectiveRequest.h>
|
||||
|
||||
using AlibabaCloud::Chatbot::Model::UpdatePerspectiveRequest;
|
||||
|
||||
UpdatePerspectiveRequest::UpdatePerspectiveRequest() :
|
||||
RpcServiceRequest("chatbot", "2017-10-11", "UpdatePerspective")
|
||||
{}
|
||||
|
||||
UpdatePerspectiveRequest::~UpdatePerspectiveRequest()
|
||||
{}
|
||||
|
||||
std::string UpdatePerspectiveRequest::getPerspectiveId()const
|
||||
{
|
||||
return perspectiveId_;
|
||||
}
|
||||
|
||||
void UpdatePerspectiveRequest::setPerspectiveId(const std::string& perspectiveId)
|
||||
{
|
||||
perspectiveId_ = perspectiveId;
|
||||
setCoreParameter("PerspectiveId", perspectiveId);
|
||||
}
|
||||
|
||||
std::string UpdatePerspectiveRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void UpdatePerspectiveRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setCoreParameter("Name", name);
|
||||
}
|
||||
|
||||
48
chatbot/src/model/UpdatePerspectiveResult.cc
Normal file
48
chatbot/src/model/UpdatePerspectiveResult.cc
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/chatbot/model/UpdatePerspectiveResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Chatbot;
|
||||
using namespace AlibabaCloud::Chatbot::Model;
|
||||
|
||||
UpdatePerspectiveResult::UpdatePerspectiveResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdatePerspectiveResult::UpdatePerspectiveResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdatePerspectiveResult::~UpdatePerspectiveResult()
|
||||
{}
|
||||
|
||||
void UpdatePerspectiveResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user