Supported new features for outbound.

This commit is contained in:
sdk-team
2023-01-13 03:09:57 +00:00
parent 84f0671771
commit a8f72c5f44
34 changed files with 1351 additions and 4 deletions

View File

@@ -31,21 +31,21 @@ OutboundBotClient::OutboundBotClient(const Credentials &credentials, const Clien
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "outboundbot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
OutboundBotClient::OutboundBotClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "outboundbot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
OutboundBotClient::OutboundBotClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "outboundbot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
OutboundBotClient::~OutboundBotClient()
@@ -1203,6 +1203,42 @@ OutboundBotClient::DeleteScriptOutcomeCallable OutboundBotClient::deleteScriptCa
return task->get_future();
}
OutboundBotClient::DeleteScriptRecordingOutcome OutboundBotClient::deleteScriptRecording(const DeleteScriptRecordingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteScriptRecordingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteScriptRecordingOutcome(DeleteScriptRecordingResult(outcome.result()));
else
return DeleteScriptRecordingOutcome(outcome.error());
}
void OutboundBotClient::deleteScriptRecordingAsync(const DeleteScriptRecordingRequest& request, const DeleteScriptRecordingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteScriptRecording(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::DeleteScriptRecordingOutcomeCallable OutboundBotClient::deleteScriptRecordingCallable(const DeleteScriptRecordingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteScriptRecordingOutcome()>>(
[this, request]()
{
return this->deleteScriptRecording(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::DeleteScriptWaveformOutcome OutboundBotClient::deleteScriptWaveform(const DeleteScriptWaveformRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1995,6 +2031,42 @@ OutboundBotClient::DownloadRecordingOutcomeCallable OutboundBotClient::downloadR
return task->get_future();
}
OutboundBotClient::DownloadScriptRecordingOutcome OutboundBotClient::downloadScriptRecording(const DownloadScriptRecordingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DownloadScriptRecordingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DownloadScriptRecordingOutcome(DownloadScriptRecordingResult(outcome.result()));
else
return DownloadScriptRecordingOutcome(outcome.error());
}
void OutboundBotClient::downloadScriptRecordingAsync(const DownloadScriptRecordingRequest& request, const DownloadScriptRecordingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, downloadScriptRecording(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::DownloadScriptRecordingOutcomeCallable OutboundBotClient::downloadScriptRecordingCallable(const DownloadScriptRecordingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DownloadScriptRecordingOutcome()>>(
[this, request]()
{
return this->downloadScriptRecording(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::DuplicateScriptOutcome OutboundBotClient::duplicateScript(const DuplicateScriptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3219,6 +3291,42 @@ OutboundBotClient::ListScriptPublishHistoriesOutcomeCallable OutboundBotClient::
return task->get_future();
}
OutboundBotClient::ListScriptRecordingOutcome OutboundBotClient::listScriptRecording(const ListScriptRecordingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListScriptRecordingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListScriptRecordingOutcome(ListScriptRecordingResult(outcome.result()));
else
return ListScriptRecordingOutcome(outcome.error());
}
void OutboundBotClient::listScriptRecordingAsync(const ListScriptRecordingRequest& request, const ListScriptRecordingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listScriptRecording(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::ListScriptRecordingOutcomeCallable OutboundBotClient::listScriptRecordingCallable(const ListScriptRecordingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListScriptRecordingOutcome()>>(
[this, request]()
{
return this->listScriptRecording(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::ListScriptVoiceConfigsOutcome OutboundBotClient::listScriptVoiceConfigs(const ListScriptVoiceConfigsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4767,6 +4875,42 @@ OutboundBotClient::UntagResourcesOutcomeCallable OutboundBotClient::untagResourc
return task->get_future();
}
OutboundBotClient::UploadScriptRecordingOutcome OutboundBotClient::uploadScriptRecording(const UploadScriptRecordingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UploadScriptRecordingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UploadScriptRecordingOutcome(UploadScriptRecordingResult(outcome.result()));
else
return UploadScriptRecordingOutcome(outcome.error());
}
void OutboundBotClient::uploadScriptRecordingAsync(const UploadScriptRecordingRequest& request, const UploadScriptRecordingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, uploadScriptRecording(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::UploadScriptRecordingOutcomeCallable OutboundBotClient::uploadScriptRecordingCallable(const UploadScriptRecordingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UploadScriptRecordingOutcome()>>(
[this, request]()
{
return this->uploadScriptRecording(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::WithdrawScriptReviewOutcome OutboundBotClient::withdrawScriptReview(const WithdrawScriptReviewRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -87,6 +87,15 @@ void CreateScriptRequest::setMiniPlaybackConfigListJsonString(const std::string
setParameter(std::string("MiniPlaybackConfigListJsonString"), miniPlaybackConfigListJsonString);
}
bool CreateScriptRequest::getEmotionEnable() const {
return emotionEnable_;
}
void CreateScriptRequest::setEmotionEnable(bool emotionEnable) {
emotionEnable_ = emotionEnable;
setParameter(std::string("EmotionEnable"), emotionEnable ? "true" : "false");
}
bool CreateScriptRequest::getNewBargeInEnable() const {
return newBargeInEnable_;
}

View File

@@ -0,0 +1,54 @@
/*
* 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/DeleteScriptRecordingRequest.h>
using AlibabaCloud::OutboundBot::Model::DeleteScriptRecordingRequest;
DeleteScriptRecordingRequest::DeleteScriptRecordingRequest()
: RpcServiceRequest("outboundbot", "2019-12-26", "DeleteScriptRecording") {
setMethod(HttpRequest::Method::Post);
}
DeleteScriptRecordingRequest::~DeleteScriptRecordingRequest() {}
std::string DeleteScriptRecordingRequest::getUuidsJson() const {
return uuidsJson_;
}
void DeleteScriptRecordingRequest::setUuidsJson(const std::string &uuidsJson) {
uuidsJson_ = uuidsJson;
setParameter(std::string("UuidsJson"), uuidsJson);
}
std::string DeleteScriptRecordingRequest::getScriptId() const {
return scriptId_;
}
void DeleteScriptRecordingRequest::setScriptId(const std::string &scriptId) {
scriptId_ = scriptId;
setParameter(std::string("ScriptId"), scriptId);
}
std::string DeleteScriptRecordingRequest::getInstanceId() const {
return instanceId_;
}
void DeleteScriptRecordingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("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/DeleteScriptRecordingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
DeleteScriptRecordingResult::DeleteScriptRecordingResult() :
ServiceResult()
{}
DeleteScriptRecordingResult::DeleteScriptRecordingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteScriptRecordingResult::~DeleteScriptRecordingResult()
{}
void DeleteScriptRecordingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteScriptRecordingResult::getMessage()const
{
return message_;
}
int DeleteScriptRecordingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DeleteScriptRecordingResult::getCode()const
{
return code_;
}
bool DeleteScriptRecordingResult::getSuccess()const
{
return success_;
}

View File

@@ -72,6 +72,8 @@ void DescribeScriptResult::parse(const std::string &payload)
script_.newBargeInEnable = scriptNode["NewBargeInEnable"].asString() == "true";
if(!scriptNode["LongWaitEnable"].isNull())
script_.longWaitEnable = scriptNode["LongWaitEnable"].asString() == "true";
if(!scriptNode["EmotionEnable"].isNull())
script_.emotionEnable = scriptNode["EmotionEnable"].asString() == "true";
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Success"].isNull())

View File

@@ -48,6 +48,8 @@ void DialogueResult::parse(const std::string &payload)
feedback_.content = feedbackNode["Content"].asString();
if(!feedbackNode["Interruptible"].isNull())
feedback_.interruptible = feedbackNode["Interruptible"].asString() == "true";
if(!feedbackNode["ContentParams"].isNull())
feedback_.contentParams = feedbackNode["ContentParams"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Code"].isNull())

View File

@@ -0,0 +1,54 @@
/*
* 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/DownloadScriptRecordingRequest.h>
using AlibabaCloud::OutboundBot::Model::DownloadScriptRecordingRequest;
DownloadScriptRecordingRequest::DownloadScriptRecordingRequest()
: RpcServiceRequest("outboundbot", "2019-12-26", "DownloadScriptRecording") {
setMethod(HttpRequest::Method::Post);
}
DownloadScriptRecordingRequest::~DownloadScriptRecordingRequest() {}
std::string DownloadScriptRecordingRequest::getUuid() const {
return uuid_;
}
void DownloadScriptRecordingRequest::setUuid(const std::string &uuid) {
uuid_ = uuid;
setParameter(std::string("Uuid"), uuid);
}
std::string DownloadScriptRecordingRequest::getScriptId() const {
return scriptId_;
}
void DownloadScriptRecordingRequest::setScriptId(const std::string &scriptId) {
scriptId_ = scriptId;
setParameter(std::string("ScriptId"), scriptId);
}
std::string DownloadScriptRecordingRequest::getInstanceId() const {
return instanceId_;
}
void DownloadScriptRecordingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}

View 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/outboundbot/model/DownloadScriptRecordingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
DownloadScriptRecordingResult::DownloadScriptRecordingResult() :
ServiceResult()
{}
DownloadScriptRecordingResult::DownloadScriptRecordingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DownloadScriptRecordingResult::~DownloadScriptRecordingResult()
{}
void DownloadScriptRecordingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto downloadParamsNode = value["DownloadParams"];
if(!downloadParamsNode["SignatureUrl"].isNull())
downloadParams_.signatureUrl = downloadParamsNode["SignatureUrl"].asString();
if(!downloadParamsNode["FileName"].isNull())
downloadParams_.fileName = downloadParamsNode["FileName"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
DownloadScriptRecordingResult::DownloadParams DownloadScriptRecordingResult::getDownloadParams()const
{
return downloadParams_;
}
std::string DownloadScriptRecordingResult::getMessage()const
{
return message_;
}
int DownloadScriptRecordingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DownloadScriptRecordingResult::getCode()const
{
return code_;
}
bool DownloadScriptRecordingResult::getSuccess()const
{
return success_;
}

View File

@@ -69,6 +69,8 @@ void ListInstancesResult::parse(const std::string &payload)
instancesObject.creatorName = valueInstancesInstance["CreatorName"].asString();
if(!valueInstancesInstance["MaxConcurrentConversation"].isNull())
instancesObject.maxConcurrentConversation = std::stoi(valueInstancesInstance["MaxConcurrentConversation"].asString());
if(!valueInstancesInstance["IsPreset"].isNull())
instancesObject.isPreset = valueInstancesInstance["IsPreset"].asString() == "true";
auto allResourceTagsNode = valueInstancesInstance["ResourceTags"]["ResourceTag"];
for (auto valueInstancesInstanceResourceTagsResourceTag : allResourceTagsNode)
{

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/outboundbot/model/ListScriptRecordingRequest.h>
using AlibabaCloud::OutboundBot::Model::ListScriptRecordingRequest;
ListScriptRecordingRequest::ListScriptRecordingRequest()
: RpcServiceRequest("outboundbot", "2019-12-26", "ListScriptRecording") {
setMethod(HttpRequest::Method::Post);
}
ListScriptRecordingRequest::~ListScriptRecordingRequest() {}
std::string ListScriptRecordingRequest::getUuidsJson() const {
return uuidsJson_;
}
void ListScriptRecordingRequest::setUuidsJson(const std::string &uuidsJson) {
uuidsJson_ = uuidsJson;
setParameter(std::string("UuidsJson"), uuidsJson);
}
std::string ListScriptRecordingRequest::getStatesJson() const {
return statesJson_;
}
void ListScriptRecordingRequest::setStatesJson(const std::string &statesJson) {
statesJson_ = statesJson;
setParameter(std::string("StatesJson"), statesJson);
}
int ListScriptRecordingRequest::getPageNumber() const {
return pageNumber_;
}
void ListScriptRecordingRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string ListScriptRecordingRequest::getScriptId() const {
return scriptId_;
}
void ListScriptRecordingRequest::setScriptId(const std::string &scriptId) {
scriptId_ = scriptId;
setParameter(std::string("ScriptId"), scriptId);
}
std::string ListScriptRecordingRequest::getSearch() const {
return search_;
}
void ListScriptRecordingRequest::setSearch(const std::string &search) {
search_ = search;
setParameter(std::string("Search"), search);
}
std::string ListScriptRecordingRequest::getInstanceId() const {
return instanceId_;
}
void ListScriptRecordingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
int ListScriptRecordingRequest::getPageSize() const {
return pageSize_;
}
void ListScriptRecordingRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}

View File

@@ -0,0 +1,130 @@
/*
* 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/ListScriptRecordingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
ListScriptRecordingResult::ListScriptRecordingResult() :
ServiceResult()
{}
ListScriptRecordingResult::ListScriptRecordingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListScriptRecordingResult::~ListScriptRecordingResult()
{}
void ListScriptRecordingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allScriptRecordingsNode = value["ScriptRecordings"]["ScriptRecording"];
for (auto valueScriptRecordingsScriptRecording : allScriptRecordingsNode)
{
ScriptRecording scriptRecordingsObject;
if(!valueScriptRecordingsScriptRecording["RecordingContent"].isNull())
scriptRecordingsObject.recordingContent = valueScriptRecordingsScriptRecording["RecordingContent"].asString();
if(!valueScriptRecordingsScriptRecording["State"].isNull())
scriptRecordingsObject.state = std::stoi(valueScriptRecordingsScriptRecording["State"].asString());
if(!valueScriptRecordingsScriptRecording["StorageUuid"].isNull())
scriptRecordingsObject.storageUuid = valueScriptRecordingsScriptRecording["StorageUuid"].asString();
if(!valueScriptRecordingsScriptRecording["StateExtend"].isNull())
scriptRecordingsObject.stateExtend = valueScriptRecordingsScriptRecording["StateExtend"].asString();
if(!valueScriptRecordingsScriptRecording["InstanceId"].isNull())
scriptRecordingsObject.instanceId = valueScriptRecordingsScriptRecording["InstanceId"].asString();
if(!valueScriptRecordingsScriptRecording["GmtModified"].isNull())
scriptRecordingsObject.gmtModified = std::stol(valueScriptRecordingsScriptRecording["GmtModified"].asString());
if(!valueScriptRecordingsScriptRecording["ScriptId"].isNull())
scriptRecordingsObject.scriptId = valueScriptRecordingsScriptRecording["ScriptId"].asString();
if(!valueScriptRecordingsScriptRecording["Uuid"].isNull())
scriptRecordingsObject.uuid = valueScriptRecordingsScriptRecording["Uuid"].asString();
if(!valueScriptRecordingsScriptRecording["GmtUpload"].isNull())
scriptRecordingsObject.gmtUpload = std::stol(valueScriptRecordingsScriptRecording["GmtUpload"].asString());
if(!valueScriptRecordingsScriptRecording["RecordingDuration"].isNull())
scriptRecordingsObject.recordingDuration = std::stoi(valueScriptRecordingsScriptRecording["RecordingDuration"].asString());
if(!valueScriptRecordingsScriptRecording["RecordingName"].isNull())
scriptRecordingsObject.recordingName = valueScriptRecordingsScriptRecording["RecordingName"].asString();
if(!valueScriptRecordingsScriptRecording["GmtCreate"].isNull())
scriptRecordingsObject.gmtCreate = std::stol(valueScriptRecordingsScriptRecording["GmtCreate"].asString());
if(!valueScriptRecordingsScriptRecording["InnerId"].isNull())
scriptRecordingsObject.innerId = valueScriptRecordingsScriptRecording["InnerId"].asString();
scriptRecordings_.push_back(scriptRecordingsObject);
}
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].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["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListScriptRecordingResult::getTotalCount()const
{
return totalCount_;
}
std::string ListScriptRecordingResult::getMessage()const
{
return message_;
}
int ListScriptRecordingResult::getPageSize()const
{
return pageSize_;
}
std::vector<ListScriptRecordingResult::ScriptRecording> ListScriptRecordingResult::getScriptRecordings()const
{
return scriptRecordings_;
}
int ListScriptRecordingResult::getPageNumber()const
{
return pageNumber_;
}
int ListScriptRecordingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListScriptRecordingResult::getCode()const
{
return code_;
}
bool ListScriptRecordingResult::getSuccess()const
{
return success_;
}

View File

@@ -80,6 +80,10 @@ void ListScriptsResult::parse(const std::string &payload)
scriptObject.newBargeInEnable = scriptsNodeListScript["NewBargeInEnable"].asString() == "true";
if(!scriptsNodeListScript["LongWaitEnable"].isNull())
scriptObject.longWaitEnable = scriptsNodeListScript["LongWaitEnable"].asString() == "true";
if(!scriptsNodeListScript["EmotionEnable"].isNull())
scriptObject.emotionEnable = scriptsNodeListScript["EmotionEnable"].asString() == "true";
if(!scriptsNodeListScript["IsPreset"].isNull())
scriptObject.isPreset = scriptsNodeListScript["IsPreset"].asString() == "true";
scripts_.list.push_back(scriptObject);
}
if(!value["HttpStatusCode"].isNull())

View File

@@ -96,6 +96,15 @@ void ModifyScriptRequest::setMiniPlaybackConfigListJsonString(const std::string
setParameter(std::string("MiniPlaybackConfigListJsonString"), miniPlaybackConfigListJsonString);
}
bool ModifyScriptRequest::getEmotionEnable() const {
return emotionEnable_;
}
void ModifyScriptRequest::setEmotionEnable(bool emotionEnable) {
emotionEnable_ = emotionEnable;
setParameter(std::string("EmotionEnable"), emotionEnable ? "true" : "false");
}
std::string ModifyScriptRequest::getNlsConfig() const {
return nlsConfig_;
}

View File

@@ -43,6 +43,15 @@ void QueryJobsWithResultRequest::setHasAnsweredFilter(bool hasAnsweredFilter) {
setParameter(std::string("HasAnsweredFilter"), hasAnsweredFilter ? "true" : "false");
}
std::string QueryJobsWithResultRequest::getTaskStatusFilter() const {
return taskStatusFilter_;
}
void QueryJobsWithResultRequest::setTaskStatusFilter(const std::string &taskStatusFilter) {
taskStatusFilter_ = taskStatusFilter;
setParameter(std::string("TaskStatusFilter"), taskStatusFilter);
}
int QueryJobsWithResultRequest::getPageNumber() const {
return pageNumber_;
}

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/UploadScriptRecordingRequest.h>
using AlibabaCloud::OutboundBot::Model::UploadScriptRecordingRequest;
UploadScriptRecordingRequest::UploadScriptRecordingRequest()
: RpcServiceRequest("outboundbot", "2019-12-26", "UploadScriptRecording") {
setMethod(HttpRequest::Method::Post);
}
UploadScriptRecordingRequest::~UploadScriptRecordingRequest() {}
std::string UploadScriptRecordingRequest::getContent() const {
return content_;
}
void UploadScriptRecordingRequest::setContent(const std::string &content) {
content_ = content;
setParameter(std::string("Content"), content);
}
std::string UploadScriptRecordingRequest::getScriptId() const {
return scriptId_;
}
void UploadScriptRecordingRequest::setScriptId(const std::string &scriptId) {
scriptId_ = scriptId;
setParameter(std::string("ScriptId"), scriptId);
}
std::string UploadScriptRecordingRequest::getInstanceId() const {
return instanceId_;
}
void UploadScriptRecordingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
std::string UploadScriptRecordingRequest::getFileName() const {
return fileName_;
}
void UploadScriptRecordingRequest::setFileName(const std::string &fileName) {
fileName_ = fileName;
setParameter(std::string("FileName"), fileName);
}
std::string UploadScriptRecordingRequest::getFileId() const {
return fileId_;
}
void UploadScriptRecordingRequest::setFileId(const std::string &fileId) {
fileId_ = fileId;
setParameter(std::string("FileId"), fileId);
}

View File

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