Supported new features for outbound.

This commit is contained in:
sdk-team
2021-08-19 06:58:06 +00:00
parent 9d7216efce
commit 4fc4cdd7b8
43 changed files with 1038 additions and 20 deletions

View File

@@ -1815,6 +1815,42 @@ OutboundBotClient::GetBaseStrategyPeriodOutcomeCallable OutboundBotClient::getBa
return task->get_future();
}
OutboundBotClient::GetConcurrentConversationQuotaOutcome OutboundBotClient::getConcurrentConversationQuota(const GetConcurrentConversationQuotaRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetConcurrentConversationQuotaOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetConcurrentConversationQuotaOutcome(GetConcurrentConversationQuotaResult(outcome.result()));
else
return GetConcurrentConversationQuotaOutcome(outcome.error());
}
void OutboundBotClient::getConcurrentConversationQuotaAsync(const GetConcurrentConversationQuotaRequest& request, const GetConcurrentConversationQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getConcurrentConversationQuota(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::GetConcurrentConversationQuotaOutcomeCallable OutboundBotClient::getConcurrentConversationQuotaCallable(const GetConcurrentConversationQuotaRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetConcurrentConversationQuotaOutcome()>>(
[this, request]()
{
return this->getConcurrentConversationQuota(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::GetContactBlockListOutcome OutboundBotClient::getContactBlockList(const GetContactBlockListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1887,6 +1923,42 @@ OutboundBotClient::GetContactWhiteListOutcomeCallable OutboundBotClient::getCont
return task->get_future();
}
OutboundBotClient::GetCurrentConcurrencyOutcome OutboundBotClient::getCurrentConcurrency(const GetCurrentConcurrencyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetCurrentConcurrencyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetCurrentConcurrencyOutcome(GetCurrentConcurrencyResult(outcome.result()));
else
return GetCurrentConcurrencyOutcome(outcome.error());
}
void OutboundBotClient::getCurrentConcurrencyAsync(const GetCurrentConcurrencyRequest& request, const GetCurrentConcurrencyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getCurrentConcurrency(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::GetCurrentConcurrencyOutcomeCallable OutboundBotClient::getCurrentConcurrencyCallable(const GetCurrentConcurrencyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetCurrentConcurrencyOutcome()>>(
[this, request]()
{
return this->getCurrentConcurrency(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::GetEffectiveDaysOutcome OutboundBotClient::getEffectiveDays(const GetEffectiveDaysRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4047,6 +4119,42 @@ OutboundBotClient::TaskPreparingOutcomeCallable OutboundBotClient::taskPreparing
return task->get_future();
}
OutboundBotClient::TerminateCallOutcome OutboundBotClient::terminateCall(const TerminateCallRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TerminateCallOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TerminateCallOutcome(TerminateCallResult(outcome.result()));
else
return TerminateCallOutcome(outcome.error());
}
void OutboundBotClient::terminateCallAsync(const TerminateCallRequest& request, const TerminateCallAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, terminateCall(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::TerminateCallOutcomeCallable OutboundBotClient::terminateCallCallable(const TerminateCallRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TerminateCallOutcome()>>(
[this, request]()
{
return this->terminateCall(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::UntagResourcesOutcome OutboundBotClient::untagResources(const UntagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -71,6 +71,19 @@ void CreateInstanceRequest::setEndpoint(const std::string& endpoint)
setParameter("Endpoint", endpoint);
}
std::vector<std::string> CreateInstanceRequest::getCallingNumber()const
{
return callingNumber_;
}
void CreateInstanceRequest::setCallingNumber(const std::vector<std::string>& callingNumber)
{
callingNumber_ = callingNumber;
for(int dep1 = 0; dep1!= callingNumber.size(); dep1++) {
setParameter("CallingNumber."+ std::to_string(dep1), callingNumber.at(dep1));
}
}
std::string CreateInstanceRequest::getInstanceName()const
{
return instanceName_;

View File

@@ -93,6 +93,19 @@ void CreateScriptRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::vector<std::string> CreateScriptRequest::getScriptWaveform()const
{
return scriptWaveform_;
}
void CreateScriptRequest::setScriptWaveform(const std::vector<std::string>& scriptWaveform)
{
scriptWaveform_ = scriptWaveform;
for(int dep1 = 0; dep1!= scriptWaveform.size(); dep1++) {
setParameter("ScriptWaveform."+ std::to_string(dep1), scriptWaveform.at(dep1));
}
}
std::string CreateScriptRequest::getAsrConfig()const
{
return asrConfig_;
@@ -115,3 +128,16 @@ void CreateScriptRequest::setScriptDescription(const std::string& scriptDescript
setParameter("ScriptDescription", scriptDescription);
}
std::vector<std::string> CreateScriptRequest::getScriptContent()const
{
return scriptContent_;
}
void CreateScriptRequest::setScriptContent(const std::vector<std::string>& scriptContent)
{
scriptContent_ = scriptContent;
for(int dep1 = 0; dep1!= scriptContent.size(); dep1++) {
setParameter("ScriptContent."+ std::to_string(dep1), scriptContent.at(dep1));
}
}

View File

@@ -144,6 +144,8 @@ void DescribeJobResult::parse(const std::string &payload)
taskObject.taskId = jobNodeTasksTask["TaskId"].asString();
if(!jobNodeTasksTask["EndTime"].isNull())
taskObject.endTime = std::stol(jobNodeTasksTask["EndTime"].asString());
if(!jobNodeTasksTask["EndReason"].isNull())
taskObject.endReason = jobNodeTasksTask["EndReason"].asString();
auto allConversationNode = jobNodeTasksTask["Conversation"]["ConversationDetail"];
for (auto jobNodeTasksTaskConversationConversationDetail : allConversationNode)
{

View File

@@ -66,6 +66,8 @@ void DescribeScriptResult::parse(const std::string &payload)
script_.asrConfig = scriptNode["AsrConfig"].asString();
if(!scriptNode["TtsConfig"].isNull())
script_.ttsConfig = scriptNode["TtsConfig"].asString();
if(!scriptNode["MiniPlaybackConfigEnabled"].isNull())
script_.miniPlaybackConfigEnabled = scriptNode["MiniPlaybackConfigEnabled"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())

View File

@@ -0,0 +1,29 @@
/*
* 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/outboundbot/model/GetConcurrentConversationQuotaRequest.h>
using AlibabaCloud::OutboundBot::Model::GetConcurrentConversationQuotaRequest;
GetConcurrentConversationQuotaRequest::GetConcurrentConversationQuotaRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "GetConcurrentConversationQuota")
{
setMethod(HttpRequest::Method::Post);
}
GetConcurrentConversationQuotaRequest::~GetConcurrentConversationQuotaRequest()
{}

View File

@@ -0,0 +1,86 @@
/*
* 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/outboundbot/model/GetConcurrentConversationQuotaResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
GetConcurrentConversationQuotaResult::GetConcurrentConversationQuotaResult() :
ServiceResult()
{}
GetConcurrentConversationQuotaResult::GetConcurrentConversationQuotaResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetConcurrentConversationQuotaResult::~GetConcurrentConversationQuotaResult()
{}
void GetConcurrentConversationQuotaResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["MaxConcurrent"].isNull())
maxConcurrent_ = std::stoi(value["MaxConcurrent"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["RemainingConcurrent"].isNull())
remainingConcurrent_ = std::stoi(value["RemainingConcurrent"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
int GetConcurrentConversationQuotaResult::getRemainingConcurrent()const
{
return remainingConcurrent_;
}
std::string GetConcurrentConversationQuotaResult::getMessage()const
{
return message_;
}
int GetConcurrentConversationQuotaResult::getMaxConcurrent()const
{
return maxConcurrent_;
}
int GetConcurrentConversationQuotaResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetConcurrentConversationQuotaResult::getCode()const
{
return code_;
}
bool GetConcurrentConversationQuotaResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,40 @@
/*
* 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/outboundbot/model/GetCurrentConcurrencyRequest.h>
using AlibabaCloud::OutboundBot::Model::GetCurrentConcurrencyRequest;
GetCurrentConcurrencyRequest::GetCurrentConcurrencyRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "GetCurrentConcurrency")
{
setMethod(HttpRequest::Method::Post);
}
GetCurrentConcurrencyRequest::~GetCurrentConcurrencyRequest()
{}
std::string GetCurrentConcurrencyRequest::getInstanceId()const
{
return instanceId_;
}
void GetCurrentConcurrencyRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,93 @@
/*
* 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/outboundbot/model/GetCurrentConcurrencyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
GetCurrentConcurrencyResult::GetCurrentConcurrencyResult() :
ServiceResult()
{}
GetCurrentConcurrencyResult::GetCurrentConcurrencyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCurrentConcurrencyResult::~GetCurrentConcurrencyResult()
{}
void GetCurrentConcurrencyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["MaxConcurrentConversation"].isNull())
maxConcurrentConversation_ = std::stoi(value["MaxConcurrentConversation"].asString());
if(!value["CurrentConcurrency"].isNull())
currentConcurrency_ = std::stoi(value["CurrentConcurrency"].asString());
if(!value["InstanceId"].isNull())
instanceId_ = value["InstanceId"].asString();
}
std::string GetCurrentConcurrencyResult::getMessage()const
{
return message_;
}
int GetCurrentConcurrencyResult::getMaxConcurrentConversation()const
{
return maxConcurrentConversation_;
}
std::string GetCurrentConcurrencyResult::getInstanceId()const
{
return instanceId_;
}
int GetCurrentConcurrencyResult::getCurrentConcurrency()const
{
return currentConcurrency_;
}
int GetCurrentConcurrencyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetCurrentConcurrencyResult::getCode()const
{
return code_;
}
bool GetCurrentConcurrencyResult::getSuccess()const
{
return success_;
}

View File

@@ -63,6 +63,8 @@ void ListJobGroupsAsyncResult::parse(const std::string &payload)
jobGroupsObject.modifyTime = valueJobGroupsJobGroup["ModifyTime"].asString();
if(!valueJobGroupsJobGroup["ScriptVersion"].isNull())
jobGroupsObject.scriptVersion = valueJobGroupsJobGroup["ScriptVersion"].asString();
if(!valueJobGroupsJobGroup["TotalCallNum"].isNull())
jobGroupsObject.totalCallNum = std::stoi(valueJobGroupsJobGroup["TotalCallNum"].asString());
auto strategyNode = value["Strategy"];
if(!strategyNode["StartTime"].isNull())
jobGroupsObject.strategy.startTime = std::stol(strategyNode["StartTime"].asString());

View File

@@ -70,6 +70,8 @@ void ListJobGroupsResult::parse(const std::string &payload)
jobGroupObject.scriptVersion = jobGroupsNodeListJobGroup["ScriptVersion"].asString();
if(!jobGroupsNodeListJobGroup["Status"].isNull())
jobGroupObject.status = jobGroupsNodeListJobGroup["Status"].asString();
if(!jobGroupsNodeListJobGroup["TotalCallNum"].isNull())
jobGroupObject.totalCallNum = std::stoi(jobGroupsNodeListJobGroup["TotalCallNum"].asString());
auto progressNode = value["Progress"];
if(!progressNode["Duration"].isNull())
jobGroupObject.progress.duration = std::stoi(progressNode["Duration"].asString());

View File

@@ -51,6 +51,8 @@ void ListSchedulerInstancesResult::parse(const std::string &payload)
schedulerInstancesObject.business = valueSchedulerInstancesSchedulerInstance["Business"].asString();
if(!valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].isNull())
schedulerInstancesObject.maxConcurrency = std::stoi(valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].asString());
if(!valueSchedulerInstancesSchedulerInstance["BaseStrategy"].isNull())
schedulerInstancesObject.baseStrategy = valueSchedulerInstancesSchedulerInstance["BaseStrategy"].asString();
schedulerInstances_.push_back(schedulerInstancesObject);
}
if(!value["Success"].isNull())

View File

@@ -74,6 +74,8 @@ void ListScriptsResult::parse(const std::string &payload)
scriptObject.updateTime = std::stol(scriptsNodeListScript["UpdateTime"].asString());
if(!scriptsNodeListScript["RejectReason"].isNull())
scriptObject.rejectReason = scriptsNodeListScript["RejectReason"].asString();
if(!scriptsNodeListScript["MiniPlaybackEnabled"].isNull())
scriptObject.miniPlaybackEnabled = scriptsNodeListScript["MiniPlaybackEnabled"].asString() == "true";
scripts_.list.push_back(scriptObject);
}
if(!value["Code"].isNull())

View File

@@ -60,6 +60,19 @@ void ModifyInstanceRequest::setEndpoint(const std::string& endpoint)
setParameter("Endpoint", endpoint);
}
std::vector<std::string> ModifyInstanceRequest::getCallingNumber()const
{
return callingNumber_;
}
void ModifyInstanceRequest::setCallingNumber(const std::vector<std::string>& callingNumber)
{
callingNumber_ = callingNumber;
for(int dep1 = 0; dep1!= callingNumber.size(); dep1++) {
setParameter("CallingNumber."+ std::to_string(dep1), callingNumber.at(dep1));
}
}
std::string ModifyInstanceRequest::getInstanceId()const
{
return instanceId_;

View File

@@ -82,6 +82,41 @@ void ModifyScriptRequest::setScriptId(const std::string& scriptId)
setParameter("ScriptId", scriptId);
}
std::vector<std::string> ModifyScriptRequest::getScriptWaveform()const
{
return scriptWaveform_;
}
void ModifyScriptRequest::setScriptWaveform(const std::vector<std::string>& scriptWaveform)
{
scriptWaveform_ = scriptWaveform;
for(int dep1 = 0; dep1!= scriptWaveform.size(); dep1++) {
setParameter("ScriptWaveform."+ std::to_string(dep1), scriptWaveform.at(dep1));
}
}
std::string ModifyScriptRequest::getAsrConfig()const
{
return asrConfig_;
}
void ModifyScriptRequest::setAsrConfig(const std::string& asrConfig)
{
asrConfig_ = asrConfig;
setParameter("AsrConfig", asrConfig);
}
bool ModifyScriptRequest::getMiniPlaybackEnabled()const
{
return miniPlaybackEnabled_;
}
void ModifyScriptRequest::setMiniPlaybackEnabled(bool miniPlaybackEnabled)
{
miniPlaybackEnabled_ = miniPlaybackEnabled;
setParameter("MiniPlaybackEnabled", miniPlaybackEnabled ? "true" : "false");
}
std::string ModifyScriptRequest::getChatbotId()const
{
return chatbotId_;
@@ -104,17 +139,6 @@ void ModifyScriptRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::string ModifyScriptRequest::getAsrConfig()const
{
return asrConfig_;
}
void ModifyScriptRequest::setAsrConfig(const std::string& asrConfig)
{
asrConfig_ = asrConfig;
setParameter("AsrConfig", asrConfig);
}
std::string ModifyScriptRequest::getScriptDescription()const
{
return scriptDescription_;
@@ -126,3 +150,16 @@ void ModifyScriptRequest::setScriptDescription(const std::string& scriptDescript
setParameter("ScriptDescription", scriptDescription);
}
std::vector<std::string> ModifyScriptRequest::getScriptContent()const
{
return scriptContent_;
}
void ModifyScriptRequest::setScriptContent(const std::vector<std::string>& scriptContent)
{
scriptContent_ = scriptContent;
for(int dep1 = 0; dep1!= scriptContent.size(); dep1++) {
setParameter("ScriptContent."+ std::to_string(dep1), scriptContent.at(dep1));
}
}

View File

@@ -89,6 +89,16 @@ void QueryJobsWithResultResult::parse(const std::string &payload)
extraObject.value = latestTaskNodeExtrasExtra["Value"].asString();
jobObject.latestTask.extras.push_back(extraObject);
}
auto allTagHitsNode = latestTaskNode["TagHits"]["TagHit"];
for (auto latestTaskNodeTagHitsTagHit : allTagHitsNode)
{
Jobs::Job::LatestTask::TagHit tagHitObject;
if(!latestTaskNodeTagHitsTagHit["TagGroup"].isNull())
tagHitObject.tagGroup = latestTaskNodeTagHitsTagHit["TagGroup"].asString();
if(!latestTaskNodeTagHitsTagHit["TagName"].isNull())
tagHitObject.tagName = latestTaskNodeTagHitsTagHit["TagName"].asString();
jobObject.latestTask.tagHits.push_back(tagHitObject);
}
auto contactNode = latestTaskNode["Contact"];
if(!contactNode["PreferredPhoneNumber"].isNull())
jobObject.latestTask.contact.preferredPhoneNumber = contactNode["PreferredPhoneNumber"].asString();

View File

@@ -51,6 +51,17 @@ void StartJobRequest::setCallingNumber(const std::vector<std::string>& callingNu
}
}
std::string StartJobRequest::getScriptId()const
{
return scriptId_;
}
void StartJobRequest::setScriptId(const std::string& scriptId)
{
scriptId_ = scriptId;
setParameter("ScriptId", scriptId);
}
std::string StartJobRequest::getInstanceId()const
{
return instanceId_;

View File

@@ -49,6 +49,16 @@ void StartJobResult::parse(const std::string &payload)
taskIdsObject.value = valueTaskIdsKeyValuePair["Value"].asString();
taskIds_.push_back(taskIdsObject);
}
auto allCallIdsNode = value["CallIds"]["KeyValuePair"];
for (auto valueCallIdsKeyValuePair : allCallIdsNode)
{
KeyValuePair callIdsObject;
if(!valueCallIdsKeyValuePair["Key"].isNull())
callIdsObject.key = valueCallIdsKeyValuePair["Key"].asString();
if(!valueCallIdsKeyValuePair["Value"].isNull())
callIdsObject.value = valueCallIdsKeyValuePair["Value"].asString();
callIds_.push_back(callIdsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())
@@ -60,6 +70,11 @@ void StartJobResult::parse(const std::string &payload)
}
std::vector<StartJobResult::KeyValuePair> StartJobResult::getCallIds()const
{
return callIds_;
}
std::vector<StartJobResult::KeyValuePair> StartJobResult::getTaskIds()const
{
return taskIds_;

View File

@@ -0,0 +1,51 @@
/*
* 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/outboundbot/model/TerminateCallRequest.h>
using AlibabaCloud::OutboundBot::Model::TerminateCallRequest;
TerminateCallRequest::TerminateCallRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "TerminateCall")
{
setMethod(HttpRequest::Method::Post);
}
TerminateCallRequest::~TerminateCallRequest()
{}
std::string TerminateCallRequest::getCallId()const
{
return callId_;
}
void TerminateCallRequest::setCallId(const std::string& callId)
{
callId_ = callId;
setParameter("CallId", callId);
}
std::string TerminateCallRequest::getInstanceId()const
{
return instanceId_;
}
void TerminateCallRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/outboundbot/model/TerminateCallResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
TerminateCallResult::TerminateCallResult() :
ServiceResult()
{}
TerminateCallResult::TerminateCallResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TerminateCallResult::~TerminateCallResult()
{}
void TerminateCallResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string TerminateCallResult::getMessage()const
{
return message_;
}
int TerminateCallResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string TerminateCallResult::getCode()const
{
return code_;
}
bool TerminateCallResult::getSuccess()const
{
return success_;
}