regenerate code

This commit is contained in:
wb-hx510875
2020-03-26 17:27:13 +08:00
committed by Axios
parent cba94f2119
commit f0c2600a26
6249 changed files with 188711 additions and 43443 deletions

View File

@@ -51,6 +51,42 @@ VoiceNavigatorClient::VoiceNavigatorClient(const std::string & accessKeyId, cons
VoiceNavigatorClient::~VoiceNavigatorClient()
{}
VoiceNavigatorClient::AssociateChatbotInstanceOutcome VoiceNavigatorClient::associateChatbotInstance(const AssociateChatbotInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AssociateChatbotInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AssociateChatbotInstanceOutcome(AssociateChatbotInstanceResult(outcome.result()));
else
return AssociateChatbotInstanceOutcome(outcome.error());
}
void VoiceNavigatorClient::associateChatbotInstanceAsync(const AssociateChatbotInstanceRequest& request, const AssociateChatbotInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, associateChatbotInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
VoiceNavigatorClient::AssociateChatbotInstanceOutcomeCallable VoiceNavigatorClient::associateChatbotInstanceCallable(const AssociateChatbotInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AssociateChatbotInstanceOutcome()>>(
[this, request]()
{
return this->associateChatbotInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VoiceNavigatorClient::AuditTTSVoiceOutcome VoiceNavigatorClient::auditTTSVoice(const AuditTTSVoiceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1347,6 +1383,42 @@ VoiceNavigatorClient::ListCategoriesOutcomeCallable VoiceNavigatorClient::listCa
return task->get_future();
}
VoiceNavigatorClient::ListChatbotInstancesOutcome VoiceNavigatorClient::listChatbotInstances(const ListChatbotInstancesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListChatbotInstancesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListChatbotInstancesOutcome(ListChatbotInstancesResult(outcome.result()));
else
return ListChatbotInstancesOutcome(outcome.error());
}
void VoiceNavigatorClient::listChatbotInstancesAsync(const ListChatbotInstancesRequest& request, const ListChatbotInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listChatbotInstances(request), context);
};
asyncExecute(new Runnable(fn));
}
VoiceNavigatorClient::ListChatbotInstancesOutcomeCallable VoiceNavigatorClient::listChatbotInstancesCallable(const ListChatbotInstancesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListChatbotInstancesOutcome()>>(
[this, request]()
{
return this->listChatbotInstances(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VoiceNavigatorClient::ListConversationDetailsOutcome VoiceNavigatorClient::listConversationDetails(const ListConversationDetailsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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/voicenavigator/model/AssociateChatbotInstanceRequest.h>
using AlibabaCloud::VoiceNavigator::Model::AssociateChatbotInstanceRequest;
AssociateChatbotInstanceRequest::AssociateChatbotInstanceRequest() :
RpcServiceRequest("voicenavigator", "2018-06-12", "AssociateChatbotInstance")
{
setMethod(HttpRequest::Method::Post);
}
AssociateChatbotInstanceRequest::~AssociateChatbotInstanceRequest()
{}
std::string AssociateChatbotInstanceRequest::getInstanceId()const
{
return instanceId_;
}
void AssociateChatbotInstanceRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string AssociateChatbotInstanceRequest::getChatbotInstanceId()const
{
return chatbotInstanceId_;
}
void AssociateChatbotInstanceRequest::setChatbotInstanceId(const std::string& chatbotInstanceId)
{
chatbotInstanceId_ = chatbotInstanceId;
setParameter("ChatbotInstanceId", chatbotInstanceId);
}
std::string AssociateChatbotInstanceRequest::getChatbotName()const
{
return chatbotName_;
}
void AssociateChatbotInstanceRequest::setChatbotName(const std::string& chatbotName)
{
chatbotName_ = chatbotName;
setParameter("ChatbotName", chatbotName);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/voicenavigator/model/AssociateChatbotInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::VoiceNavigator;
using namespace AlibabaCloud::VoiceNavigator::Model;
AssociateChatbotInstanceResult::AssociateChatbotInstanceResult() :
ServiceResult()
{}
AssociateChatbotInstanceResult::AssociateChatbotInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssociateChatbotInstanceResult::~AssociateChatbotInstanceResult()
{}
void AssociateChatbotInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -82,3 +82,14 @@ void CreateInstanceRequest::setNluServiceType(const std::string& nluServiceType)
setParameter("NluServiceType", nluServiceType);
}
std::string CreateInstanceRequest::getChatbotName()const
{
return chatbotName_;
}
void CreateInstanceRequest::setChatbotName(const std::string& chatbotName)
{
chatbotName_ = chatbotName;
setParameter("ChatbotName", chatbotName);
}

View File

@@ -27,6 +27,28 @@ DebugBeginDialogueRequest::DebugBeginDialogueRequest() :
DebugBeginDialogueRequest::~DebugBeginDialogueRequest()
{}
std::string DebugBeginDialogueRequest::getConversationId()const
{
return conversationId_;
}
void DebugBeginDialogueRequest::setConversationId(const std::string& conversationId)
{
conversationId_ = conversationId;
setParameter("ConversationId", conversationId);
}
std::string DebugBeginDialogueRequest::getInitialContext()const
{
return initialContext_;
}
void DebugBeginDialogueRequest::setInitialContext(const std::string& initialContext)
{
initialContext_ = initialContext;
setParameter("InitialContext", initialContext);
}
std::string DebugBeginDialogueRequest::getCallingNumber()const
{
return callingNumber_;
@@ -60,25 +82,3 @@ void DebugBeginDialogueRequest::setCalledNumber(const std::string& calledNumber)
setParameter("CalledNumber", calledNumber);
}
std::string DebugBeginDialogueRequest::getConversationId()const
{
return conversationId_;
}
void DebugBeginDialogueRequest::setConversationId(const std::string& conversationId)
{
conversationId_ = conversationId;
setParameter("ConversationId", conversationId);
}
std::string DebugBeginDialogueRequest::getInitialContext()const
{
return initialContext_;
}
void DebugBeginDialogueRequest::setInitialContext(const std::string& initialContext)
{
initialContext_ = initialContext;
setParameter("InitialContext", initialContext);
}

View File

@@ -39,27 +39,27 @@ void DebugBeginDialogueResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TextResponse"].isNull())
textResponse_ = value["TextResponse"].asString();
if(!value["Interruptible"].isNull())
interruptible_ = value["Interruptible"].asString() == "true";
if(!value["Action"].isNull())
action_ = value["Action"].asString();
if(!value["ActionParams"].isNull())
actionParams_ = value["ActionParams"].asString();
if(!value["Interruptible"].isNull())
interruptible_ = value["Interruptible"].asString() == "true";
if(!value["TextResponse"].isNull())
textResponse_ = value["TextResponse"].asString();
}
bool DebugBeginDialogueResult::getInterruptible()const
{
return interruptible_;
}
std::string DebugBeginDialogueResult::getAction()const
{
return action_;
}
bool DebugBeginDialogueResult::getInterruptible()const
{
return interruptible_;
}
std::string DebugBeginDialogueResult::getActionParams()const
{
return actionParams_;

View 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/voicenavigator/model/ListChatbotInstancesRequest.h>
using AlibabaCloud::VoiceNavigator::Model::ListChatbotInstancesRequest;
ListChatbotInstancesRequest::ListChatbotInstancesRequest() :
RpcServiceRequest("voicenavigator", "2018-06-12", "ListChatbotInstances")
{
setMethod(HttpRequest::Method::Get);
}
ListChatbotInstancesRequest::~ListChatbotInstancesRequest()
{}
int ListChatbotInstancesRequest::getPageNumber()const
{
return pageNumber_;
}
void ListChatbotInstancesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string ListChatbotInstancesRequest::getInstanceId()const
{
return instanceId_;
}
void ListChatbotInstancesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
int ListChatbotInstancesRequest::getPageSize()const
{
return pageSize_;
}
void ListChatbotInstancesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,90 @@
/*
* 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/voicenavigator/model/ListChatbotInstancesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::VoiceNavigator;
using namespace AlibabaCloud::VoiceNavigator::Model;
ListChatbotInstancesResult::ListChatbotInstancesResult() :
ServiceResult()
{}
ListChatbotInstancesResult::ListChatbotInstancesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListChatbotInstancesResult::~ListChatbotInstancesResult()
{}
void ListChatbotInstancesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allBotsNode = value["Bots"]["Bot"];
for (auto valueBotsBot : allBotsNode)
{
Bot botsObject;
if(!valueBotsBot["InstanceId"].isNull())
botsObject.instanceId = valueBotsBot["InstanceId"].asString();
if(!valueBotsBot["TimeZone"].isNull())
botsObject.timeZone = valueBotsBot["TimeZone"].asString();
if(!valueBotsBot["Avatar"].isNull())
botsObject.avatar = valueBotsBot["Avatar"].asString();
if(!valueBotsBot["LanguageCode"].isNull())
botsObject.languageCode = valueBotsBot["LanguageCode"].asString();
if(!valueBotsBot["Name"].isNull())
botsObject.name = valueBotsBot["Name"].asString();
if(!valueBotsBot["Introduction"].isNull())
botsObject.introduction = valueBotsBot["Introduction"].asString();
if(!valueBotsBot["CreateTime"].isNull())
botsObject.createTime = valueBotsBot["CreateTime"].asString();
bots_.push_back(botsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
long ListChatbotInstancesResult::getTotalCount()const
{
return totalCount_;
}
std::vector<ListChatbotInstancesResult::Bot> ListChatbotInstancesResult::getBots()const
{
return bots_;
}
long ListChatbotInstancesResult::getPageSize()const
{
return pageSize_;
}
int ListChatbotInstancesResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -39,27 +39,27 @@ void SilenceTimeoutResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TextResponse"].isNull())
textResponse_ = value["TextResponse"].asString();
if(!value["Interruptible"].isNull())
interruptible_ = value["Interruptible"].asString() == "true";
if(!value["Action"].isNull())
action_ = value["Action"].asString();
if(!value["ActionParams"].isNull())
actionParams_ = value["ActionParams"].asString();
if(!value["Interruptible"].isNull())
interruptible_ = value["Interruptible"].asString() == "true";
if(!value["TextResponse"].isNull())
textResponse_ = value["TextResponse"].asString();
}
bool SilenceTimeoutResult::getInterruptible()const
{
return interruptible_;
}
std::string SilenceTimeoutResult::getAction()const
{
return action_;
}
bool SilenceTimeoutResult::getInterruptible()const
{
return interruptible_;
}
std::string SilenceTimeoutResult::getActionParams()const
{
return actionParams_;