CCC SDK Auto Released By yonghong.lyh,Version:1.20.5

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-08-01 14:06:35 +08:00
parent f6d7b208a9
commit 51b845ce56
281 changed files with 24843 additions and 2581 deletions

View File

@@ -40,79 +40,69 @@ void AddPhoneNumberResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPhoneNumber = value["PhoneNumber"];
for (auto value : allPhoneNumber)
{
PhoneNumber phoneNumberObject;
if(!value["PhoneNumberId"].isNull())
phoneNumberObject.phoneNumberId = value["PhoneNumberId"].asString();
if(!value["InstanceId"].isNull())
phoneNumberObject.instanceId = value["InstanceId"].asString();
if(!value["Number"].isNull())
phoneNumberObject.number = value["Number"].asString();
if(!value["PhoneNumberDescription"].isNull())
phoneNumberObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
if(!value["TestOnly"].isNull())
phoneNumberObject.testOnly = value["TestOnly"].asString() == "true";
if(!value["RemainingTime"].isNull())
phoneNumberObject.remainingTime = std::stoi(value["RemainingTime"].asString());
if(!value["AllowOutbound"].isNull())
phoneNumberObject.allowOutbound = value["AllowOutbound"].asString() == "true";
if(!value["Usage"].isNull())
phoneNumberObject.usage = value["Usage"].asString();
if(!value["Trunks"].isNull())
phoneNumberObject.trunks = std::stoi(value["Trunks"].asString());
auto allContactFlow = value["ContactFlow"];
for (auto value : allContactFlow)
{
PhoneNumber::ContactFlow contactFlowObject;
if(!value["ContactFlowId"].isNull())
contactFlowObject.contactFlowId = value["ContactFlowId"].asString();
if(!value["InstanceId"].isNull())
contactFlowObject.instanceId = value["InstanceId"].asString();
if(!value["ContactFlowName"].isNull())
contactFlowObject.contactFlowName = value["ContactFlowName"].asString();
if(!value["ContactFlowDescription"].isNull())
contactFlowObject.contactFlowDescription = value["ContactFlowDescription"].asString();
if(!value["Type"].isNull())
contactFlowObject.type = value["Type"].asString();
phoneNumberObject.contactFlow.push_back(contactFlowObject);
}
phoneNumber_.push_back(phoneNumberObject);
}
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());
auto phoneNumberNode = value["PhoneNumber"];
if(!phoneNumberNode["PhoneNumberId"].isNull())
phoneNumber_.phoneNumberId = phoneNumberNode["PhoneNumberId"].asString();
if(!phoneNumberNode["InstanceId"].isNull())
phoneNumber_.instanceId = phoneNumberNode["InstanceId"].asString();
if(!phoneNumberNode["Number"].isNull())
phoneNumber_.number = phoneNumberNode["Number"].asString();
if(!phoneNumberNode["PhoneNumberDescription"].isNull())
phoneNumber_.phoneNumberDescription = phoneNumberNode["PhoneNumberDescription"].asString();
if(!phoneNumberNode["TestOnly"].isNull())
phoneNumber_.testOnly = phoneNumberNode["TestOnly"].asString() == "true";
if(!phoneNumberNode["RemainingTime"].isNull())
phoneNumber_.remainingTime = std::stoi(phoneNumberNode["RemainingTime"].asString());
if(!phoneNumberNode["AllowOutbound"].isNull())
phoneNumber_.allowOutbound = phoneNumberNode["AllowOutbound"].asString() == "true";
if(!phoneNumberNode["Usage"].isNull())
phoneNumber_.usage = phoneNumberNode["Usage"].asString();
if(!phoneNumberNode["Trunks"].isNull())
phoneNumber_.trunks = std::stoi(phoneNumberNode["Trunks"].asString());
auto contactFlowNode = phoneNumberNode["ContactFlow"];
if(!contactFlowNode["ContactFlowId"].isNull())
phoneNumber_.contactFlow.contactFlowId = contactFlowNode["ContactFlowId"].asString();
if(!contactFlowNode["InstanceId"].isNull())
phoneNumber_.contactFlow.instanceId = contactFlowNode["InstanceId"].asString();
if(!contactFlowNode["ContactFlowName"].isNull())
phoneNumber_.contactFlow.contactFlowName = contactFlowNode["ContactFlowName"].asString();
if(!contactFlowNode["ContactFlowDescription"].isNull())
phoneNumber_.contactFlow.contactFlowDescription = contactFlowNode["ContactFlowDescription"].asString();
if(!contactFlowNode["Type"].isNull())
phoneNumber_.contactFlow.type = contactFlowNode["Type"].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 AddPhoneNumberResult::getMessage()const
{
return message_;
}
int AddPhoneNumberResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<AddPhoneNumberResult::PhoneNumber> AddPhoneNumberResult::getPhoneNumber()const
{
return phoneNumber_;
}
std::string AddPhoneNumberResult::getCode()const
{
return code_;
}
bool AddPhoneNumberResult::getSuccess()const
{
return success_;
}
std::string AddPhoneNumberResult::getMessage()const
{
return message_;
}
int AddPhoneNumberResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
AddPhoneNumberResult::PhoneNumber AddPhoneNumberResult::getPhoneNumber()const
{
return phoneNumber_;
}
std::string AddPhoneNumberResult::getCode()const
{
return code_;
}
bool AddPhoneNumberResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/ccc/model/AssignJobsRequest.h>
using AlibabaCloud::CCC::Model::AssignJobsRequest;
AssignJobsRequest::AssignJobsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "AssignJobs")
{}
AssignJobsRequest::~AssignJobsRequest()
{}
std::vector<std::string> AssignJobsRequest::getCallingNumber()const
{
return callingNumber_;
}
void AssignJobsRequest::setCallingNumber(const std::vector<std::string>& callingNumber)
{
callingNumber_ = callingNumber;
for(int i = 0; i!= callingNumber.size(); i++)
setParameter("CallingNumber."+ std::to_string(i), callingNumber.at(i));
}
std::string AssignJobsRequest::getInstanceId()const
{
return instanceId_;
}
void AssignJobsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string AssignJobsRequest::getGroupId()const
{
return groupId_;
}
void AssignJobsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string AssignJobsRequest::getStrategyJson()const
{
return strategyJson_;
}
void AssignJobsRequest::setStrategyJson(const std::string& strategyJson)
{
strategyJson_ = strategyJson;
setParameter("StrategyJson", strategyJson);
}
std::string AssignJobsRequest::getScenarioId()const
{
return scenarioId_;
}
void AssignJobsRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}
std::vector<std::string> AssignJobsRequest::getJobsJson()const
{
return jobsJson_;
}
void AssignJobsRequest::setJobsJson(const std::vector<std::string>& jobsJson)
{
jobsJson_ = jobsJson;
for(int i = 0; i!= jobsJson.size(); i++)
setParameter("JobsJson."+ std::to_string(i), jobsJson.at(i));
}

View File

@@ -0,0 +1,80 @@
/*
* 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/ccc/model/AssignJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
AssignJobsResult::AssignJobsResult() :
ServiceResult()
{}
AssignJobsResult::AssignJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssignJobsResult::~AssignJobsResult()
{}
void AssignJobsResult::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["GroupId"].isNull())
groupId_ = value["GroupId"].asString();
}
std::string AssignJobsResult::getMessage()const
{
return message_;
}
int AssignJobsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string AssignJobsResult::getCode()const
{
return code_;
}
bool AssignJobsResult::getSuccess()const
{
return success_;
}
std::string AssignJobsResult::getGroupId()const
{
return groupId_;
}

View File

@@ -0,0 +1,97 @@
/*
* 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/ccc/model/AssignUsersRequest.h>
using AlibabaCloud::CCC::Model::AssignUsersRequest;
AssignUsersRequest::AssignUsersRequest() :
RpcServiceRequest("ccc", "2017-07-05", "AssignUsers")
{}
AssignUsersRequest::~AssignUsersRequest()
{}
std::vector<std::string> AssignUsersRequest::getUserRamId()const
{
return userRamId_;
}
void AssignUsersRequest::setUserRamId(const std::vector<std::string>& userRamId)
{
userRamId_ = userRamId;
for(int i = 0; i!= userRamId.size(); i++)
setParameter("UserRamId."+ std::to_string(i), userRamId.at(i));
}
std::vector<int> AssignUsersRequest::getSkillLevel()const
{
return skillLevel_;
}
void AssignUsersRequest::setSkillLevel(const std::vector<int>& skillLevel)
{
skillLevel_ = skillLevel;
for(int i = 0; i!= skillLevel.size(); i++)
setParameter("SkillLevel."+ std::to_string(i), std::to_string(skillLevel.at(i)));
}
std::string AssignUsersRequest::getInstanceId()const
{
return instanceId_;
}
void AssignUsersRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::vector<std::string> AssignUsersRequest::getRoleId()const
{
return roleId_;
}
void AssignUsersRequest::setRoleId(const std::vector<std::string>& roleId)
{
roleId_ = roleId;
for(int i = 0; i!= roleId.size(); i++)
setParameter("RoleId."+ std::to_string(i), roleId.at(i));
}
std::vector<std::string> AssignUsersRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void AssignUsersRequest::setSkillGroupId(const std::vector<std::string>& skillGroupId)
{
skillGroupId_ = skillGroupId;
for(int i = 0; i!= skillGroupId.size(); i++)
setParameter("SkillGroupId."+ std::to_string(i), skillGroupId.at(i));
}
std::string AssignUsersRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void AssignUsersRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/AssignUsersResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
AssignUsersResult::AssignUsersResult() :
ServiceResult()
{}
AssignUsersResult::AssignUsersResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssignUsersResult::~AssignUsersResult()
{}
void AssignUsersResult::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 AssignUsersResult::getMessage()const
{
return message_;
}
int AssignUsersResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string AssignUsersResult::getCode()const
{
return code_;
}
bool AssignUsersResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/ccc/model/CancelJobsRequest.h>
using AlibabaCloud::CCC::Model::CancelJobsRequest;
CancelJobsRequest::CancelJobsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CancelJobs")
{}
CancelJobsRequest::~CancelJobsRequest()
{}
bool CancelJobsRequest::getAll()const
{
return all_;
}
void CancelJobsRequest::setAll(bool all)
{
all_ = all;
setParameter("All", std::to_string(all));
}
std::vector<std::string> CancelJobsRequest::getJobId()const
{
return jobId_;
}
void CancelJobsRequest::setJobId(const std::vector<std::string>& jobId)
{
jobId_ = jobId;
for(int i = 0; i!= jobId.size(); i++)
setParameter("JobId."+ std::to_string(i), jobId.at(i));
}
std::string CancelJobsRequest::getInstanceId()const
{
return instanceId_;
}
void CancelJobsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::vector<std::string> CancelJobsRequest::getJobReferenceId()const
{
return jobReferenceId_;
}
void CancelJobsRequest::setJobReferenceId(const std::vector<std::string>& jobReferenceId)
{
jobReferenceId_ = jobReferenceId;
for(int i = 0; i!= jobReferenceId.size(); i++)
setParameter("JobReferenceId."+ std::to_string(i), jobReferenceId.at(i));
}
std::string CancelJobsRequest::getGroupId()const
{
return groupId_;
}
void CancelJobsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string CancelJobsRequest::getScenarioId()const
{
return scenarioId_;
}
void CancelJobsRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/CancelJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CancelJobsResult::CancelJobsResult() :
ServiceResult()
{}
CancelJobsResult::CancelJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelJobsResult::~CancelJobsResult()
{}
void CancelJobsResult::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 CancelJobsResult::getMessage()const
{
return message_;
}
int CancelJobsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CancelJobsResult::getCode()const
{
return code_;
}
bool CancelJobsResult::getSuccess()const
{
return success_;
}

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/ccc/model/CancelPredictiveJobsRequest.h>
using AlibabaCloud::CCC::Model::CancelPredictiveJobsRequest;
CancelPredictiveJobsRequest::CancelPredictiveJobsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CancelPredictiveJobs")
{}
CancelPredictiveJobsRequest::~CancelPredictiveJobsRequest()
{}
bool CancelPredictiveJobsRequest::getAll()const
{
return all_;
}
void CancelPredictiveJobsRequest::setAll(bool all)
{
all_ = all;
setParameter("All", std::to_string(all));
}
std::vector<std::string> CancelPredictiveJobsRequest::getJobId()const
{
return jobId_;
}
void CancelPredictiveJobsRequest::setJobId(const std::vector<std::string>& jobId)
{
jobId_ = jobId;
for(int i = 0; i!= jobId.size(); i++)
setParameter("JobId."+ std::to_string(i), jobId.at(i));
}
std::string CancelPredictiveJobsRequest::getInstanceId()const
{
return instanceId_;
}
void CancelPredictiveJobsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CancelPredictiveJobsRequest::getJobGroupId()const
{
return jobGroupId_;
}
void CancelPredictiveJobsRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/CancelPredictiveJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CancelPredictiveJobsResult::CancelPredictiveJobsResult() :
ServiceResult()
{}
CancelPredictiveJobsResult::CancelPredictiveJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelPredictiveJobsResult::~CancelPredictiveJobsResult()
{}
void CancelPredictiveJobsResult::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 CancelPredictiveJobsResult::getMessage()const
{
return message_;
}
int CancelPredictiveJobsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CancelPredictiveJobsResult::getCode()const
{
return code_;
}
bool CancelPredictiveJobsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,116 @@
/*
* 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/ccc/model/CreateBatchJobsRequest.h>
using AlibabaCloud::CCC::Model::CreateBatchJobsRequest;
CreateBatchJobsRequest::CreateBatchJobsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateBatchJobs")
{}
CreateBatchJobsRequest::~CreateBatchJobsRequest()
{}
std::vector<std::string> CreateBatchJobsRequest::getCallingNumber()const
{
return callingNumber_;
}
void CreateBatchJobsRequest::setCallingNumber(const std::vector<std::string>& callingNumber)
{
callingNumber_ = callingNumber;
for(int i = 0; i!= callingNumber.size(); i++)
setParameter("CallingNumber."+ std::to_string(i), callingNumber.at(i));
}
std::string CreateBatchJobsRequest::getInstanceId()const
{
return instanceId_;
}
void CreateBatchJobsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
bool CreateBatchJobsRequest::getSubmitted()const
{
return submitted_;
}
void CreateBatchJobsRequest::setSubmitted(bool submitted)
{
submitted_ = submitted;
setParameter("Submitted", std::to_string(submitted));
}
std::string CreateBatchJobsRequest::getStrategyJson()const
{
return strategyJson_;
}
void CreateBatchJobsRequest::setStrategyJson(const std::string& strategyJson)
{
strategyJson_ = strategyJson;
setParameter("StrategyJson", strategyJson);
}
std::string CreateBatchJobsRequest::getName()const
{
return name_;
}
void CreateBatchJobsRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateBatchJobsRequest::getDescription()const
{
return description_;
}
void CreateBatchJobsRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateBatchJobsRequest::getScenarioId()const
{
return scenarioId_;
}
void CreateBatchJobsRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}
std::string CreateBatchJobsRequest::getJobFilePath()const
{
return jobFilePath_;
}
void CreateBatchJobsRequest::setJobFilePath(const std::string& jobFilePath)
{
jobFilePath_ = jobFilePath;
setParameter("JobFilePath", jobFilePath);
}

View 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/ccc/model/CreateBatchJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateBatchJobsResult::CreateBatchJobsResult() :
ServiceResult()
{}
CreateBatchJobsResult::CreateBatchJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateBatchJobsResult::~CreateBatchJobsResult()
{}
void CreateBatchJobsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobGroupNode = value["JobGroup"];
if(!jobGroupNode["JobGroupId"].isNull())
jobGroup_.jobGroupId = jobGroupNode["JobGroupId"].asString();
if(!jobGroupNode["JobGroupName"].isNull())
jobGroup_.jobGroupName = jobGroupNode["JobGroupName"].asString();
if(!jobGroupNode["JobGroupDescription"].isNull())
jobGroup_.jobGroupDescription = jobGroupNode["JobGroupDescription"].asString();
if(!jobGroupNode["ScenarioId"].isNull())
jobGroup_.scenarioId = jobGroupNode["ScenarioId"].asString();
if(!jobGroupNode["JobFilePath"].isNull())
jobGroup_.jobFilePath = jobGroupNode["JobFilePath"].asString();
if(!jobGroupNode["CreationTime"].isNull())
jobGroup_.creationTime = std::stol(jobGroupNode["CreationTime"].asString());
auto strategyNode = jobGroupNode["Strategy"];
if(!strategyNode["StrategyId"].isNull())
jobGroup_.strategy.strategyId = strategyNode["StrategyId"].asString();
if(!strategyNode["StrategyName"].isNull())
jobGroup_.strategy.strategyName = strategyNode["StrategyName"].asString();
if(!strategyNode["StrategyDescription"].isNull())
jobGroup_.strategy.strategyDescription = strategyNode["StrategyDescription"].asString();
if(!strategyNode["Type"].isNull())
jobGroup_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
jobGroup_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
jobGroup_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
jobGroup_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
jobGroup_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
jobGroup_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
jobGroup_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
jobGroup_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
jobGroup_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
jobGroup_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
JobGroup::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
jobGroup_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
jobGroup_.strategy.repeatDays.push_back(value.asString());
auto allCallingNumbers = jobGroupNode["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobGroup_.callingNumbers.push_back(value.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());
}
CreateBatchJobsResult::JobGroup CreateBatchJobsResult::getJobGroup()const
{
return jobGroup_;
}
std::string CreateBatchJobsResult::getMessage()const
{
return message_;
}
int CreateBatchJobsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateBatchJobsResult::getCode()const
{
return code_;
}
bool CreateBatchJobsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,94 @@
/*
* 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/ccc/model/CreateJobGroupRequest.h>
using AlibabaCloud::CCC::Model::CreateJobGroupRequest;
CreateJobGroupRequest::CreateJobGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateJobGroup")
{}
CreateJobGroupRequest::~CreateJobGroupRequest()
{}
std::vector<std::string> CreateJobGroupRequest::getCallingNumber()const
{
return callingNumber_;
}
void CreateJobGroupRequest::setCallingNumber(const std::vector<std::string>& callingNumber)
{
callingNumber_ = callingNumber;
for(int i = 0; i!= callingNumber.size(); i++)
setParameter("CallingNumber."+ std::to_string(i), callingNumber.at(i));
}
std::string CreateJobGroupRequest::getInstanceId()const
{
return instanceId_;
}
void CreateJobGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreateJobGroupRequest::getStrategyJson()const
{
return strategyJson_;
}
void CreateJobGroupRequest::setStrategyJson(const std::string& strategyJson)
{
strategyJson_ = strategyJson;
setParameter("StrategyJson", strategyJson);
}
std::string CreateJobGroupRequest::getName()const
{
return name_;
}
void CreateJobGroupRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateJobGroupRequest::getDescription()const
{
return description_;
}
void CreateJobGroupRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateJobGroupRequest::getScenarioId()const
{
return scenarioId_;
}
void CreateJobGroupRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View 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/ccc/model/CreateJobGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateJobGroupResult::CreateJobGroupResult() :
ServiceResult()
{}
CreateJobGroupResult::CreateJobGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateJobGroupResult::~CreateJobGroupResult()
{}
void CreateJobGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobGroupNode = value["JobGroup"];
if(!jobGroupNode["JobGroupId"].isNull())
jobGroup_.jobGroupId = jobGroupNode["JobGroupId"].asString();
if(!jobGroupNode["JobGroupName"].isNull())
jobGroup_.jobGroupName = jobGroupNode["JobGroupName"].asString();
if(!jobGroupNode["JobGroupDescription"].isNull())
jobGroup_.jobGroupDescription = jobGroupNode["JobGroupDescription"].asString();
if(!jobGroupNode["ScenarioId"].isNull())
jobGroup_.scenarioId = jobGroupNode["ScenarioId"].asString();
if(!jobGroupNode["JobFilePath"].isNull())
jobGroup_.jobFilePath = jobGroupNode["JobFilePath"].asString();
if(!jobGroupNode["CreationTime"].isNull())
jobGroup_.creationTime = std::stol(jobGroupNode["CreationTime"].asString());
auto strategyNode = jobGroupNode["Strategy"];
if(!strategyNode["StrategyId"].isNull())
jobGroup_.strategy.strategyId = strategyNode["StrategyId"].asString();
if(!strategyNode["StrategyName"].isNull())
jobGroup_.strategy.strategyName = strategyNode["StrategyName"].asString();
if(!strategyNode["StrategyDescription"].isNull())
jobGroup_.strategy.strategyDescription = strategyNode["StrategyDescription"].asString();
if(!strategyNode["Type"].isNull())
jobGroup_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
jobGroup_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
jobGroup_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
jobGroup_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
jobGroup_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
jobGroup_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
jobGroup_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
jobGroup_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
jobGroup_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
jobGroup_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
JobGroup::Strategy::TimeFrame timeFrameObject;
if(!value["From"].isNull())
timeFrameObject.from = value["From"].asString();
if(!value["To"].isNull())
timeFrameObject.to = value["To"].asString();
jobGroup_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
jobGroup_.strategy.repeatDays.push_back(value.asString());
auto allCallingNumbers = jobGroupNode["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobGroup_.callingNumbers.push_back(value.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());
}
CreateJobGroupResult::JobGroup CreateJobGroupResult::getJobGroup()const
{
return jobGroup_;
}
std::string CreateJobGroupResult::getMessage()const
{
return message_;
}
int CreateJobGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateJobGroupResult::getCode()const
{
return code_;
}
bool CreateJobGroupResult::getSuccess()const
{
return success_;
}

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/ccc/model/CreatePredictiveJobsRequest.h>
using AlibabaCloud::CCC::Model::CreatePredictiveJobsRequest;
CreatePredictiveJobsRequest::CreatePredictiveJobsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreatePredictiveJobs")
{}
CreatePredictiveJobsRequest::~CreatePredictiveJobsRequest()
{}
std::string CreatePredictiveJobsRequest::getInstanceId()const
{
return instanceId_;
}
void CreatePredictiveJobsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreatePredictiveJobsRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void CreatePredictiveJobsRequest::setSkillGroupId(const std::string& skillGroupId)
{
skillGroupId_ = skillGroupId;
setParameter("SkillGroupId", skillGroupId);
}
std::string CreatePredictiveJobsRequest::getStrategyJson()const
{
return strategyJson_;
}
void CreatePredictiveJobsRequest::setStrategyJson(const std::string& strategyJson)
{
strategyJson_ = strategyJson;
setParameter("StrategyJson", strategyJson);
}
std::vector<std::string> CreatePredictiveJobsRequest::getJobsJson()const
{
return jobsJson_;
}
void CreatePredictiveJobsRequest::setJobsJson(const std::vector<std::string>& jobsJson)
{
jobsJson_ = jobsJson;
for(int i = 0; i!= jobsJson.size(); i++)
setParameter("JobsJson."+ std::to_string(i), jobsJson.at(i));
}

View File

@@ -0,0 +1,80 @@
/*
* 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/ccc/model/CreatePredictiveJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreatePredictiveJobsResult::CreatePredictiveJobsResult() :
ServiceResult()
{}
CreatePredictiveJobsResult::CreatePredictiveJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreatePredictiveJobsResult::~CreatePredictiveJobsResult()
{}
void CreatePredictiveJobsResult::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["JobGroupId"].isNull())
jobGroupId_ = value["JobGroupId"].asString();
}
std::string CreatePredictiveJobsResult::getJobGroupId()const
{
return jobGroupId_;
}
std::string CreatePredictiveJobsResult::getMessage()const
{
return message_;
}
int CreatePredictiveJobsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreatePredictiveJobsResult::getCode()const
{
return code_;
}
bool CreatePredictiveJobsResult::getSuccess()const
{
return success_;
}

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/ccc/model/CreateScenarioFromTemplateRequest.h>
using AlibabaCloud::CCC::Model::CreateScenarioFromTemplateRequest;
CreateScenarioFromTemplateRequest::CreateScenarioFromTemplateRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateScenarioFromTemplate")
{}
CreateScenarioFromTemplateRequest::~CreateScenarioFromTemplateRequest()
{}
std::string CreateScenarioFromTemplateRequest::getVariables()const
{
return variables_;
}
void CreateScenarioFromTemplateRequest::setVariables(const std::string& variables)
{
variables_ = variables;
setParameter("Variables", variables);
}
std::string CreateScenarioFromTemplateRequest::getInstanceId()const
{
return instanceId_;
}
void CreateScenarioFromTemplateRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreateScenarioFromTemplateRequest::getName()const
{
return name_;
}
void CreateScenarioFromTemplateRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateScenarioFromTemplateRequest::getDescription()const
{
return description_;
}
void CreateScenarioFromTemplateRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateScenarioFromTemplateRequest::getTemplateId()const
{
return templateId_;
}
void CreateScenarioFromTemplateRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setParameter("TemplateId", templateId);
}

View File

@@ -0,0 +1,167 @@
/*
* 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/ccc/model/CreateScenarioFromTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateScenarioFromTemplateResult::CreateScenarioFromTemplateResult() :
ServiceResult()
{}
CreateScenarioFromTemplateResult::CreateScenarioFromTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateScenarioFromTemplateResult::~CreateScenarioFromTemplateResult()
{}
void CreateScenarioFromTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto scenarioNode = value["Scenario"];
if(!scenarioNode["ScenarioId"].isNull())
scenario_.scenarioId = scenarioNode["ScenarioId"].asString();
if(!scenarioNode["ScenarioName"].isNull())
scenario_.scenarioName = scenarioNode["ScenarioName"].asString();
if(!scenarioNode["ScenarioDescription"].isNull())
scenario_.scenarioDescription = scenarioNode["ScenarioDescription"].asString();
if(!scenarioNode["Type"].isNull())
scenario_.type = scenarioNode["Type"].asString();
if(!scenarioNode["IsTemplate"].isNull())
scenario_.isTemplate = scenarioNode["IsTemplate"].asString() == "true";
auto allSurveys = value["Surveys"]["Survey"];
for (auto value : allSurveys)
{
Scenario::Survey surveyObject;
if(!value["SurveyId"].isNull())
surveyObject.surveyId = value["SurveyId"].asString();
if(!value["SurveyName"].isNull())
surveyObject.surveyName = value["SurveyName"].asString();
if(!value["SurveyDescription"].isNull())
surveyObject.surveyDescription = value["SurveyDescription"].asString();
if(!value["Role"].isNull())
surveyObject.role = value["Role"].asString();
if(!value["Round"].isNull())
surveyObject.round = std::stoi(value["Round"].asString());
if(!value["BeebotId"].isNull())
surveyObject.beebotId = value["BeebotId"].asString();
auto allIntents = value["Intents"]["IntentNode"];
for (auto value : allIntents)
{
Scenario::Survey::IntentNode intentsObject;
if(!value["NodeId"].isNull())
intentsObject.nodeId = value["NodeId"].asString();
if(!value["IntentId"].isNull())
intentsObject.intentId = value["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);
}
auto allVariables = value["Variables"]["KeyValuePair"];
for (auto value : allVariables)
{
Scenario::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
scenario_.variables.push_back(keyValuePairObject);
}
auto strategyNode = scenarioNode["Strategy"];
if(!strategyNode["StrategyId"].isNull())
scenario_.strategy.strategyId = strategyNode["StrategyId"].asString();
if(!strategyNode["StrategyName"].isNull())
scenario_.strategy.strategyName = strategyNode["StrategyName"].asString();
if(!strategyNode["StrategyDescription"].isNull())
scenario_.strategy.strategyDescription = strategyNode["StrategyDescription"].asString();
if(!strategyNode["Type"].isNull())
scenario_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
scenario_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
scenario_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
scenario_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
scenario_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
scenario_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
scenario_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
scenario_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
scenario_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
scenario_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
Scenario::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
scenario_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
scenario_.strategy.repeatDays.push_back(value.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 CreateScenarioFromTemplateResult::getMessage()const
{
return message_;
}
int CreateScenarioFromTemplateResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateScenarioFromTemplateResult::getCode()const
{
return code_;
}
bool CreateScenarioFromTemplateResult::getSuccess()const
{
return success_;
}
CreateScenarioFromTemplateResult::Scenario CreateScenarioFromTemplateResult::getScenario()const
{
return scenario_;
}

View File

@@ -0,0 +1,94 @@
/*
* 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/ccc/model/CreateScenarioRequest.h>
using AlibabaCloud::CCC::Model::CreateScenarioRequest;
CreateScenarioRequest::CreateScenarioRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateScenario")
{}
CreateScenarioRequest::~CreateScenarioRequest()
{}
std::string CreateScenarioRequest::getInstanceId()const
{
return instanceId_;
}
void CreateScenarioRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::vector<std::string> CreateScenarioRequest::getSurveysJson()const
{
return surveysJson_;
}
void CreateScenarioRequest::setSurveysJson(const std::vector<std::string>& surveysJson)
{
surveysJson_ = surveysJson;
for(int i = 0; i!= surveysJson.size(); i++)
setParameter("SurveysJson."+ std::to_string(i), surveysJson.at(i));
}
std::string CreateScenarioRequest::getStrategyJson()const
{
return strategyJson_;
}
void CreateScenarioRequest::setStrategyJson(const std::string& strategyJson)
{
strategyJson_ = strategyJson;
setParameter("StrategyJson", strategyJson);
}
std::string CreateScenarioRequest::getName()const
{
return name_;
}
void CreateScenarioRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateScenarioRequest::getDescription()const
{
return description_;
}
void CreateScenarioRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateScenarioRequest::getType()const
{
return type_;
}
void CreateScenarioRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}

View File

@@ -0,0 +1,167 @@
/*
* 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/ccc/model/CreateScenarioResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateScenarioResult::CreateScenarioResult() :
ServiceResult()
{}
CreateScenarioResult::CreateScenarioResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateScenarioResult::~CreateScenarioResult()
{}
void CreateScenarioResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto scenarioNode = value["Scenario"];
if(!scenarioNode["ScenarioId"].isNull())
scenario_.scenarioId = scenarioNode["ScenarioId"].asString();
if(!scenarioNode["ScenarioName"].isNull())
scenario_.scenarioName = scenarioNode["ScenarioName"].asString();
if(!scenarioNode["ScenarioDescription"].isNull())
scenario_.scenarioDescription = scenarioNode["ScenarioDescription"].asString();
if(!scenarioNode["Type"].isNull())
scenario_.type = scenarioNode["Type"].asString();
if(!scenarioNode["IsTemplate"].isNull())
scenario_.isTemplate = scenarioNode["IsTemplate"].asString() == "true";
auto allSurveys = value["Surveys"]["Survey"];
for (auto value : allSurveys)
{
Scenario::Survey surveyObject;
if(!value["SurveyId"].isNull())
surveyObject.surveyId = value["SurveyId"].asString();
if(!value["SurveyName"].isNull())
surveyObject.surveyName = value["SurveyName"].asString();
if(!value["SurveyDescription"].isNull())
surveyObject.surveyDescription = value["SurveyDescription"].asString();
if(!value["Role"].isNull())
surveyObject.role = value["Role"].asString();
if(!value["Round"].isNull())
surveyObject.round = std::stoi(value["Round"].asString());
if(!value["BeebotId"].isNull())
surveyObject.beebotId = value["BeebotId"].asString();
auto allIntents = value["Intents"]["IntentNode"];
for (auto value : allIntents)
{
Scenario::Survey::IntentNode intentsObject;
if(!value["NodeId"].isNull())
intentsObject.nodeId = value["NodeId"].asString();
if(!value["IntentId"].isNull())
intentsObject.intentId = value["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);
}
auto allVariables = value["Variables"]["KeyValuePair"];
for (auto value : allVariables)
{
Scenario::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
scenario_.variables.push_back(keyValuePairObject);
}
auto strategyNode = scenarioNode["Strategy"];
if(!strategyNode["StrategyId"].isNull())
scenario_.strategy.strategyId = strategyNode["StrategyId"].asString();
if(!strategyNode["StrategyName"].isNull())
scenario_.strategy.strategyName = strategyNode["StrategyName"].asString();
if(!strategyNode["StrategyDescription"].isNull())
scenario_.strategy.strategyDescription = strategyNode["StrategyDescription"].asString();
if(!strategyNode["Type"].isNull())
scenario_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
scenario_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
scenario_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
scenario_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
scenario_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
scenario_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
scenario_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
scenario_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
scenario_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
scenario_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
Scenario::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
scenario_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
scenario_.strategy.repeatDays.push_back(value.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 CreateScenarioResult::getMessage()const
{
return message_;
}
int CreateScenarioResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateScenarioResult::getCode()const
{
return code_;
}
bool CreateScenarioResult::getSuccess()const
{
return success_;
}
CreateScenarioResult::Scenario CreateScenarioResult::getScenario()const
{
return scenario_;
}

View File

@@ -0,0 +1,107 @@
/*
* 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/ccc/model/CreateSkillGroupRequest.h>
using AlibabaCloud::CCC::Model::CreateSkillGroupRequest;
CreateSkillGroupRequest::CreateSkillGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateSkillGroup")
{}
CreateSkillGroupRequest::~CreateSkillGroupRequest()
{}
std::vector<int> CreateSkillGroupRequest::getSkillLevel()const
{
return skillLevel_;
}
void CreateSkillGroupRequest::setSkillLevel(const std::vector<int>& skillLevel)
{
skillLevel_ = skillLevel;
for(int i = 0; i!= skillLevel.size(); i++)
setParameter("SkillLevel."+ std::to_string(i), std::to_string(skillLevel.at(i)));
}
std::string CreateSkillGroupRequest::getInstanceId()const
{
return instanceId_;
}
void CreateSkillGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::vector<std::string> CreateSkillGroupRequest::getOutboundPhoneNumberId()const
{
return outboundPhoneNumberId_;
}
void CreateSkillGroupRequest::setOutboundPhoneNumberId(const std::vector<std::string>& outboundPhoneNumberId)
{
outboundPhoneNumberId_ = outboundPhoneNumberId;
for(int i = 0; i!= outboundPhoneNumberId.size(); i++)
setParameter("OutboundPhoneNumberId."+ std::to_string(i), outboundPhoneNumberId.at(i));
}
std::string CreateSkillGroupRequest::getName()const
{
return name_;
}
void CreateSkillGroupRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateSkillGroupRequest::getDescription()const
{
return description_;
}
void CreateSkillGroupRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::vector<std::string> CreateSkillGroupRequest::getUserId()const
{
return userId_;
}
void CreateSkillGroupRequest::setUserId(const std::vector<std::string>& userId)
{
userId_ = userId;
for(int i = 0; i!= userId.size(); i++)
setParameter("UserId."+ std::to_string(i), userId.at(i));
}
std::string CreateSkillGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateSkillGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,80 @@
/*
* 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/ccc/model/CreateSkillGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateSkillGroupResult::CreateSkillGroupResult() :
ServiceResult()
{}
CreateSkillGroupResult::CreateSkillGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateSkillGroupResult::~CreateSkillGroupResult()
{}
void CreateSkillGroupResult::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["SkillGroupId"].isNull())
skillGroupId_ = value["SkillGroupId"].asString();
}
std::string CreateSkillGroupResult::getMessage()const
{
return message_;
}
int CreateSkillGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateSkillGroupResult::getSkillGroupId()const
{
return skillGroupId_;
}
std::string CreateSkillGroupResult::getCode()const
{
return code_;
}
bool CreateSkillGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,137 @@
/*
* 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/ccc/model/CreateSurveyRequest.h>
using AlibabaCloud::CCC::Model::CreateSurveyRequest;
CreateSurveyRequest::CreateSurveyRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateSurvey")
{}
CreateSurveyRequest::~CreateSurveyRequest()
{}
std::string CreateSurveyRequest::getInstanceId()const
{
return instanceId_;
}
void CreateSurveyRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreateSurveyRequest::getRole()const
{
return role_;
}
void CreateSurveyRequest::setRole(const std::string& role)
{
role_ = role;
setParameter("Role", role);
}
int CreateSurveyRequest::getRound()const
{
return round_;
}
void CreateSurveyRequest::setRound(int round)
{
round_ = round;
setParameter("Round", std::to_string(round));
}
std::string CreateSurveyRequest::getFlowJson()const
{
return flowJson_;
}
void CreateSurveyRequest::setFlowJson(const std::string& flowJson)
{
flowJson_ = flowJson;
setParameter("FlowJson", flowJson);
}
std::string CreateSurveyRequest::getName()const
{
return name_;
}
void CreateSurveyRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateSurveyRequest::getGlobalQuestions()const
{
return globalQuestions_;
}
void CreateSurveyRequest::setGlobalQuestions(const std::string& globalQuestions)
{
globalQuestions_ = globalQuestions;
setParameter("GlobalQuestions", globalQuestions);
}
std::string CreateSurveyRequest::getDescription()const
{
return description_;
}
void CreateSurveyRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateSurveyRequest::getCorpora()const
{
return corpora_;
}
void CreateSurveyRequest::setCorpora(const std::string& corpora)
{
corpora_ = corpora;
setParameter("Corpora", corpora);
}
std::string CreateSurveyRequest::getSpeechOptimizationParam()const
{
return speechOptimizationParam_;
}
void CreateSurveyRequest::setSpeechOptimizationParam(const std::string& speechOptimizationParam)
{
speechOptimizationParam_ = speechOptimizationParam;
setParameter("SpeechOptimizationParam", speechOptimizationParam);
}
std::string CreateSurveyRequest::getScenarioId()const
{
return scenarioId_;
}
void CreateSurveyRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/ccc/model/CreateSurveyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateSurveyResult::CreateSurveyResult() :
ServiceResult()
{}
CreateSurveyResult::CreateSurveyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateSurveyResult::~CreateSurveyResult()
{}
void CreateSurveyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto surveyNode = value["Survey"];
if(!surveyNode["Id"].isNull())
survey_.id = surveyNode["Id"].asString();
if(!surveyNode["ScenarioUuid"].isNull())
survey_.scenarioUuid = surveyNode["ScenarioUuid"].asString();
if(!surveyNode["Name"].isNull())
survey_.name = surveyNode["Name"].asString();
if(!surveyNode["Description"].isNull())
survey_.description = surveyNode["Description"].asString();
if(!surveyNode["Role"].isNull())
survey_.role = surveyNode["Role"].asString();
if(!surveyNode["Round"].isNull())
survey_.round = std::stoi(surveyNode["Round"].asString());
if(!surveyNode["HotWords"].isNull())
survey_.hotWords = surveyNode["HotWords"].asString();
if(!surveyNode["SpeechOptimizationParam"].isNull())
survey_.speechOptimizationParam = surveyNode["SpeechOptimizationParam"].asString();
if(!surveyNode["GlobalQuestions"].isNull())
survey_.globalQuestions = surveyNode["GlobalQuestions"].asString();
auto flowNode = surveyNode["Flow"];
if(!flowNode["FlowId"].isNull())
survey_.flow.flowId = flowNode["FlowId"].asString();
if(!flowNode["IsPublished"].isNull())
survey_.flow.isPublished = flowNode["IsPublished"].asString() == "true";
if(!flowNode["FlowJson"].isNull())
survey_.flow.flowJson = flowNode["FlowJson"].asString();
auto asrCustomModelNode = surveyNode["AsrCustomModel"];
if(!asrCustomModelNode["Corpora"].isNull())
survey_.asrCustomModel.corpora = asrCustomModelNode["Corpora"].asString();
if(!asrCustomModelNode["CustomModelStatus"].isNull())
survey_.asrCustomModel.customModelStatus = std::stoi(asrCustomModelNode["CustomModelStatus"].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());
}
CreateSurveyResult::Survey CreateSurveyResult::getSurvey()const
{
return survey_;
}
std::string CreateSurveyResult::getMessage()const
{
return message_;
}
int CreateSurveyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateSurveyResult::getCode()const
{
return code_;
}
bool CreateSurveyResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,129 @@
/*
* 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/ccc/model/CreateUserRequest.h>
using AlibabaCloud::CCC::Model::CreateUserRequest;
CreateUserRequest::CreateUserRequest() :
RpcServiceRequest("ccc", "2017-07-05", "CreateUser")
{}
CreateUserRequest::~CreateUserRequest()
{}
std::vector<int> CreateUserRequest::getSkillLevel()const
{
return skillLevel_;
}
void CreateUserRequest::setSkillLevel(const std::vector<int>& skillLevel)
{
skillLevel_ = skillLevel;
for(int i = 0; i!= skillLevel.size(); i++)
setParameter("SkillLevel."+ std::to_string(i), std::to_string(skillLevel.at(i)));
}
std::string CreateUserRequest::getInstanceId()const
{
return instanceId_;
}
void CreateUserRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreateUserRequest::getLoginName()const
{
return loginName_;
}
void CreateUserRequest::setLoginName(const std::string& loginName)
{
loginName_ = loginName;
setParameter("LoginName", loginName);
}
std::string CreateUserRequest::getPhone()const
{
return phone_;
}
void CreateUserRequest::setPhone(const std::string& phone)
{
phone_ = phone;
setParameter("Phone", phone);
}
std::vector<std::string> CreateUserRequest::getRoleId()const
{
return roleId_;
}
void CreateUserRequest::setRoleId(const std::vector<std::string>& roleId)
{
roleId_ = roleId;
for(int i = 0; i!= roleId.size(); i++)
setParameter("RoleId."+ std::to_string(i), roleId.at(i));
}
std::string CreateUserRequest::getDisplayName()const
{
return displayName_;
}
void CreateUserRequest::setDisplayName(const std::string& displayName)
{
displayName_ = displayName;
setParameter("DisplayName", displayName);
}
std::vector<std::string> CreateUserRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void CreateUserRequest::setSkillGroupId(const std::vector<std::string>& skillGroupId)
{
skillGroupId_ = skillGroupId;
for(int i = 0; i!= skillGroupId.size(); i++)
setParameter("SkillGroupId."+ std::to_string(i), skillGroupId.at(i));
}
std::string CreateUserRequest::getEmail()const
{
return email_;
}
void CreateUserRequest::setEmail(const std::string& email)
{
email_ = email;
setParameter("Email", email);
}
std::string CreateUserRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateUserRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,80 @@
/*
* 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/ccc/model/CreateUserResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
CreateUserResult::CreateUserResult() :
ServiceResult()
{}
CreateUserResult::CreateUserResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateUserResult::~CreateUserResult()
{}
void CreateUserResult::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["UserId"].isNull())
userId_ = value["UserId"].asString();
}
std::string CreateUserResult::getMessage()const
{
return message_;
}
std::string CreateUserResult::getUserId()const
{
return userId_;
}
int CreateUserResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateUserResult::getCode()const
{
return code_;
}
bool CreateUserResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/DeleteJobGroupRequest.h>
using AlibabaCloud::CCC::Model::DeleteJobGroupRequest;
DeleteJobGroupRequest::DeleteJobGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "DeleteJobGroup")
{}
DeleteJobGroupRequest::~DeleteJobGroupRequest()
{}
std::string DeleteJobGroupRequest::getInstanceId()const
{
return instanceId_;
}
void DeleteJobGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DeleteJobGroupRequest::getJobGroupId()const
{
return jobGroupId_;
}
void DeleteJobGroupRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/DeleteJobGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
DeleteJobGroupResult::DeleteJobGroupResult() :
ServiceResult()
{}
DeleteJobGroupResult::DeleteJobGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteJobGroupResult::~DeleteJobGroupResult()
{}
void DeleteJobGroupResult::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 DeleteJobGroupResult::getMessage()const
{
return message_;
}
int DeleteJobGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DeleteJobGroupResult::getCode()const
{
return code_;
}
bool DeleteJobGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -40,34 +40,34 @@ void DeleteSkillGroupResult::parse(const std::string &payload)
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["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 DeleteSkillGroupResult::getMessage()const
{
return message_;
}
int DeleteSkillGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DeleteSkillGroupResult::getCode()const
{
return code_;
}
bool DeleteSkillGroupResult::getSuccess()const
{
return success_;
}
std::string DeleteSkillGroupResult::getMessage()const
{
return message_;
}
int DeleteSkillGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DeleteSkillGroupResult::getCode()const
{
return code_;
}
bool DeleteSkillGroupResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/DeleteSurveyRequest.h>
using AlibabaCloud::CCC::Model::DeleteSurveyRequest;
DeleteSurveyRequest::DeleteSurveyRequest() :
RpcServiceRequest("ccc", "2017-07-05", "DeleteSurvey")
{}
DeleteSurveyRequest::~DeleteSurveyRequest()
{}
std::string DeleteSurveyRequest::getSurveyId()const
{
return surveyId_;
}
void DeleteSurveyRequest::setSurveyId(const std::string& surveyId)
{
surveyId_ = surveyId;
setParameter("SurveyId", surveyId);
}
std::string DeleteSurveyRequest::getInstanceId()const
{
return instanceId_;
}
void DeleteSurveyRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DeleteSurveyRequest::getScenarioId()const
{
return scenarioId_;
}
void DeleteSurveyRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/DeleteSurveyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
DeleteSurveyResult::DeleteSurveyResult() :
ServiceResult()
{}
DeleteSurveyResult::DeleteSurveyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteSurveyResult::~DeleteSurveyResult()
{}
void DeleteSurveyResult::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 DeleteSurveyResult::getMessage()const
{
return message_;
}
int DeleteSurveyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DeleteSurveyResult::getCode()const
{
return code_;
}
bool DeleteSurveyResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,126 @@
/*
* 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/ccc/model/DialogueRequest.h>
using AlibabaCloud::CCC::Model::DialogueRequest;
DialogueRequest::DialogueRequest() :
RpcServiceRequest("ccc", "2017-07-05", "Dialogue")
{}
DialogueRequest::~DialogueRequest()
{}
std::string DialogueRequest::getCallId()const
{
return callId_;
}
void DialogueRequest::setCallId(const std::string& callId)
{
callId_ = callId;
setParameter("CallId", callId);
}
std::string DialogueRequest::getCallingNumber()const
{
return callingNumber_;
}
void DialogueRequest::setCallingNumber(const std::string& callingNumber)
{
callingNumber_ = callingNumber;
setParameter("CallingNumber", callingNumber);
}
std::string DialogueRequest::getInstanceId()const
{
return instanceId_;
}
void DialogueRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DialogueRequest::getCalledNumber()const
{
return calledNumber_;
}
void DialogueRequest::setCalledNumber(const std::string& calledNumber)
{
calledNumber_ = calledNumber;
setParameter("CalledNumber", calledNumber);
}
std::string DialogueRequest::getActionParams()const
{
return actionParams_;
}
void DialogueRequest::setActionParams(const std::string& actionParams)
{
actionParams_ = actionParams;
setParameter("ActionParams", actionParams);
}
std::string DialogueRequest::getCallType()const
{
return callType_;
}
void DialogueRequest::setCallType(const std::string& callType)
{
callType_ = callType;
setParameter("CallType", callType);
}
std::string DialogueRequest::getScenarioId()const
{
return scenarioId_;
}
void DialogueRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}
std::string DialogueRequest::getTaskId()const
{
return taskId_;
}
void DialogueRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}
std::string DialogueRequest::getUtterance()const
{
return utterance_;
}
void DialogueRequest::setUtterance(const std::string& utterance)
{
utterance_ = utterance;
setParameter("Utterance", utterance);
}

View File

@@ -0,0 +1,85 @@
/*
* 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/ccc/model/DialogueResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
DialogueResult::DialogueResult() :
ServiceResult()
{}
DialogueResult::DialogueResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DialogueResult::~DialogueResult()
{}
void DialogueResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto feedbackNode = value["Feedback"];
if(!feedbackNode["Content"].isNull())
feedback_.content = feedbackNode["Content"].asString();
if(!feedbackNode["Action"].isNull())
feedback_.action = feedbackNode["Action"].asString();
if(!feedbackNode["ActionParams"].isNull())
feedback_.actionParams = feedbackNode["ActionParams"].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 DialogueResult::getMessage()const
{
return message_;
}
DialogueResult::Feedback DialogueResult::getFeedback()const
{
return feedback_;
}
int DialogueResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DialogueResult::getCode()const
{
return code_;
}
bool DialogueResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/DownloadOriginalStatisticsReportRequest.h>
using AlibabaCloud::CCC::Model::DownloadOriginalStatisticsReportRequest;
DownloadOriginalStatisticsReportRequest::DownloadOriginalStatisticsReportRequest() :
RpcServiceRequest("ccc", "2017-07-05", "DownloadOriginalStatisticsReport")
{}
DownloadOriginalStatisticsReportRequest::~DownloadOriginalStatisticsReportRequest()
{}
std::string DownloadOriginalStatisticsReportRequest::getInstanceId()const
{
return instanceId_;
}
void DownloadOriginalStatisticsReportRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DownloadOriginalStatisticsReportRequest::getJobGroupId()const
{
return jobGroupId_;
}
void DownloadOriginalStatisticsReportRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

View File

@@ -0,0 +1,81 @@
/*
* 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/ccc/model/DownloadOriginalStatisticsReportResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
DownloadOriginalStatisticsReportResult::DownloadOriginalStatisticsReportResult() :
ServiceResult()
{}
DownloadOriginalStatisticsReportResult::DownloadOriginalStatisticsReportResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DownloadOriginalStatisticsReportResult::~DownloadOriginalStatisticsReportResult()
{}
void DownloadOriginalStatisticsReportResult::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(!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());
}
DownloadOriginalStatisticsReportResult::DownloadParams DownloadOriginalStatisticsReportResult::getDownloadParams()const
{
return downloadParams_;
}
std::string DownloadOriginalStatisticsReportResult::getMessage()const
{
return message_;
}
int DownloadOriginalStatisticsReportResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DownloadOriginalStatisticsReportResult::getCode()const
{
return code_;
}
bool DownloadOriginalStatisticsReportResult::getSuccess()const
{
return success_;
}

View File

@@ -40,49 +40,44 @@ void DownloadRecordingResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allMediaDownloadParam = value["MediaDownloadParam"];
for (auto value : allMediaDownloadParam)
{
MediaDownloadParam mediaDownloadParamObject;
if(!value["SignatureUrl"].isNull())
mediaDownloadParamObject.signatureUrl = value["SignatureUrl"].asString();
if(!value["FileName"].isNull())
mediaDownloadParamObject.fileName = value["FileName"].asString();
mediaDownloadParam_.push_back(mediaDownloadParamObject);
}
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());
auto mediaDownloadParamNode = value["MediaDownloadParam"];
if(!mediaDownloadParamNode["SignatureUrl"].isNull())
mediaDownloadParam_.signatureUrl = mediaDownloadParamNode["SignatureUrl"].asString();
if(!mediaDownloadParamNode["FileName"].isNull())
mediaDownloadParam_.fileName = mediaDownloadParamNode["FileName"].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::vector<DownloadRecordingResult::MediaDownloadParam> DownloadRecordingResult::getMediaDownloadParam()const
{
return mediaDownloadParam_;
}
std::string DownloadRecordingResult::getMessage()const
{
return message_;
}
int DownloadRecordingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DownloadRecordingResult::getCode()const
{
return code_;
}
bool DownloadRecordingResult::getSuccess()const
{
return success_;
}
DownloadRecordingResult::MediaDownloadParam DownloadRecordingResult::getMediaDownloadParam()const
{
return mediaDownloadParam_;
}
std::string DownloadRecordingResult::getMessage()const
{
return message_;
}
int DownloadRecordingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DownloadRecordingResult::getCode()const
{
return code_;
}
bool DownloadRecordingResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/DownloadUnreachableContactsRequest.h>
using AlibabaCloud::CCC::Model::DownloadUnreachableContactsRequest;
DownloadUnreachableContactsRequest::DownloadUnreachableContactsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "DownloadUnreachableContacts")
{}
DownloadUnreachableContactsRequest::~DownloadUnreachableContactsRequest()
{}
std::string DownloadUnreachableContactsRequest::getInstanceId()const
{
return instanceId_;
}
void DownloadUnreachableContactsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DownloadUnreachableContactsRequest::getJobGroupId()const
{
return jobGroupId_;
}
void DownloadUnreachableContactsRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

View File

@@ -0,0 +1,81 @@
/*
* 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/ccc/model/DownloadUnreachableContactsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
DownloadUnreachableContactsResult::DownloadUnreachableContactsResult() :
ServiceResult()
{}
DownloadUnreachableContactsResult::DownloadUnreachableContactsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DownloadUnreachableContactsResult::~DownloadUnreachableContactsResult()
{}
void DownloadUnreachableContactsResult::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(!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());
}
DownloadUnreachableContactsResult::DownloadParams DownloadUnreachableContactsResult::getDownloadParams()const
{
return downloadParams_;
}
std::string DownloadUnreachableContactsResult::getMessage()const
{
return message_;
}
int DownloadUnreachableContactsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DownloadUnreachableContactsResult::getCode()const
{
return code_;
}
bool DownloadUnreachableContactsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,61 @@
/*
* 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/ccc/model/EncryptRequest.h>
using AlibabaCloud::CCC::Model::EncryptRequest;
EncryptRequest::EncryptRequest() :
RpcServiceRequest("ccc", "2017-07-05", "Encrypt")
{}
EncryptRequest::~EncryptRequest()
{}
std::string EncryptRequest::getPublicKey()const
{
return publicKey_;
}
void EncryptRequest::setPublicKey(const std::string& publicKey)
{
publicKey_ = publicKey;
setParameter("PublicKey", publicKey);
}
std::vector<std::string> EncryptRequest::getPlainText()const
{
return plainText_;
}
void EncryptRequest::setPlainText(const std::vector<std::string>& plainText)
{
plainText_ = plainText;
for(int i = 0; i!= plainText.size(); i++)
setParameter("PlainText."+ std::to_string(i), plainText.at(i));
}
std::string EncryptRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void EncryptRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,95 @@
/*
* 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/ccc/model/EncryptResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
EncryptResult::EncryptResult() :
ServiceResult()
{}
EncryptResult::EncryptResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EncryptResult::~EncryptResult()
{}
void EncryptResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCypherContents = value["CypherContents"]["CypherContent"];
for (auto value : allCypherContents)
{
CypherContent cypherContentsObject;
if(!value["PlainText"].isNull())
cypherContentsObject.plainText = value["PlainText"].asString();
if(!value["CypherText"].isNull())
cypherContentsObject.cypherText = value["CypherText"].asString();
cypherContents_.push_back(cypherContentsObject);
}
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["PublicKey"].isNull())
publicKey_ = value["PublicKey"].asString();
}
std::vector<EncryptResult::CypherContent> EncryptResult::getCypherContents()const
{
return cypherContents_;
}
std::string EncryptResult::getMessage()const
{
return message_;
}
std::string EncryptResult::getPublicKey()const
{
return publicKey_;
}
int EncryptResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string EncryptResult::getCode()const
{
return code_;
}
bool EncryptResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GenerateAgentStatisticReportRequest.h>
using AlibabaCloud::CCC::Model::GenerateAgentStatisticReportRequest;
GenerateAgentStatisticReportRequest::GenerateAgentStatisticReportRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GenerateAgentStatisticReport")
{}
GenerateAgentStatisticReportRequest::~GenerateAgentStatisticReportRequest()
{}
std::string GenerateAgentStatisticReportRequest::getAgentId()const
{
return agentId_;
}
void GenerateAgentStatisticReportRequest::setAgentId(const std::string& agentId)
{
agentId_ = agentId;
setParameter("AgentId", agentId);
}
std::string GenerateAgentStatisticReportRequest::getInstanceId()const
{
return instanceId_;
}
void GenerateAgentStatisticReportRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GenerateAgentStatisticReportRequest::getEndDate()const
{
return endDate_;
}
void GenerateAgentStatisticReportRequest::setEndDate(const std::string& endDate)
{
endDate_ = endDate;
setParameter("EndDate", endDate);
}
int GenerateAgentStatisticReportRequest::getPageSize()const
{
return pageSize_;
}
void GenerateAgentStatisticReportRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string GenerateAgentStatisticReportRequest::getStartDate()const
{
return startDate_;
}
void GenerateAgentStatisticReportRequest::setStartDate(const std::string& startDate)
{
startDate_ = startDate;
setParameter("StartDate", startDate);
}
int GenerateAgentStatisticReportRequest::getPageNumber()const
{
return pageNumber_;
}
void GenerateAgentStatisticReportRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string GenerateAgentStatisticReportRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GenerateAgentStatisticReportRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,220 @@
/*
* 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/ccc/model/GenerateAgentStatisticReportResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GenerateAgentStatisticReportResult::GenerateAgentStatisticReportResult() :
ServiceResult()
{}
GenerateAgentStatisticReportResult::GenerateAgentStatisticReportResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenerateAgentStatisticReportResult::~GenerateAgentStatisticReportResult()
{}
void GenerateAgentStatisticReportResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataListNode = value["DataList"];
if(!dataListNode["TotalCount"].isNull())
dataList_.totalCount = std::stoi(dataListNode["TotalCount"].asString());
if(!dataListNode["PageNumber"].isNull())
dataList_.pageNumber = std::stoi(dataListNode["PageNumber"].asString());
if(!dataListNode["PageSize"].isNull())
dataList_.pageSize = std::stoi(dataListNode["PageSize"].asString());
auto allList = value["List"]["GenerateAgentStatistic"];
for (auto value : allList)
{
DataList::GenerateAgentStatistic generateAgentStatisticObject;
if(!value["AgentId"].isNull())
generateAgentStatisticObject.agentId = value["AgentId"].asString();
if(!value["LoginName"].isNull())
generateAgentStatisticObject.loginName = value["LoginName"].asString();
if(!value["AgentName"].isNull())
generateAgentStatisticObject.agentName = value["AgentName"].asString();
if(!value["SkillGroupIds"].isNull())
generateAgentStatisticObject.skillGroupIds = value["SkillGroupIds"].asString();
if(!value["SkillGroupNames"].isNull())
generateAgentStatisticObject.skillGroupNames = value["SkillGroupNames"].asString();
if(!value["InstanceId"].isNull())
generateAgentStatisticObject.instanceId = value["InstanceId"].asString();
if(!value["RecordDate"].isNull())
generateAgentStatisticObject.recordDate = value["RecordDate"].asString();
if(!value["TotalLoggedInTime"].isNull())
generateAgentStatisticObject.totalLoggedInTime = std::stol(value["TotalLoggedInTime"].asString());
if(!value["TotalBreakTime"].isNull())
generateAgentStatisticObject.totalBreakTime = std::stol(value["TotalBreakTime"].asString());
if(!value["OccupancyRate"].isNull())
generateAgentStatisticObject.occupancyRate = std::stof(value["OccupancyRate"].asString());
if(!value["TotalReadyTime"].isNull())
generateAgentStatisticObject.totalReadyTime = std::stol(value["TotalReadyTime"].asString());
if(!value["MaxReadyTime"].isNull())
generateAgentStatisticObject.maxReadyTime = std::stol(value["MaxReadyTime"].asString());
if(!value["AverageReadyTime"].isNull())
generateAgentStatisticObject.averageReadyTime = std::stol(value["AverageReadyTime"].asString());
auto inboundNode = value["Inbound"];
if(!inboundNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.inbound.totalTalkTime = std::stol(inboundNode["TotalTalkTime"].asString());
if(!inboundNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.inbound.maxTalkTime = std::stol(inboundNode["MaxTalkTime"].asString());
if(!inboundNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.inbound.averageTalkTime = std::stol(inboundNode["AverageTalkTime"].asString());
if(!inboundNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.inbound.totalHoldTime = std::stol(inboundNode["TotalHoldTime"].asString());
if(!inboundNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.inbound.maxHoldTime = std::stol(inboundNode["MaxHoldTime"].asString());
if(!inboundNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.inbound.averageHoldTime = std::stol(inboundNode["AverageHoldTime"].asString());
if(!inboundNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.inbound.totalWorkTime = std::stol(inboundNode["TotalWorkTime"].asString());
if(!inboundNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.inbound.maxWorkTime = std::stol(inboundNode["MaxWorkTime"].asString());
if(!inboundNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.inbound.averageWorkTime = std::stol(inboundNode["AverageWorkTime"].asString());
if(!inboundNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.inbound.satisfactionSurveysOffered = std::stol(inboundNode["SatisfactionSurveysOffered"].asString());
if(!inboundNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.inbound.satisfactionSurveysResponded = std::stol(inboundNode["SatisfactionSurveysResponded"].asString());
if(!inboundNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.inbound.satisfactionIndex = std::stof(inboundNode["SatisfactionIndex"].asString());
if(!inboundNode["CallsOffered"].isNull())
generateAgentStatisticObject.inbound.callsOffered = std::stol(inboundNode["CallsOffered"].asString());
if(!inboundNode["CallsHandled"].isNull())
generateAgentStatisticObject.inbound.callsHandled = std::stol(inboundNode["CallsHandled"].asString());
if(!inboundNode["HandleRate"].isNull())
generateAgentStatisticObject.inbound.handleRate = std::stof(inboundNode["HandleRate"].asString());
if(!inboundNode["TotalRingTime"].isNull())
generateAgentStatisticObject.inbound.totalRingTime = std::stol(inboundNode["TotalRingTime"].asString());
if(!inboundNode["MaxRingTime"].isNull())
generateAgentStatisticObject.inbound.maxRingTime = std::stol(inboundNode["MaxRingTime"].asString());
if(!inboundNode["AverageRingTime"].isNull())
generateAgentStatisticObject.inbound.averageRingTime = std::stol(inboundNode["AverageRingTime"].asString());
auto outboundNode = value["Outbound"];
if(!outboundNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.outbound.totalTalkTime = std::stol(outboundNode["TotalTalkTime"].asString());
if(!outboundNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.outbound.maxTalkTime = std::stol(outboundNode["MaxTalkTime"].asString());
if(!outboundNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.outbound.averageTalkTime = std::stol(outboundNode["AverageTalkTime"].asString());
if(!outboundNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.outbound.totalHoldTime = std::stol(outboundNode["TotalHoldTime"].asString());
if(!outboundNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.outbound.maxHoldTime = std::stol(outboundNode["MaxHoldTime"].asString());
if(!outboundNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.outbound.averageHoldTime = std::stol(outboundNode["AverageHoldTime"].asString());
if(!outboundNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.outbound.totalWorkTime = std::stol(outboundNode["TotalWorkTime"].asString());
if(!outboundNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.outbound.maxWorkTime = std::stol(outboundNode["MaxWorkTime"].asString());
if(!outboundNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.outbound.averageWorkTime = std::stol(outboundNode["AverageWorkTime"].asString());
if(!outboundNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.outbound.satisfactionSurveysOffered = std::stol(outboundNode["SatisfactionSurveysOffered"].asString());
if(!outboundNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.outbound.satisfactionSurveysResponded = std::stol(outboundNode["SatisfactionSurveysResponded"].asString());
if(!outboundNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.outbound.satisfactionIndex = std::stof(outboundNode["SatisfactionIndex"].asString());
if(!outboundNode["CallsDialed"].isNull())
generateAgentStatisticObject.outbound.callsDialed = std::stol(outboundNode["CallsDialed"].asString());
if(!outboundNode["CallsAnswered"].isNull())
generateAgentStatisticObject.outbound.callsAnswered = std::stol(outboundNode["CallsAnswered"].asString());
if(!outboundNode["AnswerRate"].isNull())
generateAgentStatisticObject.outbound.answerRate = std::stof(outboundNode["AnswerRate"].asString());
if(!outboundNode["TotalDialingTime"].isNull())
generateAgentStatisticObject.outbound.totalDialingTime = std::stol(outboundNode["TotalDialingTime"].asString());
if(!outboundNode["TotalDialingTime"].isNull())
generateAgentStatisticObject.outbound.totalDialingTime1 = std::stol(outboundNode["TotalDialingTime"].asString());
if(!outboundNode["MaxDialingTime"].isNull())
generateAgentStatisticObject.outbound.maxDialingTime = std::stol(outboundNode["MaxDialingTime"].asString());
if(!outboundNode["AverageDialingTime"].isNull())
generateAgentStatisticObject.outbound.averageDialingTime = std::stol(outboundNode["AverageDialingTime"].asString());
auto overallNode = value["Overall"];
if(!overallNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.overall.totalTalkTime = std::stol(overallNode["TotalTalkTime"].asString());
if(!overallNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.overall.maxTalkTime = std::stol(overallNode["MaxTalkTime"].asString());
if(!overallNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.overall.averageTalkTime = std::stol(overallNode["AverageTalkTime"].asString());
if(!overallNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.overall.totalHoldTime = std::stol(overallNode["TotalHoldTime"].asString());
if(!overallNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.overall.maxHoldTime = std::stol(overallNode["MaxHoldTime"].asString());
if(!overallNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.overall.averageHoldTime = std::stol(overallNode["AverageHoldTime"].asString());
if(!overallNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.overall.totalWorkTime = std::stol(overallNode["TotalWorkTime"].asString());
if(!overallNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.overall.maxWorkTime = std::stol(overallNode["MaxWorkTime"].asString());
if(!overallNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.overall.averageWorkTime = std::stol(overallNode["AverageWorkTime"].asString());
if(!overallNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.overall.satisfactionSurveysOffered = std::stol(overallNode["SatisfactionSurveysOffered"].asString());
if(!overallNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.overall.satisfactionSurveysResponded = std::stol(overallNode["SatisfactionSurveysResponded"].asString());
if(!overallNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.overall.satisfactionIndex = std::stof(overallNode["SatisfactionIndex"].asString());
if(!overallNode["TotalCalls"].isNull())
generateAgentStatisticObject.overall.totalCalls = std::stol(overallNode["TotalCalls"].asString());
dataList_.list.push_back(generateAgentStatisticObject);
}
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());
}
GenerateAgentStatisticReportResult::DataList GenerateAgentStatisticReportResult::getDataList()const
{
return dataList_;
}
std::string GenerateAgentStatisticReportResult::getMessage()const
{
return message_;
}
int GenerateAgentStatisticReportResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GenerateAgentStatisticReportResult::getCode()const
{
return code_;
}
bool GenerateAgentStatisticReportResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetAgentDataRequest.h>
using AlibabaCloud::CCC::Model::GetAgentDataRequest;
GetAgentDataRequest::GetAgentDataRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetAgentData")
{}
GetAgentDataRequest::~GetAgentDataRequest()
{}
std::string GetAgentDataRequest::getInstanceId()const
{
return instanceId_;
}
void GetAgentDataRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetAgentDataRequest::getStartDay()const
{
return startDay_;
}
void GetAgentDataRequest::setStartDay(const std::string& startDay)
{
startDay_ = startDay;
setParameter("StartDay", startDay);
}
std::string GetAgentDataRequest::getEndDay()const
{
return endDay_;
}
void GetAgentDataRequest::setEndDay(const std::string& endDay)
{
endDay_ = endDay;
setParameter("EndDay", endDay);
}
int GetAgentDataRequest::getPageSize()const
{
return pageSize_;
}
void GetAgentDataRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string GetAgentDataRequest::getUserId()const
{
return userId_;
}
void GetAgentDataRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
}
int GetAgentDataRequest::getPageNumber()const
{
return pageNumber_;
}
void GetAgentDataRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string GetAgentDataRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetAgentDataRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,220 @@
/*
* 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/ccc/model/GetAgentDataResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetAgentDataResult::GetAgentDataResult() :
ServiceResult()
{}
GetAgentDataResult::GetAgentDataResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAgentDataResult::~GetAgentDataResult()
{}
void GetAgentDataResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataListNode = value["DataList"];
if(!dataListNode["TotalCount"].isNull())
dataList_.totalCount = std::stoi(dataListNode["TotalCount"].asString());
if(!dataListNode["PageNumber"].isNull())
dataList_.pageNumber = std::stoi(dataListNode["PageNumber"].asString());
if(!dataListNode["PageSize"].isNull())
dataList_.pageSize = std::stoi(dataListNode["PageSize"].asString());
auto allList = value["List"]["GenerateAgentStatistic"];
for (auto value : allList)
{
DataList::GenerateAgentStatistic generateAgentStatisticObject;
if(!value["AgentId"].isNull())
generateAgentStatisticObject.agentId = value["AgentId"].asString();
if(!value["LoginName"].isNull())
generateAgentStatisticObject.loginName = value["LoginName"].asString();
if(!value["AgentName"].isNull())
generateAgentStatisticObject.agentName = value["AgentName"].asString();
if(!value["SkillGroupIds"].isNull())
generateAgentStatisticObject.skillGroupIds = value["SkillGroupIds"].asString();
if(!value["SkillGroupNames"].isNull())
generateAgentStatisticObject.skillGroupNames = value["SkillGroupNames"].asString();
if(!value["InstanceId"].isNull())
generateAgentStatisticObject.instanceId = value["InstanceId"].asString();
if(!value["RecordDate"].isNull())
generateAgentStatisticObject.recordDate = value["RecordDate"].asString();
if(!value["TotalLoggedInTime"].isNull())
generateAgentStatisticObject.totalLoggedInTime = std::stol(value["TotalLoggedInTime"].asString());
if(!value["TotalBreakTime"].isNull())
generateAgentStatisticObject.totalBreakTime = std::stol(value["TotalBreakTime"].asString());
if(!value["OccupancyRate"].isNull())
generateAgentStatisticObject.occupancyRate = std::stof(value["OccupancyRate"].asString());
if(!value["TotalReadyTime"].isNull())
generateAgentStatisticObject.totalReadyTime = std::stol(value["TotalReadyTime"].asString());
if(!value["MaxReadyTime"].isNull())
generateAgentStatisticObject.maxReadyTime = std::stol(value["MaxReadyTime"].asString());
if(!value["AverageReadyTime"].isNull())
generateAgentStatisticObject.averageReadyTime = std::stol(value["AverageReadyTime"].asString());
auto inboundNode = value["Inbound"];
if(!inboundNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.inbound.totalTalkTime = std::stol(inboundNode["TotalTalkTime"].asString());
if(!inboundNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.inbound.maxTalkTime = std::stol(inboundNode["MaxTalkTime"].asString());
if(!inboundNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.inbound.averageTalkTime = std::stol(inboundNode["AverageTalkTime"].asString());
if(!inboundNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.inbound.totalHoldTime = std::stol(inboundNode["TotalHoldTime"].asString());
if(!inboundNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.inbound.maxHoldTime = std::stol(inboundNode["MaxHoldTime"].asString());
if(!inboundNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.inbound.averageHoldTime = std::stol(inboundNode["AverageHoldTime"].asString());
if(!inboundNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.inbound.totalWorkTime = std::stol(inboundNode["TotalWorkTime"].asString());
if(!inboundNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.inbound.maxWorkTime = std::stol(inboundNode["MaxWorkTime"].asString());
if(!inboundNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.inbound.averageWorkTime = std::stol(inboundNode["AverageWorkTime"].asString());
if(!inboundNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.inbound.satisfactionSurveysOffered = std::stol(inboundNode["SatisfactionSurveysOffered"].asString());
if(!inboundNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.inbound.satisfactionSurveysResponded = std::stol(inboundNode["SatisfactionSurveysResponded"].asString());
if(!inboundNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.inbound.satisfactionIndex = std::stof(inboundNode["SatisfactionIndex"].asString());
if(!inboundNode["CallsOffered"].isNull())
generateAgentStatisticObject.inbound.callsOffered = std::stol(inboundNode["CallsOffered"].asString());
if(!inboundNode["CallsHandled"].isNull())
generateAgentStatisticObject.inbound.callsHandled = std::stol(inboundNode["CallsHandled"].asString());
if(!inboundNode["HandleRate"].isNull())
generateAgentStatisticObject.inbound.handleRate = std::stof(inboundNode["HandleRate"].asString());
if(!inboundNode["TotalRingTime"].isNull())
generateAgentStatisticObject.inbound.totalRingTime = std::stol(inboundNode["TotalRingTime"].asString());
if(!inboundNode["MaxRingTime"].isNull())
generateAgentStatisticObject.inbound.maxRingTime = std::stol(inboundNode["MaxRingTime"].asString());
if(!inboundNode["AverageRingTime"].isNull())
generateAgentStatisticObject.inbound.averageRingTime = std::stol(inboundNode["AverageRingTime"].asString());
auto outboundNode = value["Outbound"];
if(!outboundNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.outbound.totalTalkTime = std::stol(outboundNode["TotalTalkTime"].asString());
if(!outboundNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.outbound.maxTalkTime = std::stol(outboundNode["MaxTalkTime"].asString());
if(!outboundNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.outbound.averageTalkTime = std::stol(outboundNode["AverageTalkTime"].asString());
if(!outboundNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.outbound.totalHoldTime = std::stol(outboundNode["TotalHoldTime"].asString());
if(!outboundNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.outbound.maxHoldTime = std::stol(outboundNode["MaxHoldTime"].asString());
if(!outboundNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.outbound.averageHoldTime = std::stol(outboundNode["AverageHoldTime"].asString());
if(!outboundNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.outbound.totalWorkTime = std::stol(outboundNode["TotalWorkTime"].asString());
if(!outboundNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.outbound.maxWorkTime = std::stol(outboundNode["MaxWorkTime"].asString());
if(!outboundNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.outbound.averageWorkTime = std::stol(outboundNode["AverageWorkTime"].asString());
if(!outboundNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.outbound.satisfactionSurveysOffered = std::stol(outboundNode["SatisfactionSurveysOffered"].asString());
if(!outboundNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.outbound.satisfactionSurveysResponded = std::stol(outboundNode["SatisfactionSurveysResponded"].asString());
if(!outboundNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.outbound.satisfactionIndex = std::stof(outboundNode["SatisfactionIndex"].asString());
if(!outboundNode["CallsDialed"].isNull())
generateAgentStatisticObject.outbound.callsDialed = std::stol(outboundNode["CallsDialed"].asString());
if(!outboundNode["CallsAnswered"].isNull())
generateAgentStatisticObject.outbound.callsAnswered = std::stol(outboundNode["CallsAnswered"].asString());
if(!outboundNode["AnswerRate"].isNull())
generateAgentStatisticObject.outbound.answerRate = std::stof(outboundNode["AnswerRate"].asString());
if(!outboundNode["TotalDialingTime"].isNull())
generateAgentStatisticObject.outbound.totalDialingTime = std::stol(outboundNode["TotalDialingTime"].asString());
if(!outboundNode["TotalDialingTime"].isNull())
generateAgentStatisticObject.outbound.totalDialingTime1 = std::stol(outboundNode["TotalDialingTime"].asString());
if(!outboundNode["MaxDialingTime"].isNull())
generateAgentStatisticObject.outbound.maxDialingTime = std::stol(outboundNode["MaxDialingTime"].asString());
if(!outboundNode["AverageDialingTime"].isNull())
generateAgentStatisticObject.outbound.averageDialingTime = std::stol(outboundNode["AverageDialingTime"].asString());
auto overallNode = value["Overall"];
if(!overallNode["TotalTalkTime"].isNull())
generateAgentStatisticObject.overall.totalTalkTime = std::stol(overallNode["TotalTalkTime"].asString());
if(!overallNode["MaxTalkTime"].isNull())
generateAgentStatisticObject.overall.maxTalkTime = std::stol(overallNode["MaxTalkTime"].asString());
if(!overallNode["AverageTalkTime"].isNull())
generateAgentStatisticObject.overall.averageTalkTime = std::stol(overallNode["AverageTalkTime"].asString());
if(!overallNode["TotalHoldTime"].isNull())
generateAgentStatisticObject.overall.totalHoldTime = std::stol(overallNode["TotalHoldTime"].asString());
if(!overallNode["MaxHoldTime"].isNull())
generateAgentStatisticObject.overall.maxHoldTime = std::stol(overallNode["MaxHoldTime"].asString());
if(!overallNode["AverageHoldTime"].isNull())
generateAgentStatisticObject.overall.averageHoldTime = std::stol(overallNode["AverageHoldTime"].asString());
if(!overallNode["TotalWorkTime"].isNull())
generateAgentStatisticObject.overall.totalWorkTime = std::stol(overallNode["TotalWorkTime"].asString());
if(!overallNode["MaxWorkTime"].isNull())
generateAgentStatisticObject.overall.maxWorkTime = std::stol(overallNode["MaxWorkTime"].asString());
if(!overallNode["AverageWorkTime"].isNull())
generateAgentStatisticObject.overall.averageWorkTime = std::stol(overallNode["AverageWorkTime"].asString());
if(!overallNode["SatisfactionSurveysOffered"].isNull())
generateAgentStatisticObject.overall.satisfactionSurveysOffered = std::stol(overallNode["SatisfactionSurveysOffered"].asString());
if(!overallNode["SatisfactionSurveysResponded"].isNull())
generateAgentStatisticObject.overall.satisfactionSurveysResponded = std::stol(overallNode["SatisfactionSurveysResponded"].asString());
if(!overallNode["SatisfactionIndex"].isNull())
generateAgentStatisticObject.overall.satisfactionIndex = std::stof(overallNode["SatisfactionIndex"].asString());
if(!overallNode["TotalCalls"].isNull())
generateAgentStatisticObject.overall.totalCalls = std::stol(overallNode["TotalCalls"].asString());
dataList_.list.push_back(generateAgentStatisticObject);
}
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());
}
GetAgentDataResult::DataList GetAgentDataResult::getDataList()const
{
return dataList_;
}
std::string GetAgentDataResult::getMessage()const
{
return message_;
}
int GetAgentDataResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetAgentDataResult::getCode()const
{
return code_;
}
bool GetAgentDataResult::getSuccess()const
{
return success_;
}

View File

@@ -40,49 +40,44 @@ void GetConfigResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allConfigItem = value["ConfigItem"];
for (auto value : allConfigItem)
{
ConfigItem configItemObject;
if(!value["Name"].isNull())
configItemObject.name = value["Name"].asString();
if(!value["Value"].isNull())
configItemObject.value = value["Value"].asString();
configItem_.push_back(configItemObject);
}
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());
auto configItemNode = value["ConfigItem"];
if(!configItemNode["Name"].isNull())
configItem_.name = configItemNode["Name"].asString();
if(!configItemNode["Value"].isNull())
configItem_.value = configItemNode["Value"].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 GetConfigResult::getMessage()const
{
return message_;
}
int GetConfigResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<GetConfigResult::ConfigItem> GetConfigResult::getConfigItem()const
{
return configItem_;
}
std::string GetConfigResult::getCode()const
{
return code_;
}
bool GetConfigResult::getSuccess()const
{
return success_;
}
std::string GetConfigResult::getMessage()const
{
return message_;
}
int GetConfigResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
GetConfigResult::ConfigItem GetConfigResult::getConfigItem()const
{
return configItem_;
}
std::string GetConfigResult::getCode()const
{
return code_;
}
bool GetConfigResult::getSuccess()const
{
return success_;
}

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/ccc/model/GetConversationDetailByContactIdRequest.h>
using AlibabaCloud::CCC::Model::GetConversationDetailByContactIdRequest;
GetConversationDetailByContactIdRequest::GetConversationDetailByContactIdRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetConversationDetailByContactId")
{}
GetConversationDetailByContactIdRequest::~GetConversationDetailByContactIdRequest()
{}
std::string GetConversationDetailByContactIdRequest::getInstanceId()const
{
return instanceId_;
}
void GetConversationDetailByContactIdRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetConversationDetailByContactIdRequest::getContactId()const
{
return contactId_;
}
void GetConversationDetailByContactIdRequest::setContactId(const std::string& contactId)
{
contactId_ = contactId;
setParameter("ContactId", contactId);
}
int GetConversationDetailByContactIdRequest::getPageSize()const
{
return pageSize_;
}
void GetConversationDetailByContactIdRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int GetConversationDetailByContactIdRequest::getPageNumber()const
{
return pageNumber_;
}
void GetConversationDetailByContactIdRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string GetConversationDetailByContactIdRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetConversationDetailByContactIdRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,101 @@
/*
* 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/ccc/model/GetConversationDetailByContactIdResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetConversationDetailByContactIdResult::GetConversationDetailByContactIdResult() :
ServiceResult()
{}
GetConversationDetailByContactIdResult::GetConversationDetailByContactIdResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetConversationDetailByContactIdResult::~GetConversationDetailByContactIdResult()
{}
void GetConversationDetailByContactIdResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataListNode = value["DataList"];
if(!dataListNode["TotalCount"].isNull())
dataList_.totalCount = std::stoi(dataListNode["TotalCount"].asString());
if(!dataListNode["PageNumber"].isNull())
dataList_.pageNumber = std::stoi(dataListNode["PageNumber"].asString());
if(!dataListNode["PageSize"].isNull())
dataList_.pageSize = std::stoi(dataListNode["PageSize"].asString());
auto allList = value["List"]["QualityCheckPhrase"];
for (auto value : allList)
{
DataList::QualityCheckPhrase qualityCheckPhraseObject;
if(!value["Identity"].isNull())
qualityCheckPhraseObject.identity = value["Identity"].asString();
if(!value["Role"].isNull())
qualityCheckPhraseObject.role = value["Role"].asString();
if(!value["Words"].isNull())
qualityCheckPhraseObject.words = value["Words"].asString();
if(!value["Begin"].isNull())
qualityCheckPhraseObject.begin = std::stol(value["Begin"].asString());
if(!value["End"].isNull())
qualityCheckPhraseObject.end = std::stol(value["End"].asString());
dataList_.list.push_back(qualityCheckPhraseObject);
}
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());
}
GetConversationDetailByContactIdResult::DataList GetConversationDetailByContactIdResult::getDataList()const
{
return dataList_;
}
std::string GetConversationDetailByContactIdResult::getMessage()const
{
return message_;
}
int GetConversationDetailByContactIdResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetConversationDetailByContactIdResult::getCode()const
{
return code_;
}
bool GetConversationDetailByContactIdResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetConversationListRequest.h>
using AlibabaCloud::CCC::Model::GetConversationListRequest;
GetConversationListRequest::GetConversationListRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetConversationList")
{}
GetConversationListRequest::~GetConversationListRequest()
{}
std::string GetConversationListRequest::getInstanceId()const
{
return instanceId_;
}
void GetConversationListRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetConversationListRequest::getTaskId()const
{
return taskId_;
}
void GetConversationListRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}

View File

@@ -0,0 +1,102 @@
/*
* 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/ccc/model/GetConversationListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetConversationListResult::GetConversationListResult() :
ServiceResult()
{}
GetConversationListResult::GetConversationListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetConversationListResult::~GetConversationListResult()
{}
void GetConversationListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allConversations = value["Conversations"]["ConversationDetail"];
for (auto value : allConversations)
{
ConversationDetail conversationsObject;
if(!value["Timestamp"].isNull())
conversationsObject.timestamp = std::stol(value["Timestamp"].asString());
if(!value["Speaker"].isNull())
conversationsObject.speaker = value["Speaker"].asString();
if(!value["Script"].isNull())
conversationsObject.script = value["Script"].asString();
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
ConversationDetail::SummaryItem summaryObject;
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
conversationsObject.summary.push_back(summaryObject);
}
conversations_.push_back(conversationsObject);
}
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 GetConversationListResult::getMessage()const
{
return message_;
}
int GetConversationListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<GetConversationListResult::ConversationDetail> GetConversationListResult::getConversations()const
{
return conversations_;
}
std::string GetConversationListResult::getCode()const
{
return code_;
}
bool GetConversationListResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetJobDataUploadParamsRequest.h>
using AlibabaCloud::CCC::Model::GetJobDataUploadParamsRequest;
GetJobDataUploadParamsRequest::GetJobDataUploadParamsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJobDataUploadParams")
{}
GetJobDataUploadParamsRequest::~GetJobDataUploadParamsRequest()
{}
std::string GetJobDataUploadParamsRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobDataUploadParamsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetJobDataUploadParamsRequest::getFileName()const
{
return fileName_;
}
void GetJobDataUploadParamsRequest::setFileName(const std::string& fileName)
{
fileName_ = fileName;
setParameter("FileName", fileName);
}

View 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/ccc/model/GetJobDataUploadParamsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobDataUploadParamsResult::GetJobDataUploadParamsResult() :
ServiceResult()
{}
GetJobDataUploadParamsResult::GetJobDataUploadParamsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobDataUploadParamsResult::~GetJobDataUploadParamsResult()
{}
void GetJobDataUploadParamsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto uploadParamsNode = value["UploadParams"];
if(!uploadParamsNode["AccessId"].isNull())
uploadParams_.accessId = uploadParamsNode["AccessId"].asString();
if(!uploadParamsNode["Policy"].isNull())
uploadParams_.policy = uploadParamsNode["Policy"].asString();
if(!uploadParamsNode["Signature"].isNull())
uploadParams_.signature = uploadParamsNode["Signature"].asString();
if(!uploadParamsNode["Folder"].isNull())
uploadParams_.folder = uploadParamsNode["Folder"].asString();
if(!uploadParamsNode["Host"].isNull())
uploadParams_.host = uploadParamsNode["Host"].asString();
if(!uploadParamsNode["Expire"].isNull())
uploadParams_.expire = std::stoi(uploadParamsNode["Expire"].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());
}
GetJobDataUploadParamsResult::UploadParams GetJobDataUploadParamsResult::getUploadParams()const
{
return uploadParams_;
}
std::string GetJobDataUploadParamsResult::getMessage()const
{
return message_;
}
int GetJobDataUploadParamsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetJobDataUploadParamsResult::getCode()const
{
return code_;
}
bool GetJobDataUploadParamsResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetJobGroupRequest.h>
using AlibabaCloud::CCC::Model::GetJobGroupRequest;
GetJobGroupRequest::GetJobGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJobGroup")
{}
GetJobGroupRequest::~GetJobGroupRequest()
{}
std::string GetJobGroupRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetJobGroupRequest::getJobGroupId()const
{
return jobGroupId_;
}
void GetJobGroupRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

View File

@@ -0,0 +1,157 @@
/*
* 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/ccc/model/GetJobGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobGroupResult::GetJobGroupResult() :
ServiceResult()
{}
GetJobGroupResult::GetJobGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobGroupResult::~GetJobGroupResult()
{}
void GetJobGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobGroupNode = value["JobGroup"];
if(!jobGroupNode["Id"].isNull())
jobGroup_.id = jobGroupNode["Id"].asString();
if(!jobGroupNode["Name"].isNull())
jobGroup_.name = jobGroupNode["Name"].asString();
if(!jobGroupNode["Description"].isNull())
jobGroup_.description = jobGroupNode["Description"].asString();
if(!jobGroupNode["ScenarioId"].isNull())
jobGroup_.scenarioId = jobGroupNode["ScenarioId"].asString();
if(!jobGroupNode["JobFilePath"].isNull())
jobGroup_.jobFilePath = jobGroupNode["JobFilePath"].asString();
if(!jobGroupNode["CreationTime"].isNull())
jobGroup_.creationTime = std::stol(jobGroupNode["CreationTime"].asString());
auto strategyNode = jobGroupNode["Strategy"];
if(!strategyNode["Id"].isNull())
jobGroup_.strategy.id = strategyNode["Id"].asString();
if(!strategyNode["Name"].isNull())
jobGroup_.strategy.name = strategyNode["Name"].asString();
if(!strategyNode["Description"].isNull())
jobGroup_.strategy.description = strategyNode["Description"].asString();
if(!strategyNode["Type"].isNull())
jobGroup_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
jobGroup_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
jobGroup_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
jobGroup_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
jobGroup_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
jobGroup_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
jobGroup_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
jobGroup_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
jobGroup_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
jobGroup_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
JobGroup::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
jobGroup_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
jobGroup_.strategy.repeatDays.push_back(value.asString());
auto progressNode = jobGroupNode["Progress"];
if(!progressNode["TotalJobs"].isNull())
jobGroup_.progress.totalJobs = std::stoi(progressNode["TotalJobs"].asString());
if(!progressNode["Status"].isNull())
jobGroup_.progress.status = progressNode["Status"].asString();
if(!progressNode["TotalNotAnswered"].isNull())
jobGroup_.progress.totalNotAnswered = std::stoi(progressNode["TotalNotAnswered"].asString());
if(!progressNode["TotalCompleted"].isNull())
jobGroup_.progress.totalCompleted = std::stoi(progressNode["TotalCompleted"].asString());
if(!progressNode["StartTime"].isNull())
jobGroup_.progress.startTime = std::stol(progressNode["StartTime"].asString());
if(!progressNode["Duration"].isNull())
jobGroup_.progress.duration = std::stoi(progressNode["Duration"].asString());
auto allCategories = value["Categories"]["KeyValuePair"];
for (auto value : allCategories)
{
JobGroup::Progress::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
jobGroup_.progress.categories.push_back(keyValuePairObject);
}
auto allCallingNumbers = jobGroupNode["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobGroup_.callingNumbers.push_back(value.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());
}
GetJobGroupResult::JobGroup GetJobGroupResult::getJobGroup()const
{
return jobGroup_;
}
std::string GetJobGroupResult::getMessage()const
{
return message_;
}
int GetJobGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetJobGroupResult::getCode()const
{
return code_;
}
bool GetJobGroupResult::getSuccess()const
{
return success_;
}

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/ccc/model/GetJobListRequest.h>
using AlibabaCloud::CCC::Model::GetJobListRequest;
GetJobListRequest::GetJobListRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJobList")
{}
GetJobListRequest::~GetJobListRequest()
{}
std::string GetJobListRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobListRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetJobListRequest::getJobGroupId()const
{
return jobGroupId_;
}
void GetJobListRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}
int GetJobListRequest::getPageSize()const
{
return pageSize_;
}
void GetJobListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int GetJobListRequest::getPageNumber()const
{
return pageNumber_;
}
void GetJobListRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
int GetJobListRequest::getStatus()const
{
return status_;
}
void GetJobListRequest::setStatus(int status)
{
status_ = status;
setParameter("Status", std::to_string(status));
}
bool GetJobListRequest::getQueryAll()const
{
return queryAll_;
}
void GetJobListRequest::setQueryAll(bool queryAll)
{
queryAll_ = queryAll;
setParameter("QueryAll", std::to_string(queryAll));
}

View File

@@ -0,0 +1,166 @@
/*
* 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/ccc/model/GetJobListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobListResult::GetJobListResult() :
ServiceResult()
{}
GetJobListResult::GetJobListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobListResult::~GetJobListResult()
{}
void GetJobListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobsNode = value["Jobs"];
if(!jobsNode["TotalCount"].isNull())
jobs_.totalCount = std::stoi(jobsNode["TotalCount"].asString());
if(!jobsNode["PageNumber"].isNull())
jobs_.pageNumber = std::stoi(jobsNode["PageNumber"].asString());
if(!jobsNode["PageSize"].isNull())
jobs_.pageSize = std::stoi(jobsNode["PageSize"].asString());
auto allList = value["List"]["Job"];
for (auto value : allList)
{
Jobs::Job jobObject;
if(!value["JobId"].isNull())
jobObject.jobId = value["JobId"].asString();
if(!value["GroupId"].isNull())
jobObject.groupId = value["GroupId"].asString();
if(!value["ScenarioId"].isNull())
jobObject.scenarioId = value["ScenarioId"].asString();
if(!value["StrategyId"].isNull())
jobObject.strategyId = value["StrategyId"].asString();
if(!value["Priority"].isNull())
jobObject.priority = std::stoi(value["Priority"].asString());
if(!value["SystemPriority"].isNull())
jobObject.systemPriority = std::stoi(value["SystemPriority"].asString());
if(!value["Status"].isNull())
jobObject.status = value["Status"].asString();
if(!value["ReferenceId"].isNull())
jobObject.referenceId = value["ReferenceId"].asString();
if(!value["FailureReason"].isNull())
jobObject.failureReason = value["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Jobs::Job::Contact contactsObject;
if(!value["ContactId"].isNull())
contactsObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactsObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactsObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactsObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactsObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactsObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactsObject.referenceId = value["ReferenceId"].asString();
if(!value["JobId"].isNull())
contactsObject.jobId = value["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Jobs::Job::KeyValuePair extrasObject;
if(!value["Key"].isNull())
extrasObject.key = value["Key"].asString();
if(!value["Value"].isNull())
extrasObject.value = value["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Jobs::Job::SummaryItem summaryObject;
if(!value["SummaryId"].isNull())
summaryObject.summaryId = value["SummaryId"].asString();
if(!value["GroupId"].isNull())
summaryObject.groupId = value["GroupId"].asString();
if(!value["JobId"].isNull())
summaryObject.jobId = value["JobId"].asString();
if(!value["TaskId"].isNull())
summaryObject.taskId = value["TaskId"].asString();
if(!value["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = value["ConversationDetailId"].asString();
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobObject.callingNumbers.push_back(value.asString());
jobs_.list.push_back(jobObject);
}
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 GetJobListResult::getMessage()const
{
return message_;
}
GetJobListResult::Jobs GetJobListResult::getJobs()const
{
return jobs_;
}
int GetJobListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetJobListResult::getCode()const
{
return code_;
}
bool GetJobListResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetJobRequest.h>
using AlibabaCloud::CCC::Model::GetJobRequest;
GetJobRequest::GetJobRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJob")
{}
GetJobRequest::~GetJobRequest()
{}
std::string GetJobRequest::getJobId()const
{
return jobId_;
}
void GetJobRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setParameter("JobId", jobId);
}
std::string GetJobRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,211 @@
/*
* 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/ccc/model/GetJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobResult::GetJobResult() :
ServiceResult()
{}
GetJobResult::GetJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobResult::~GetJobResult()
{}
void GetJobResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobNode = value["Job"];
if(!jobNode["JobId"].isNull())
job_.jobId = jobNode["JobId"].asString();
if(!jobNode["GroupId"].isNull())
job_.groupId = jobNode["GroupId"].asString();
if(!jobNode["ScenarioId"].isNull())
job_.scenarioId = jobNode["ScenarioId"].asString();
if(!jobNode["StrategyId"].isNull())
job_.strategyId = jobNode["StrategyId"].asString();
if(!jobNode["Priority"].isNull())
job_.priority = std::stoi(jobNode["Priority"].asString());
if(!jobNode["SystemPriority"].isNull())
job_.systemPriority = std::stoi(jobNode["SystemPriority"].asString());
if(!jobNode["Status"].isNull())
job_.status = jobNode["Status"].asString();
if(!jobNode["ReferenceId"].isNull())
job_.referenceId = jobNode["ReferenceId"].asString();
if(!jobNode["FailureReason"].isNull())
job_.failureReason = jobNode["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Job::Contact contactObject;
if(!value["ContactId"].isNull())
contactObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactObject.referenceId = value["ReferenceId"].asString();
job_.contacts.push_back(contactObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Job::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
job_.extras.push_back(keyValuePairObject);
}
auto allTasks = value["Tasks"]["Task"];
for (auto value : allTasks)
{
Job::Task taskObject;
if(!value["TaskId"].isNull())
taskObject.taskId = value["TaskId"].asString();
if(!value["JobId"].isNull())
taskObject.jobId = value["JobId"].asString();
if(!value["ScenarioId"].isNull())
taskObject.scenarioId = value["ScenarioId"].asString();
if(!value["ChatbotId"].isNull())
taskObject.chatbotId = value["ChatbotId"].asString();
if(!value["PlanedTime"].isNull())
taskObject.planedTime = std::stol(value["PlanedTime"].asString());
if(!value["ActualTime"].isNull())
taskObject.actualTime = std::stol(value["ActualTime"].asString());
if(!value["CallingNumber"].isNull())
taskObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
taskObject.calledNumber = value["CalledNumber"].asString();
if(!value["CallId"].isNull())
taskObject.callId = value["CallId"].asString();
if(!value["Status"].isNull())
taskObject.status = value["Status"].asString();
if(!value["Brief"].isNull())
taskObject.brief = value["Brief"].asString();
if(!value["Duration"].isNull())
taskObject.duration = std::stoi(value["Duration"].asString());
auto allConversation = value["Conversation"]["ConversationDetail"];
for (auto value : allConversation)
{
Job::Task::ConversationDetail conversationObject;
if(!value["Timestamp"].isNull())
conversationObject.timestamp = std::stol(value["Timestamp"].asString());
if(!value["Speaker"].isNull())
conversationObject.speaker = value["Speaker"].asString();
if(!value["Script"].isNull())
conversationObject.script = value["Script"].asString();
auto allSummary1 = value["Summary"]["SummaryItem"];
for (auto value : allSummary1)
{
Job::Task::ConversationDetail::SummaryItem summary1Object;
if(!value["Category"].isNull())
summary1Object.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summary1Object.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summary1Object.content = value["Content"].asString();
conversationObject.summary1.push_back(summary1Object);
}
taskObject.conversation.push_back(conversationObject);
}
auto contact2Node = value["Contact"];
if(!contact2Node["ContactId"].isNull())
taskObject.contact2.contactId = contact2Node["ContactId"].asString();
if(!contact2Node["ContactName"].isNull())
taskObject.contact2.contactName = contact2Node["ContactName"].asString();
if(!contact2Node["Honorific"].isNull())
taskObject.contact2.honorific = contact2Node["Honorific"].asString();
if(!contact2Node["Role"].isNull())
taskObject.contact2.role = contact2Node["Role"].asString();
if(!contact2Node["PhoneNumber"].isNull())
taskObject.contact2.phoneNumber = contact2Node["PhoneNumber"].asString();
if(!contact2Node["State"].isNull())
taskObject.contact2.state = contact2Node["State"].asString();
if(!contact2Node["ReferenceId"].isNull())
taskObject.contact2.referenceId = contact2Node["ReferenceId"].asString();
job_.tasks.push_back(taskObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Job::SummaryItem3 summaryItem3Object;
if(!value["Category"].isNull())
summaryItem3Object.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryItem3Object.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryItem3Object.content = value["Content"].asString();
job_.summary.push_back(summaryItem3Object);
}
auto allCallingNumbers = jobNode["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
job_.callingNumbers.push_back(value.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 GetJobResult::getMessage()const
{
return message_;
}
int GetJobResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
GetJobResult::Job GetJobResult::getJob()const
{
return job_;
}
std::string GetJobResult::getCode()const
{
return code_;
}
bool GetJobResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetJobStatusByCallIdRequest.h>
using AlibabaCloud::CCC::Model::GetJobStatusByCallIdRequest;
GetJobStatusByCallIdRequest::GetJobStatusByCallIdRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJobStatusByCallId")
{}
GetJobStatusByCallIdRequest::~GetJobStatusByCallIdRequest()
{}
std::string GetJobStatusByCallIdRequest::getCallId()const
{
return callId_;
}
void GetJobStatusByCallIdRequest::setCallId(const std::string& callId)
{
callId_ = callId;
setParameter("CallId", callId);
}
std::string GetJobStatusByCallIdRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobStatusByCallIdRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,221 @@
/*
* 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/ccc/model/GetJobStatusByCallIdResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobStatusByCallIdResult::GetJobStatusByCallIdResult() :
ServiceResult()
{}
GetJobStatusByCallIdResult::GetJobStatusByCallIdResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobStatusByCallIdResult::~GetJobStatusByCallIdResult()
{}
void GetJobStatusByCallIdResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobNode = value["Job"];
if(!jobNode["JobId"].isNull())
job_.jobId = jobNode["JobId"].asString();
if(!jobNode["GroupId"].isNull())
job_.groupId = jobNode["GroupId"].asString();
if(!jobNode["ScenarioId"].isNull())
job_.scenarioId = jobNode["ScenarioId"].asString();
if(!jobNode["StrategyId"].isNull())
job_.strategyId = jobNode["StrategyId"].asString();
if(!jobNode["Priority"].isNull())
job_.priority = std::stoi(jobNode["Priority"].asString());
if(!jobNode["Status"].isNull())
job_.status = jobNode["Status"].asString();
if(!jobNode["ReferenceId"].isNull())
job_.referenceId = jobNode["ReferenceId"].asString();
if(!jobNode["FailureReason"].isNull())
job_.failureReason = jobNode["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Job::Contact contactObject;
if(!value["ContactId"].isNull())
contactObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactObject.referenceId = value["ReferenceId"].asString();
if(!value["JobId"].isNull())
contactObject.jobId = value["JobId"].asString();
job_.contacts.push_back(contactObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Job::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
job_.extras.push_back(keyValuePairObject);
}
auto allTasks = value["Tasks"]["Task"];
for (auto value : allTasks)
{
Job::Task taskObject;
if(!value["TaskId"].isNull())
taskObject.taskId = value["TaskId"].asString();
if(!value["JobId"].isNull())
taskObject.jobId = value["JobId"].asString();
if(!value["ScenarioId"].isNull())
taskObject.scenarioId = value["ScenarioId"].asString();
if(!value["ChatbotId"].isNull())
taskObject.chatbotId = value["ChatbotId"].asString();
if(!value["PlanedTime"].isNull())
taskObject.planedTime = std::stol(value["PlanedTime"].asString());
if(!value["ActualTime"].isNull())
taskObject.actualTime = std::stol(value["ActualTime"].asString());
if(!value["CallingNumber"].isNull())
taskObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
taskObject.calledNumber = value["CalledNumber"].asString();
if(!value["CallId"].isNull())
taskObject.callId = value["CallId"].asString();
if(!value["Status"].isNull())
taskObject.status = value["Status"].asString();
if(!value["Brief"].isNull())
taskObject.brief = value["Brief"].asString();
if(!value["Duration"].isNull())
taskObject.duration = std::stoi(value["Duration"].asString());
auto allConversation = value["Conversation"]["ConversationDetail"];
for (auto value : allConversation)
{
Job::Task::ConversationDetail conversationObject;
if(!value["ConversationDetailId"].isNull())
conversationObject.conversationDetailId = value["ConversationDetailId"].asString();
if(!value["TaskId"].isNull())
conversationObject.taskId = value["TaskId"].asString();
if(!value["Timestamp"].isNull())
conversationObject.timestamp = std::stol(value["Timestamp"].asString());
if(!value["Speaker"].isNull())
conversationObject.speaker = value["Speaker"].asString();
if(!value["Script"].isNull())
conversationObject.script = value["Script"].asString();
auto allSummary1 = value["Summary"]["SummaryItem"];
for (auto value : allSummary1)
{
Job::Task::ConversationDetail::SummaryItem summary1Object;
if(!value["SummaryId"].isNull())
summary1Object.summaryId = value["SummaryId"].asString();
if(!value["Category"].isNull())
summary1Object.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summary1Object.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summary1Object.content = value["Content"].asString();
conversationObject.summary1.push_back(summary1Object);
}
taskObject.conversation.push_back(conversationObject);
}
auto contact2Node = value["Contact"];
if(!contact2Node["ContactId"].isNull())
taskObject.contact2.contactId = contact2Node["ContactId"].asString();
if(!contact2Node["ContactName"].isNull())
taskObject.contact2.contactName = contact2Node["ContactName"].asString();
if(!contact2Node["Honorific"].isNull())
taskObject.contact2.honorific = contact2Node["Honorific"].asString();
if(!contact2Node["Role"].isNull())
taskObject.contact2.role = contact2Node["Role"].asString();
if(!contact2Node["PhoneNumber"].isNull())
taskObject.contact2.phoneNumber = contact2Node["PhoneNumber"].asString();
if(!contact2Node["State"].isNull())
taskObject.contact2.state = contact2Node["State"].asString();
if(!contact2Node["ReferenceId"].isNull())
taskObject.contact2.referenceId = contact2Node["ReferenceId"].asString();
if(!contact2Node["JobId"].isNull())
taskObject.contact2.jobId = contact2Node["JobId"].asString();
job_.tasks.push_back(taskObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Job::SummaryItem3 summaryItem3Object;
if(!value["SummaryId"].isNull())
summaryItem3Object.summaryId = value["SummaryId"].asString();
if(!value["Category"].isNull())
summaryItem3Object.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryItem3Object.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryItem3Object.content = value["Content"].asString();
job_.summary.push_back(summaryItem3Object);
}
auto allCallingNumbers = jobNode["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
job_.callingNumbers.push_back(value.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 GetJobStatusByCallIdResult::getMessage()const
{
return message_;
}
int GetJobStatusByCallIdResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
GetJobStatusByCallIdResult::Job GetJobStatusByCallIdResult::getJob()const
{
return job_;
}
std::string GetJobStatusByCallIdResult::getCode()const
{
return code_;
}
bool GetJobStatusByCallIdResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetJobTemplateDownloadParamsRequest.h>
using AlibabaCloud::CCC::Model::GetJobTemplateDownloadParamsRequest;
GetJobTemplateDownloadParamsRequest::GetJobTemplateDownloadParamsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetJobTemplateDownloadParams")
{}
GetJobTemplateDownloadParamsRequest::~GetJobTemplateDownloadParamsRequest()
{}
std::string GetJobTemplateDownloadParamsRequest::getInstanceId()const
{
return instanceId_;
}
void GetJobTemplateDownloadParamsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetJobTemplateDownloadParamsRequest::getScenarioId()const
{
return scenarioId_;
}
void GetJobTemplateDownloadParamsRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,81 @@
/*
* 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/ccc/model/GetJobTemplateDownloadParamsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetJobTemplateDownloadParamsResult::GetJobTemplateDownloadParamsResult() :
ServiceResult()
{}
GetJobTemplateDownloadParamsResult::GetJobTemplateDownloadParamsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobTemplateDownloadParamsResult::~GetJobTemplateDownloadParamsResult()
{}
void GetJobTemplateDownloadParamsResult::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(!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());
}
GetJobTemplateDownloadParamsResult::DownloadParams GetJobTemplateDownloadParamsResult::getDownloadParams()const
{
return downloadParams_;
}
std::string GetJobTemplateDownloadParamsResult::getMessage()const
{
return message_;
}
int GetJobTemplateDownloadParamsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetJobTemplateDownloadParamsResult::getCode()const
{
return code_;
}
bool GetJobTemplateDownloadParamsResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetNumberRegionInfoRequest.h>
using AlibabaCloud::CCC::Model::GetNumberRegionInfoRequest;
GetNumberRegionInfoRequest::GetNumberRegionInfoRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetNumberRegionInfo")
{}
GetNumberRegionInfoRequest::~GetNumberRegionInfoRequest()
{}
std::string GetNumberRegionInfoRequest::getNumber()const
{
return number_;
}
void GetNumberRegionInfoRequest::setNumber(const std::string& number)
{
number_ = number;
setParameter("Number", number);
}
std::string GetNumberRegionInfoRequest::getInstanceId()const
{
return instanceId_;
}
void GetNumberRegionInfoRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetNumberRegionInfoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetNumberRegionInfoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,78 @@
/*
* 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/ccc/model/GetNumberRegionInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetNumberRegionInfoResult::GetNumberRegionInfoResult() :
ServiceResult()
{}
GetNumberRegionInfoResult::GetNumberRegionInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetNumberRegionInfoResult::~GetNumberRegionInfoResult()
{}
void GetNumberRegionInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto phoneNumberNode = value["PhoneNumber"];
if(!phoneNumberNode["Number"].isNull())
phoneNumber_.number = phoneNumberNode["Number"].asString();
if(!phoneNumberNode["Province"].isNull())
phoneNumber_.province = phoneNumberNode["Province"].asString();
if(!phoneNumberNode["City"].isNull())
phoneNumber_.city = phoneNumberNode["City"].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 GetNumberRegionInfoResult::getMessage()const
{
return message_;
}
GetNumberRegionInfoResult::PhoneNumber GetNumberRegionInfoResult::getPhoneNumber()const
{
return phoneNumber_;
}
std::string GetNumberRegionInfoResult::getCode()const
{
return code_;
}
bool GetNumberRegionInfoResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetScenarioRequest.h>
using AlibabaCloud::CCC::Model::GetScenarioRequest;
GetScenarioRequest::GetScenarioRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetScenario")
{}
GetScenarioRequest::~GetScenarioRequest()
{}
std::string GetScenarioRequest::getInstanceId()const
{
return instanceId_;
}
void GetScenarioRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetScenarioRequest::getScenarioId()const
{
return scenarioId_;
}
void GetScenarioRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,167 @@
/*
* 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/ccc/model/GetScenarioResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetScenarioResult::GetScenarioResult() :
ServiceResult()
{}
GetScenarioResult::GetScenarioResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetScenarioResult::~GetScenarioResult()
{}
void GetScenarioResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto scenarioNode = value["Scenario"];
if(!scenarioNode["Id"].isNull())
scenario_.id = scenarioNode["Id"].asString();
if(!scenarioNode["Name"].isNull())
scenario_.name = scenarioNode["Name"].asString();
if(!scenarioNode["Description"].isNull())
scenario_.description = scenarioNode["Description"].asString();
if(!scenarioNode["Type"].isNull())
scenario_.type = scenarioNode["Type"].asString();
if(!scenarioNode["IsTemplate"].isNull())
scenario_.isTemplate = scenarioNode["IsTemplate"].asString() == "true";
auto allSurveys = value["Surveys"]["Survey"];
for (auto value : allSurveys)
{
Scenario::Survey surveyObject;
if(!value["Id"].isNull())
surveyObject.id = value["Id"].asString();
if(!value["Name"].isNull())
surveyObject.name = value["Name"].asString();
if(!value["Description"].isNull())
surveyObject.description = value["Description"].asString();
if(!value["Role"].isNull())
surveyObject.role = value["Role"].asString();
if(!value["Round"].isNull())
surveyObject.round = std::stoi(value["Round"].asString());
if(!value["BeebotId"].isNull())
surveyObject.beebotId = value["BeebotId"].asString();
auto allIntents = value["Intents"]["IntentNode"];
for (auto value : allIntents)
{
Scenario::Survey::IntentNode intentsObject;
if(!value["NodeId"].isNull())
intentsObject.nodeId = value["NodeId"].asString();
if(!value["IntentId"].isNull())
intentsObject.intentId = value["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);
}
auto allVariables = value["Variables"]["KeyValuePair"];
for (auto value : allVariables)
{
Scenario::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
scenario_.variables.push_back(keyValuePairObject);
}
auto strategyNode = scenarioNode["Strategy"];
if(!strategyNode["Id"].isNull())
scenario_.strategy.id = strategyNode["Id"].asString();
if(!strategyNode["Name"].isNull())
scenario_.strategy.name = strategyNode["Name"].asString();
if(!strategyNode["Description"].isNull())
scenario_.strategy.description = strategyNode["Description"].asString();
if(!strategyNode["Type"].isNull())
scenario_.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
scenario_.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
scenario_.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
scenario_.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
scenario_.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
scenario_.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
scenario_.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
scenario_.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
scenario_.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
scenario_.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
Scenario::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
scenario_.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
scenario_.strategy.repeatDays.push_back(value.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 GetScenarioResult::getMessage()const
{
return message_;
}
int GetScenarioResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetScenarioResult::getCode()const
{
return code_;
}
bool GetScenarioResult::getSuccess()const
{
return success_;
}
GetScenarioResult::Scenario GetScenarioResult::getScenario()const
{
return scenario_;
}

View File

@@ -40,49 +40,49 @@ void GetServiceExtensionsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allServiceExtensions = value["ServiceExtensions"]["ServiceExtension"];
for (auto value : allServiceExtensions)
{
ServiceExtension serviceExtensionsObject;
if(!value["Name"].isNull())
serviceExtensionsObject.name = value["Name"].asString();
if(!value["Number"].isNull())
serviceExtensionsObject.number = value["Number"].asString();
serviceExtensions_.push_back(serviceExtensionsObject);
}
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());
auto allServiceExtensions = value["ServiceExtensions"]["ServiceExtension"];
for (auto value : allServiceExtensions)
{
ServiceExtension serviceExtensionsObject;
if(!value["Name"].isNull())
serviceExtensionsObject.name = value["Name"].asString();
if(!value["Number"].isNull())
serviceExtensionsObject.number = value["Number"].asString();
serviceExtensions_.push_back(serviceExtensionsObject);
}
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 GetServiceExtensionsResult::getMessage()const
{
return message_;
}
int GetServiceExtensionsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<GetServiceExtensionsResult::ServiceExtension> GetServiceExtensionsResult::getServiceExtensions()const
{
return serviceExtensions_;
}
std::string GetServiceExtensionsResult::getCode()const
{
return code_;
}
bool GetServiceExtensionsResult::getSuccess()const
{
return success_;
}
std::string GetServiceExtensionsResult::getMessage()const
{
return message_;
}
int GetServiceExtensionsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<GetServiceExtensionsResult::ServiceExtension> GetServiceExtensionsResult::getServiceExtensions()const
{
return serviceExtensions_;
}
std::string GetServiceExtensionsResult::getCode()const
{
return code_;
}
bool GetServiceExtensionsResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetSurveyRequest.h>
using AlibabaCloud::CCC::Model::GetSurveyRequest;
GetSurveyRequest::GetSurveyRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetSurvey")
{}
GetSurveyRequest::~GetSurveyRequest()
{}
std::string GetSurveyRequest::getSurveyId()const
{
return surveyId_;
}
void GetSurveyRequest::setSurveyId(const std::string& surveyId)
{
surveyId_ = surveyId;
setParameter("SurveyId", surveyId);
}
std::string GetSurveyRequest::getInstanceId()const
{
return instanceId_;
}
void GetSurveyRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetSurveyRequest::getScenarioId()const
{
return scenarioId_;
}
void GetSurveyRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}

View File

@@ -0,0 +1,109 @@
/*
* 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/ccc/model/GetSurveyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetSurveyResult::GetSurveyResult() :
ServiceResult()
{}
GetSurveyResult::GetSurveyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetSurveyResult::~GetSurveyResult()
{}
void GetSurveyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto surveyNode = value["Survey"];
if(!surveyNode["Id"].isNull())
survey_.id = surveyNode["Id"].asString();
if(!surveyNode["ScenarioUuid"].isNull())
survey_.scenarioUuid = surveyNode["ScenarioUuid"].asString();
if(!surveyNode["Name"].isNull())
survey_.name = surveyNode["Name"].asString();
if(!surveyNode["Description"].isNull())
survey_.description = surveyNode["Description"].asString();
if(!surveyNode["Role"].isNull())
survey_.role = surveyNode["Role"].asString();
if(!surveyNode["Round"].isNull())
survey_.round = std::stoi(surveyNode["Round"].asString());
if(!surveyNode["HotWords"].isNull())
survey_.hotWords = surveyNode["HotWords"].asString();
if(!surveyNode["SpeechOptimizationParam"].isNull())
survey_.speechOptimizationParam = surveyNode["SpeechOptimizationParam"].asString();
if(!surveyNode["GlobalQuestions"].isNull())
survey_.globalQuestions = surveyNode["GlobalQuestions"].asString();
auto flowNode = surveyNode["Flow"];
if(!flowNode["FlowId"].isNull())
survey_.flow.flowId = flowNode["FlowId"].asString();
if(!flowNode["IsPublished"].isNull())
survey_.flow.isPublished = flowNode["IsPublished"].asString() == "true";
if(!flowNode["FlowJson"].isNull())
survey_.flow.flowJson = flowNode["FlowJson"].asString();
auto asrCustomModelNode = surveyNode["AsrCustomModel"];
if(!asrCustomModelNode["Corpora"].isNull())
survey_.asrCustomModel.corpora = asrCustomModelNode["Corpora"].asString();
if(!asrCustomModelNode["CustomModelStatus"].isNull())
survey_.asrCustomModel.customModelStatus = std::stoi(asrCustomModelNode["CustomModelStatus"].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());
}
GetSurveyResult::Survey GetSurveyResult::getSurvey()const
{
return survey_;
}
std::string GetSurveyResult::getMessage()const
{
return message_;
}
int GetSurveyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetSurveyResult::getCode()const
{
return code_;
}
bool GetSurveyResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/GetTaskListRequest.h>
using AlibabaCloud::CCC::Model::GetTaskListRequest;
GetTaskListRequest::GetTaskListRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetTaskList")
{}
GetTaskListRequest::~GetTaskListRequest()
{}
std::string GetTaskListRequest::getJobId()const
{
return jobId_;
}
void GetTaskListRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setParameter("JobId", jobId);
}
std::string GetTaskListRequest::getInstanceId()const
{
return instanceId_;
}
void GetTaskListRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,149 @@
/*
* 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/ccc/model/GetTaskListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetTaskListResult::GetTaskListResult() :
ServiceResult()
{}
GetTaskListResult::GetTaskListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTaskListResult::~GetTaskListResult()
{}
void GetTaskListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTasks = value["Tasks"]["Task"];
for (auto value : allTasks)
{
Task tasksObject;
if(!value["TaskId"].isNull())
tasksObject.taskId = value["TaskId"].asString();
if(!value["JobId"].isNull())
tasksObject.jobId = value["JobId"].asString();
if(!value["ScenarioId"].isNull())
tasksObject.scenarioId = value["ScenarioId"].asString();
if(!value["ChatbotId"].isNull())
tasksObject.chatbotId = value["ChatbotId"].asString();
if(!value["PlanedTime"].isNull())
tasksObject.planedTime = std::stol(value["PlanedTime"].asString());
if(!value["ActualTime"].isNull())
tasksObject.actualTime = std::stol(value["ActualTime"].asString());
if(!value["CallingNumber"].isNull())
tasksObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
tasksObject.calledNumber = value["CalledNumber"].asString();
if(!value["CallId"].isNull())
tasksObject.callId = value["CallId"].asString();
if(!value["Status"].isNull())
tasksObject.status = value["Status"].asString();
if(!value["Brief"].isNull())
tasksObject.brief = value["Brief"].asString();
if(!value["Duration"].isNull())
tasksObject.duration = std::stoi(value["Duration"].asString());
auto allConversation = value["Conversation"]["ConversationDetail"];
for (auto value : allConversation)
{
Task::ConversationDetail conversationObject;
if(!value["Timestamp"].isNull())
conversationObject.timestamp = std::stol(value["Timestamp"].asString());
if(!value["Speaker"].isNull())
conversationObject.speaker = value["Speaker"].asString();
if(!value["Script"].isNull())
conversationObject.script = value["Script"].asString();
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Task::ConversationDetail::SummaryItem summaryObject;
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
conversationObject.summary.push_back(summaryObject);
}
tasksObject.conversation.push_back(conversationObject);
}
auto contactNode = value["Contact"];
if(!contactNode["ContactId"].isNull())
tasksObject.contact.contactId = contactNode["ContactId"].asString();
if(!contactNode["ContactName"].isNull())
tasksObject.contact.contactName = contactNode["ContactName"].asString();
if(!contactNode["Honorific"].isNull())
tasksObject.contact.honorific = contactNode["Honorific"].asString();
if(!contactNode["Role"].isNull())
tasksObject.contact.role = contactNode["Role"].asString();
if(!contactNode["PhoneNumber"].isNull())
tasksObject.contact.phoneNumber = contactNode["PhoneNumber"].asString();
if(!contactNode["State"].isNull())
tasksObject.contact.state = contactNode["State"].asString();
if(!contactNode["ReferenceId"].isNull())
tasksObject.contact.referenceId = contactNode["ReferenceId"].asString();
if(!contactNode["JobId"].isNull())
tasksObject.contact.jobId = contactNode["JobId"].asString();
tasks_.push_back(tasksObject);
}
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::vector<GetTaskListResult::Task> GetTaskListResult::getTasks()const
{
return tasks_;
}
std::string GetTaskListResult::getMessage()const
{
return message_;
}
int GetTaskListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetTaskListResult::getCode()const
{
return code_;
}
bool GetTaskListResult::getSuccess()const
{
return success_;
}

View File

@@ -40,105 +40,90 @@ void GetUserResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allUser = value["User"];
for (auto value : allUser)
{
User userObject;
if(!value["UserId"].isNull())
userObject.userId = value["UserId"].asString();
if(!value["RamId"].isNull())
userObject.ramId = value["RamId"].asString();
if(!value["InstanceId"].isNull())
userObject.instanceId = value["InstanceId"].asString();
auto allRoles = value["Roles"]["Role"];
for (auto value : allRoles)
{
User::Role roleObject;
if(!value["RoleId"].isNull())
roleObject.roleId = value["RoleId"].asString();
if(!value["InstanceId"].isNull())
roleObject.instanceId = value["InstanceId"].asString();
if(!value["RoleName"].isNull())
roleObject.roleName = value["RoleName"].asString();
if(!value["RoleDescription"].isNull())
roleObject.roleDescription = value["RoleDescription"].asString();
userObject.roles.push_back(roleObject);
}
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
for (auto value : allSkillLevels)
{
User::SkillLevel skillLevelObject;
if(!value["SkillLevelId"].isNull())
skillLevelObject.skillLevelId = value["SkillLevelId"].asString();
if(!value["Level"].isNull())
skillLevelObject.level = std::stoi(value["Level"].asString());
auto allSkill = value["Skill"];
for (auto value : allSkill)
{
User::SkillLevel::Skill skillObject;
if(!value["SkillGroupId"].isNull())
skillObject.skillGroupId = value["SkillGroupId"].asString();
if(!value["InstanceId"].isNull())
skillObject.instanceId = value["InstanceId"].asString();
if(!value["SkillGroupName"].isNull())
skillObject.skillGroupName = value["SkillGroupName"].asString();
if(!value["SkillGroupDescription"].isNull())
skillObject.skillGroupDescription = value["SkillGroupDescription"].asString();
skillLevelObject.skill.push_back(skillObject);
}
userObject.skillLevels.push_back(skillLevelObject);
}
auto allDetail = value["Detail"];
for (auto value : allDetail)
{
User::Detail detailObject;
if(!value["LoginName"].isNull())
detailObject.loginName = value["LoginName"].asString();
if(!value["DisplayName"].isNull())
detailObject.displayName = value["DisplayName"].asString();
if(!value["Phone"].isNull())
detailObject.phone = value["Phone"].asString();
if(!value["Email"].isNull())
detailObject.email = value["Email"].asString();
if(!value["Department"].isNull())
detailObject.department = value["Department"].asString();
userObject.detail.push_back(detailObject);
}
user_.push_back(userObject);
}
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());
auto userNode = value["User"];
if(!userNode["UserId"].isNull())
user_.userId = userNode["UserId"].asString();
if(!userNode["RamId"].isNull())
user_.ramId = userNode["RamId"].asString();
if(!userNode["InstanceId"].isNull())
user_.instanceId = userNode["InstanceId"].asString();
auto allRoles = value["Roles"]["Role"];
for (auto value : allRoles)
{
User::Role roleObject;
if(!value["RoleId"].isNull())
roleObject.roleId = value["RoleId"].asString();
if(!value["InstanceId"].isNull())
roleObject.instanceId = value["InstanceId"].asString();
if(!value["RoleName"].isNull())
roleObject.roleName = value["RoleName"].asString();
if(!value["RoleDescription"].isNull())
roleObject.roleDescription = value["RoleDescription"].asString();
user_.roles.push_back(roleObject);
}
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
for (auto value : allSkillLevels)
{
User::SkillLevel skillLevelObject;
if(!value["SkillLevelId"].isNull())
skillLevelObject.skillLevelId = value["SkillLevelId"].asString();
if(!value["Level"].isNull())
skillLevelObject.level = std::stoi(value["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();
if(!skillNode["InstanceId"].isNull())
skillLevelObject.skill.instanceId = skillNode["InstanceId"].asString();
if(!skillNode["SkillGroupName"].isNull())
skillLevelObject.skill.skillGroupName = skillNode["SkillGroupName"].asString();
if(!skillNode["SkillGroupDescription"].isNull())
skillLevelObject.skill.skillGroupDescription = skillNode["SkillGroupDescription"].asString();
user_.skillLevels.push_back(skillLevelObject);
}
auto detailNode = userNode["Detail"];
if(!detailNode["LoginName"].isNull())
user_.detail.loginName = detailNode["LoginName"].asString();
if(!detailNode["DisplayName"].isNull())
user_.detail.displayName = detailNode["DisplayName"].asString();
if(!detailNode["Phone"].isNull())
user_.detail.phone = detailNode["Phone"].asString();
if(!detailNode["Email"].isNull())
user_.detail.email = detailNode["Email"].asString();
if(!detailNode["Department"].isNull())
user_.detail.department = detailNode["Department"].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::vector<GetUserResult::User> GetUserResult::getUser()const
{
return user_;
}
std::string GetUserResult::getMessage()const
{
return message_;
}
int GetUserResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetUserResult::getCode()const
{
return code_;
}
bool GetUserResult::getSuccess()const
{
return success_;
}
GetUserResult::User GetUserResult::getUser()const
{
return user_;
}
std::string GetUserResult::getMessage()const
{
return message_;
}
int GetUserResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetUserResult::getCode()const
{
return code_;
}
bool GetUserResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/LaunchAppraiseRequest.h>
using AlibabaCloud::CCC::Model::LaunchAppraiseRequest;
LaunchAppraiseRequest::LaunchAppraiseRequest() :
RpcServiceRequest("ccc", "2017-07-05", "LaunchAppraise")
{}
LaunchAppraiseRequest::~LaunchAppraiseRequest()
{}
std::string LaunchAppraiseRequest::getAcid()const
{
return acid_;
}
void LaunchAppraiseRequest::setAcid(const std::string& acid)
{
acid_ = acid;
setParameter("Acid", acid);
}
std::string LaunchAppraiseRequest::getInstanceId()const
{
return instanceId_;
}
void LaunchAppraiseRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string LaunchAppraiseRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void LaunchAppraiseRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/ccc/model/LaunchAppraiseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
LaunchAppraiseResult::LaunchAppraiseResult() :
ServiceResult()
{}
LaunchAppraiseResult::LaunchAppraiseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
LaunchAppraiseResult::~LaunchAppraiseResult()
{}
void LaunchAppraiseResult::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 LaunchAppraiseResult::getMessage()const
{
return message_;
}
int LaunchAppraiseResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string LaunchAppraiseResult::getCode()const
{
return code_;
}
bool LaunchAppraiseResult::getSuccess()const
{
return success_;
}

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/ccc/model/ListBasicStatisticsReportSubItemsRequest.h>
using AlibabaCloud::CCC::Model::ListBasicStatisticsReportSubItemsRequest;
ListBasicStatisticsReportSubItemsRequest::ListBasicStatisticsReportSubItemsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListBasicStatisticsReportSubItems")
{}
ListBasicStatisticsReportSubItemsRequest::~ListBasicStatisticsReportSubItemsRequest()
{}
std::string ListBasicStatisticsReportSubItemsRequest::getInstanceId()const
{
return instanceId_;
}
void ListBasicStatisticsReportSubItemsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListBasicStatisticsReportSubItemsRequest::getJobGroupId()const
{
return jobGroupId_;
}
void ListBasicStatisticsReportSubItemsRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}
int ListBasicStatisticsReportSubItemsRequest::getPageSize()const
{
return pageSize_;
}
void ListBasicStatisticsReportSubItemsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListBasicStatisticsReportSubItemsRequest::getTitle()const
{
return title_;
}
void ListBasicStatisticsReportSubItemsRequest::setTitle(const std::string& title)
{
title_ = title;
setParameter("Title", title);
}
int ListBasicStatisticsReportSubItemsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListBasicStatisticsReportSubItemsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,109 @@
/*
* 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/ccc/model/ListBasicStatisticsReportSubItemsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListBasicStatisticsReportSubItemsResult::ListBasicStatisticsReportSubItemsResult() :
ServiceResult()
{}
ListBasicStatisticsReportSubItemsResult::ListBasicStatisticsReportSubItemsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListBasicStatisticsReportSubItemsResult::~ListBasicStatisticsReportSubItemsResult()
{}
void ListBasicStatisticsReportSubItemsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto subItemsNode = value["SubItems"];
if(!subItemsNode["TotalCount"].isNull())
subItems_.totalCount = std::stoi(subItemsNode["TotalCount"].asString());
if(!subItemsNode["PageNumber"].isNull())
subItems_.pageNumber = std::stoi(subItemsNode["PageNumber"].asString());
if(!subItemsNode["PageSize"].isNull())
subItems_.pageSize = std::stoi(subItemsNode["PageSize"].asString());
auto allList = value["List"]["BasicStatisticsReportSubItem"];
for (auto value : allList)
{
SubItems::BasicStatisticsReportSubItem basicStatisticsReportSubItemObject;
if(!value["BasicStatisticsReportSubItemName"].isNull())
basicStatisticsReportSubItemObject.basicStatisticsReportSubItemName = value["BasicStatisticsReportSubItemName"].asString();
if(!value["Value"].isNull())
basicStatisticsReportSubItemObject.value = value["Value"].asString();
if(!value["Count"].isNull())
basicStatisticsReportSubItemObject.count = std::stoi(value["Count"].asString());
if(!value["Percentage"].isNull())
basicStatisticsReportSubItemObject.percentage = std::stoi(value["Percentage"].asString());
auto allRow = value["Row"]["KeyValuePair"];
for (auto value : allRow)
{
SubItems::BasicStatisticsReportSubItem::KeyValuePair rowObject;
if(!value["Key"].isNull())
rowObject.key = value["Key"].asString();
if(!value["Value"].isNull())
rowObject.value = value["Value"].asString();
basicStatisticsReportSubItemObject.row.push_back(rowObject);
}
subItems_.list.push_back(basicStatisticsReportSubItemObject);
}
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());
}
ListBasicStatisticsReportSubItemsResult::SubItems ListBasicStatisticsReportSubItemsResult::getSubItems()const
{
return subItems_;
}
std::string ListBasicStatisticsReportSubItemsResult::getMessage()const
{
return message_;
}
int ListBasicStatisticsReportSubItemsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListBasicStatisticsReportSubItemsResult::getCode()const
{
return code_;
}
bool ListBasicStatisticsReportSubItemsResult::getSuccess()const
{
return success_;
}

View File

@@ -91,15 +91,15 @@ void ListCallDetailRecordsRequest::setPageSize(int pageSize)
setParameter("PageSize", std::to_string(pageSize));
}
long ListCallDetailRecordsRequest::getStartTime()const
std::string ListCallDetailRecordsRequest::getOrderBy()const
{
return startTime_;
return orderBy_;
}
void ListCallDetailRecordsRequest::setStartTime(long startTime)
void ListCallDetailRecordsRequest::setOrderBy(const std::string& orderBy)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
orderBy_ = orderBy;
setParameter("OrderBy", orderBy);
}
long ListCallDetailRecordsRequest::getStopTime()const
@@ -113,6 +113,17 @@ void ListCallDetailRecordsRequest::setStopTime(long stopTime)
setParameter("StopTime", std::to_string(stopTime));
}
long ListCallDetailRecordsRequest::getStartTime()const
{
return startTime_;
}
void ListCallDetailRecordsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
int ListCallDetailRecordsRequest::getPageNumber()const
{
return pageNumber_;

View File

@@ -40,139 +40,134 @@ void ListCallDetailRecordsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCallDetailRecords = value["CallDetailRecords"];
for (auto value : allCallDetailRecords)
{
CallDetailRecords callDetailRecordsObject;
if(!value["TotalCount"].isNull())
callDetailRecordsObject.totalCount = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
callDetailRecordsObject.pageNumber = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
callDetailRecordsObject.pageSize = std::stoi(value["PageSize"].asString());
auto allList = value["List"]["CallDetailRecord"];
for (auto value : allList)
{
CallDetailRecords::CallDetailRecord callDetailRecordObject;
if(!value["ContactId"].isNull())
callDetailRecordObject.contactId = value["ContactId"].asString();
if(!value["StartTime"].isNull())
callDetailRecordObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
callDetailRecordObject.duration = std::stoi(value["Duration"].asString());
if(!value["Satisfaction"].isNull())
callDetailRecordObject.satisfaction = std::stoi(value["Satisfaction"].asString());
if(!value["ContactType"].isNull())
callDetailRecordObject.contactType = value["ContactType"].asString();
if(!value["ContactDisposition"].isNull())
callDetailRecordObject.contactDisposition = value["ContactDisposition"].asString();
if(!value["CallingNumber"].isNull())
callDetailRecordObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
callDetailRecordObject.calledNumber = value["CalledNumber"].asString();
if(!value["AgentNames"].isNull())
callDetailRecordObject.agentNames = value["AgentNames"].asString();
if(!value["SkillGroupNames"].isNull())
callDetailRecordObject.skillGroupNames = value["SkillGroupNames"].asString();
if(!value["InstanceId"].isNull())
callDetailRecordObject.instanceId = value["InstanceId"].asString();
if(!value["ExtraAttr"].isNull())
callDetailRecordObject.extraAttr = value["ExtraAttr"].asString();
auto allAgents = value["Agents"]["CallDetailAgent"];
for (auto value : allAgents)
{
CallDetailRecords::CallDetailRecord::CallDetailAgent agentsObject;
if(!value["ContactId"].isNull())
agentsObject.contactId = value["ContactId"].asString();
if(!value["AgentId"].isNull())
agentsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
agentsObject.agentName = value["AgentName"].asString();
if(!value["SkillGroupName"].isNull())
agentsObject.skillGroupName = value["SkillGroupName"].asString();
if(!value["QueueTime"].isNull())
agentsObject.queueTime = std::stoi(value["QueueTime"].asString());
if(!value["RingTime"].isNull())
agentsObject.ringTime = std::stoi(value["RingTime"].asString());
if(!value["StartTime"].isNull())
agentsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["TalkTime"].isNull())
agentsObject.talkTime = std::stoi(value["TalkTime"].asString());
if(!value["HoldTime"].isNull())
agentsObject.holdTime = std::stoi(value["HoldTime"].asString());
if(!value["WorkTime"].isNull())
agentsObject.workTime = std::stoi(value["WorkTime"].asString());
callDetailRecordObject.agents.push_back(agentsObject);
}
auto allRecordings = value["Recordings"]["Recording"];
for (auto value : allRecordings)
{
CallDetailRecords::CallDetailRecord::Recording recordingsObject;
if(!value["ContactId"].isNull())
recordingsObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingsObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingsObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingsObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingsObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingsObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingsObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingsObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingsObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingsObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingsObject.instanceId = value["InstanceId"].asString();
callDetailRecordObject.recordings.push_back(recordingsObject);
}
callDetailRecordsObject.list.push_back(callDetailRecordObject);
}
callDetailRecords_.push_back(callDetailRecordsObject);
}
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());
auto callDetailRecordsNode = value["CallDetailRecords"];
if(!callDetailRecordsNode["TotalCount"].isNull())
callDetailRecords_.totalCount = std::stoi(callDetailRecordsNode["TotalCount"].asString());
if(!callDetailRecordsNode["PageNumber"].isNull())
callDetailRecords_.pageNumber = std::stoi(callDetailRecordsNode["PageNumber"].asString());
if(!callDetailRecordsNode["PageSize"].isNull())
callDetailRecords_.pageSize = std::stoi(callDetailRecordsNode["PageSize"].asString());
auto allList = value["List"]["CallDetailRecord"];
for (auto value : allList)
{
CallDetailRecords::CallDetailRecord callDetailRecordObject;
if(!value["ContactId"].isNull())
callDetailRecordObject.contactId = value["ContactId"].asString();
if(!value["StartTime"].isNull())
callDetailRecordObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
callDetailRecordObject.duration = std::stoi(value["Duration"].asString());
if(!value["Satisfaction"].isNull())
callDetailRecordObject.satisfaction = std::stoi(value["Satisfaction"].asString());
if(!value["ContactType"].isNull())
callDetailRecordObject.contactType = value["ContactType"].asString();
if(!value["ContactDisposition"].isNull())
callDetailRecordObject.contactDisposition = value["ContactDisposition"].asString();
if(!value["CallingNumber"].isNull())
callDetailRecordObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
callDetailRecordObject.calledNumber = value["CalledNumber"].asString();
if(!value["AgentNames"].isNull())
callDetailRecordObject.agentNames = value["AgentNames"].asString();
if(!value["SkillGroupNames"].isNull())
callDetailRecordObject.skillGroupNames = value["SkillGroupNames"].asString();
if(!value["InstanceId"].isNull())
callDetailRecordObject.instanceId = value["InstanceId"].asString();
if(!value["ExtraAttr"].isNull())
callDetailRecordObject.extraAttr = value["ExtraAttr"].asString();
auto allAgents = value["Agents"]["CallDetailAgent"];
for (auto value : allAgents)
{
CallDetailRecords::CallDetailRecord::CallDetailAgent agentsObject;
if(!value["ContactId"].isNull())
agentsObject.contactId = value["ContactId"].asString();
if(!value["AgentId"].isNull())
agentsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
agentsObject.agentName = value["AgentName"].asString();
if(!value["SkillGroupName"].isNull())
agentsObject.skillGroupName = value["SkillGroupName"].asString();
if(!value["QueueTime"].isNull())
agentsObject.queueTime = std::stoi(value["QueueTime"].asString());
if(!value["RingTime"].isNull())
agentsObject.ringTime = std::stoi(value["RingTime"].asString());
if(!value["StartTime"].isNull())
agentsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["TalkTime"].isNull())
agentsObject.talkTime = std::stoi(value["TalkTime"].asString());
if(!value["HoldTime"].isNull())
agentsObject.holdTime = std::stoi(value["HoldTime"].asString());
if(!value["WorkTime"].isNull())
agentsObject.workTime = std::stoi(value["WorkTime"].asString());
callDetailRecordObject.agents.push_back(agentsObject);
}
auto allRecordings = value["Recordings"]["Recording"];
for (auto value : allRecordings)
{
CallDetailRecords::CallDetailRecord::Recording recordingsObject;
if(!value["ContactId"].isNull())
recordingsObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingsObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingsObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingsObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingsObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingsObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingsObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingsObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingsObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingsObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingsObject.instanceId = value["InstanceId"].asString();
callDetailRecordObject.recordings.push_back(recordingsObject);
}
callDetailRecords_.list.push_back(callDetailRecordObject);
}
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 ListCallDetailRecordsResult::getMessage()const
{
return message_;
}
std::vector<ListCallDetailRecordsResult::CallDetailRecords> ListCallDetailRecordsResult::getCallDetailRecords()const
{
return callDetailRecords_;
}
int ListCallDetailRecordsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListCallDetailRecordsResult::getCode()const
{
return code_;
}
bool ListCallDetailRecordsResult::getSuccess()const
{
return success_;
}
std::string ListCallDetailRecordsResult::getMessage()const
{
return message_;
}
ListCallDetailRecordsResult::CallDetailRecords ListCallDetailRecordsResult::getCallDetailRecords()const
{
return callDetailRecords_;
}
int ListCallDetailRecordsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListCallDetailRecordsResult::getCode()const
{
return code_;
}
bool ListCallDetailRecordsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,61 @@
/*
* 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/ccc/model/ListConfigRequest.h>
using AlibabaCloud::CCC::Model::ListConfigRequest;
ListConfigRequest::ListConfigRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListConfig")
{}
ListConfigRequest::~ListConfigRequest()
{}
std::string ListConfigRequest::getInstanceId()const
{
return instanceId_;
}
void ListConfigRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::vector<std::string> ListConfigRequest::getConfigItem()const
{
return configItem_;
}
void ListConfigRequest::setConfigItem(const std::vector<std::string>& configItem)
{
configItem_ = configItem;
for(int i = 0; i!= configItem.size(); i++)
setParameter("ConfigItem."+ std::to_string(i), configItem.at(i));
}
std::string ListConfigRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListConfigRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/ccc/model/ListConfigResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListConfigResult::ListConfigResult() :
ServiceResult()
{}
ListConfigResult::ListConfigResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListConfigResult::~ListConfigResult()
{}
void ListConfigResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allConfigItems = value["ConfigItems"]["ConfigItem"];
for (auto value : allConfigItems)
{
ConfigItem configItemsObject;
if(!value["Name"].isNull())
configItemsObject.name = value["Name"].asString();
if(!value["Value"].isNull())
configItemsObject.value = value["Value"].asString();
configItems_.push_back(configItemsObject);
}
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::vector<ListConfigResult::ConfigItem> ListConfigResult::getConfigItems()const
{
return configItems_;
}
std::string ListConfigResult::getMessage()const
{
return message_;
}
int ListConfigResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListConfigResult::getCode()const
{
return code_;
}
bool ListConfigResult::getSuccess()const
{
return success_;
}

View File

@@ -40,101 +40,101 @@ void ListContactFlowsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allContactFlows = value["ContactFlows"]["ContactFlow"];
for (auto value : allContactFlows)
{
ContactFlow contactFlowsObject;
if(!value["ContactFlowId"].isNull())
contactFlowsObject.contactFlowId = value["ContactFlowId"].asString();
if(!value["InstanceId"].isNull())
contactFlowsObject.instanceId = value["InstanceId"].asString();
if(!value["ContactFlowName"].isNull())
contactFlowsObject.contactFlowName = value["ContactFlowName"].asString();
if(!value["ContactFlowDescription"].isNull())
contactFlowsObject.contactFlowDescription = value["ContactFlowDescription"].asString();
if(!value["Type"].isNull())
contactFlowsObject.type = value["Type"].asString();
if(!value["AppliedVersion"].isNull())
contactFlowsObject.appliedVersion = value["AppliedVersion"].asString();
auto allVersions = value["Versions"]["ContactFlowVersion"];
for (auto value : allVersions)
{
ContactFlow::ContactFlowVersion versionsObject;
if(!value["ContactFlowVersionId"].isNull())
versionsObject.contactFlowVersionId = value["ContactFlowVersionId"].asString();
if(!value["Version"].isNull())
versionsObject.version = value["Version"].asString();
if(!value["ContactFlowVersionDescription"].isNull())
versionsObject.contactFlowVersionDescription = value["ContactFlowVersionDescription"].asString();
if(!value["LastModified"].isNull())
versionsObject.lastModified = value["LastModified"].asString();
if(!value["LastModifiedBy"].isNull())
versionsObject.lastModifiedBy = value["LastModifiedBy"].asString();
if(!value["LockedBy"].isNull())
versionsObject.lockedBy = value["LockedBy"].asString();
if(!value["Status"].isNull())
versionsObject.status = value["Status"].asString();
contactFlowsObject.versions.push_back(versionsObject);
}
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
for (auto value : allPhoneNumbers)
{
ContactFlow::PhoneNumber phoneNumbersObject;
if(!value["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
if(!value["InstanceId"].isNull())
phoneNumbersObject.instanceId = value["InstanceId"].asString();
if(!value["Number"].isNull())
phoneNumbersObject.number = value["Number"].asString();
if(!value["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
if(!value["TestOnly"].isNull())
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
if(!value["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
if(!value["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
if(!value["Usage"].isNull())
phoneNumbersObject.usage = value["Usage"].asString();
if(!value["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
contactFlowsObject.phoneNumbers.push_back(phoneNumbersObject);
}
contactFlows_.push_back(contactFlowsObject);
}
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());
auto allContactFlows = value["ContactFlows"]["ContactFlow"];
for (auto value : allContactFlows)
{
ContactFlow contactFlowsObject;
if(!value["ContactFlowId"].isNull())
contactFlowsObject.contactFlowId = value["ContactFlowId"].asString();
if(!value["InstanceId"].isNull())
contactFlowsObject.instanceId = value["InstanceId"].asString();
if(!value["ContactFlowName"].isNull())
contactFlowsObject.contactFlowName = value["ContactFlowName"].asString();
if(!value["ContactFlowDescription"].isNull())
contactFlowsObject.contactFlowDescription = value["ContactFlowDescription"].asString();
if(!value["Type"].isNull())
contactFlowsObject.type = value["Type"].asString();
if(!value["AppliedVersion"].isNull())
contactFlowsObject.appliedVersion = value["AppliedVersion"].asString();
auto allVersions = value["Versions"]["ContactFlowVersion"];
for (auto value : allVersions)
{
ContactFlow::ContactFlowVersion versionsObject;
if(!value["ContactFlowVersionId"].isNull())
versionsObject.contactFlowVersionId = value["ContactFlowVersionId"].asString();
if(!value["Version"].isNull())
versionsObject.version = value["Version"].asString();
if(!value["ContactFlowVersionDescription"].isNull())
versionsObject.contactFlowVersionDescription = value["ContactFlowVersionDescription"].asString();
if(!value["LastModified"].isNull())
versionsObject.lastModified = value["LastModified"].asString();
if(!value["LastModifiedBy"].isNull())
versionsObject.lastModifiedBy = value["LastModifiedBy"].asString();
if(!value["LockedBy"].isNull())
versionsObject.lockedBy = value["LockedBy"].asString();
if(!value["Status"].isNull())
versionsObject.status = value["Status"].asString();
contactFlowsObject.versions.push_back(versionsObject);
}
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
for (auto value : allPhoneNumbers)
{
ContactFlow::PhoneNumber phoneNumbersObject;
if(!value["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
if(!value["InstanceId"].isNull())
phoneNumbersObject.instanceId = value["InstanceId"].asString();
if(!value["Number"].isNull())
phoneNumbersObject.number = value["Number"].asString();
if(!value["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
if(!value["TestOnly"].isNull())
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
if(!value["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
if(!value["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
if(!value["Usage"].isNull())
phoneNumbersObject.usage = value["Usage"].asString();
if(!value["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
contactFlowsObject.phoneNumbers.push_back(phoneNumbersObject);
}
contactFlows_.push_back(contactFlowsObject);
}
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 ListContactFlowsResult::getMessage()const
{
return message_;
}
std::vector<ListContactFlowsResult::ContactFlow> ListContactFlowsResult::getContactFlows()const
{
return contactFlows_;
}
int ListContactFlowsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListContactFlowsResult::getCode()const
{
return code_;
}
bool ListContactFlowsResult::getSuccess()const
{
return success_;
}
std::string ListContactFlowsResult::getMessage()const
{
return message_;
}
std::vector<ListContactFlowsResult::ContactFlow> ListContactFlowsResult::getContactFlows()const
{
return contactFlows_;
}
int ListContactFlowsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListContactFlowsResult::getCode()const
{
return code_;
}
bool ListContactFlowsResult::getSuccess()const
{
return success_;
}

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/ccc/model/ListJobGroupsRequest.h>
using AlibabaCloud::CCC::Model::ListJobGroupsRequest;
ListJobGroupsRequest::ListJobGroupsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListJobGroups")
{}
ListJobGroupsRequest::~ListJobGroupsRequest()
{}
std::string ListJobGroupsRequest::getInstanceId()const
{
return instanceId_;
}
void ListJobGroupsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
int ListJobGroupsRequest::getPageSize()const
{
return pageSize_;
}
void ListJobGroupsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListJobGroupsRequest::getEndTime()const
{
return endTime_;
}
void ListJobGroupsRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
long ListJobGroupsRequest::getStartTime()const
{
return startTime_;
}
void ListJobGroupsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
int ListJobGroupsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListJobGroupsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,169 @@
/*
* 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/ccc/model/ListJobGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListJobGroupsResult::ListJobGroupsResult() :
ServiceResult()
{}
ListJobGroupsResult::ListJobGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListJobGroupsResult::~ListJobGroupsResult()
{}
void ListJobGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobGroupsNode = value["JobGroups"];
if(!jobGroupsNode["TotalCount"].isNull())
jobGroups_.totalCount = std::stoi(jobGroupsNode["TotalCount"].asString());
if(!jobGroupsNode["PageNumber"].isNull())
jobGroups_.pageNumber = std::stoi(jobGroupsNode["PageNumber"].asString());
if(!jobGroupsNode["PageSize"].isNull())
jobGroups_.pageSize = std::stoi(jobGroupsNode["PageSize"].asString());
auto allList = value["List"]["JobGroup"];
for (auto value : allList)
{
JobGroups::JobGroup jobGroupObject;
if(!value["Id"].isNull())
jobGroupObject.id = value["Id"].asString();
if(!value["Name"].isNull())
jobGroupObject.name = value["Name"].asString();
if(!value["Description"].isNull())
jobGroupObject.description = value["Description"].asString();
if(!value["ScenarioId"].isNull())
jobGroupObject.scenarioId = value["ScenarioId"].asString();
if(!value["JobFilePath"].isNull())
jobGroupObject.jobFilePath = value["JobFilePath"].asString();
if(!value["CreationTime"].isNull())
jobGroupObject.creationTime = std::stol(value["CreationTime"].asString());
auto strategyNode = value["Strategy"];
if(!strategyNode["Id"].isNull())
jobGroupObject.strategy.id = strategyNode["Id"].asString();
if(!strategyNode["Name"].isNull())
jobGroupObject.strategy.name = strategyNode["Name"].asString();
if(!strategyNode["Description"].isNull())
jobGroupObject.strategy.description = strategyNode["Description"].asString();
if(!strategyNode["Type"].isNull())
jobGroupObject.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
jobGroupObject.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
jobGroupObject.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
jobGroupObject.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
jobGroupObject.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
jobGroupObject.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
jobGroupObject.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
jobGroupObject.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
jobGroupObject.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
jobGroupObject.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
JobGroups::JobGroup::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
jobGroupObject.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
jobGroupObject.strategy.repeatDays.push_back(value.asString());
auto progressNode = value["Progress"];
if(!progressNode["TotalJobs"].isNull())
jobGroupObject.progress.totalJobs = std::stoi(progressNode["TotalJobs"].asString());
if(!progressNode["Status"].isNull())
jobGroupObject.progress.status = progressNode["Status"].asString();
if(!progressNode["TotalNotAnswered"].isNull())
jobGroupObject.progress.totalNotAnswered = std::stoi(progressNode["TotalNotAnswered"].asString());
if(!progressNode["TotalCompleted"].isNull())
jobGroupObject.progress.totalCompleted = std::stoi(progressNode["TotalCompleted"].asString());
if(!progressNode["StartTime"].isNull())
jobGroupObject.progress.startTime = std::stol(progressNode["StartTime"].asString());
if(!progressNode["Duration"].isNull())
jobGroupObject.progress.duration = std::stoi(progressNode["Duration"].asString());
auto allCategories = value["Categories"]["KeyValuePair"];
for (auto value : allCategories)
{
JobGroups::JobGroup::Progress::KeyValuePair keyValuePairObject;
if(!value["Key"].isNull())
keyValuePairObject.key = value["Key"].asString();
if(!value["Value"].isNull())
keyValuePairObject.value = value["Value"].asString();
jobGroupObject.progress.categories.push_back(keyValuePairObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobGroupObject.callingNumbers.push_back(value.asString());
jobGroups_.list.push_back(jobGroupObject);
}
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 ListJobGroupsResult::getMessage()const
{
return message_;
}
int ListJobGroupsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListJobGroupsResult::getCode()const
{
return code_;
}
ListJobGroupsResult::JobGroups ListJobGroupsResult::getJobGroups()const
{
return jobGroups_;
}
bool ListJobGroupsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,137 @@
/*
* 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/ccc/model/ListJobStatusRequest.h>
using AlibabaCloud::CCC::Model::ListJobStatusRequest;
ListJobStatusRequest::ListJobStatusRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListJobStatus")
{}
ListJobStatusRequest::~ListJobStatusRequest()
{}
std::string ListJobStatusRequest::getContactName()const
{
return contactName_;
}
void ListJobStatusRequest::setContactName(const std::string& contactName)
{
contactName_ = contactName;
setParameter("ContactName", contactName);
}
std::string ListJobStatusRequest::getInstanceId()const
{
return instanceId_;
}
void ListJobStatusRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListJobStatusRequest::getTimeAlignment()const
{
return timeAlignment_;
}
void ListJobStatusRequest::setTimeAlignment(const std::string& timeAlignment)
{
timeAlignment_ = timeAlignment;
setParameter("TimeAlignment", timeAlignment);
}
std::string ListJobStatusRequest::getGroupId()const
{
return groupId_;
}
void ListJobStatusRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string ListJobStatusRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void ListJobStatusRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setParameter("PhoneNumber", phoneNumber);
}
int ListJobStatusRequest::getPageSize()const
{
return pageSize_;
}
void ListJobStatusRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListJobStatusRequest::getEndTime()const
{
return endTime_;
}
void ListJobStatusRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
long ListJobStatusRequest::getStartTime()const
{
return startTime_;
}
void ListJobStatusRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
std::string ListJobStatusRequest::getScenarioId()const
{
return scenarioId_;
}
void ListJobStatusRequest::setScenarioId(const std::string& scenarioId)
{
scenarioId_ = scenarioId;
setParameter("ScenarioId", scenarioId);
}
int ListJobStatusRequest::getPageNumber()const
{
return pageNumber_;
}
void ListJobStatusRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,211 @@
/*
* 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/ccc/model/ListJobStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListJobStatusResult::ListJobStatusResult() :
ServiceResult()
{}
ListJobStatusResult::ListJobStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListJobStatusResult::~ListJobStatusResult()
{}
void ListJobStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobsNode = value["Jobs"];
if(!jobsNode["TotalCount"].isNull())
jobs_.totalCount = std::stoi(jobsNode["TotalCount"].asString());
if(!jobsNode["PageNumber"].isNull())
jobs_.pageNumber = std::stoi(jobsNode["PageNumber"].asString());
if(!jobsNode["PageSize"].isNull())
jobs_.pageSize = std::stoi(jobsNode["PageSize"].asString());
auto allList = value["List"]["Job"];
for (auto value : allList)
{
Jobs::Job jobObject;
if(!value["JobId"].isNull())
jobObject.jobId = value["JobId"].asString();
if(!value["GroupId"].isNull())
jobObject.groupId = value["GroupId"].asString();
if(!value["ScenarioId"].isNull())
jobObject.scenarioId = value["ScenarioId"].asString();
if(!value["StrategyId"].isNull())
jobObject.strategyId = value["StrategyId"].asString();
if(!value["Priority"].isNull())
jobObject.priority = std::stoi(value["Priority"].asString());
if(!value["Status"].isNull())
jobObject.status = value["Status"].asString();
if(!value["ReferenceId"].isNull())
jobObject.referenceId = value["ReferenceId"].asString();
if(!value["FailureReason"].isNull())
jobObject.failureReason = value["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Jobs::Job::Contact contactsObject;
if(!value["ContactId"].isNull())
contactsObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactsObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactsObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactsObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactsObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactsObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactsObject.referenceId = value["ReferenceId"].asString();
if(!value["JobId"].isNull())
contactsObject.jobId = value["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Jobs::Job::KeyValuePair extrasObject;
if(!value["Key"].isNull())
extrasObject.key = value["Key"].asString();
if(!value["Value"].isNull())
extrasObject.value = value["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allTasks = value["Tasks"]["Task"];
for (auto value : allTasks)
{
Jobs::Job::Task tasksObject;
if(!value["TaskId"].isNull())
tasksObject.taskId = value["TaskId"].asString();
if(!value["JobId"].isNull())
tasksObject.jobId = value["JobId"].asString();
if(!value["ScenarioId"].isNull())
tasksObject.scenarioId = value["ScenarioId"].asString();
if(!value["ChatbotId"].isNull())
tasksObject.chatbotId = value["ChatbotId"].asString();
if(!value["PlanedTime"].isNull())
tasksObject.planedTime = std::stol(value["PlanedTime"].asString());
if(!value["ActualTime"].isNull())
tasksObject.actualTime = std::stol(value["ActualTime"].asString());
if(!value["CallingNumber"].isNull())
tasksObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
tasksObject.calledNumber = value["CalledNumber"].asString();
if(!value["CallId"].isNull())
tasksObject.callId = value["CallId"].asString();
if(!value["Status"].isNull())
tasksObject.status = value["Status"].asString();
if(!value["Brief"].isNull())
tasksObject.brief = value["Brief"].asString();
if(!value["Duration"].isNull())
tasksObject.duration = std::stoi(value["Duration"].asString());
auto contact1Node = value["Contact"];
if(!contact1Node["ContactId"].isNull())
tasksObject.contact1.contactId = contact1Node["ContactId"].asString();
if(!contact1Node["ContactName"].isNull())
tasksObject.contact1.contactName = contact1Node["ContactName"].asString();
if(!contact1Node["Honorific"].isNull())
tasksObject.contact1.honorific = contact1Node["Honorific"].asString();
if(!contact1Node["Role"].isNull())
tasksObject.contact1.role = contact1Node["Role"].asString();
if(!contact1Node["PhoneNumber"].isNull())
tasksObject.contact1.phoneNumber = contact1Node["PhoneNumber"].asString();
if(!contact1Node["State"].isNull())
tasksObject.contact1.state = contact1Node["State"].asString();
if(!contact1Node["ReferenceId"].isNull())
tasksObject.contact1.referenceId = contact1Node["ReferenceId"].asString();
if(!contact1Node["JobId"].isNull())
tasksObject.contact1.jobId = contact1Node["JobId"].asString();
jobObject.tasks.push_back(tasksObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Jobs::Job::SummaryItem summaryObject;
if(!value["SummaryId"].isNull())
summaryObject.summaryId = value["SummaryId"].asString();
if(!value["GroupId"].isNull())
summaryObject.groupId = value["GroupId"].asString();
if(!value["JobId"].isNull())
summaryObject.jobId = value["JobId"].asString();
if(!value["TaskId"].isNull())
summaryObject.taskId = value["TaskId"].asString();
if(!value["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = value["ConversationDetailId"].asString();
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobObject.callingNumbers.push_back(value.asString());
jobs_.list.push_back(jobObject);
}
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 ListJobStatusResult::getMessage()const
{
return message_;
}
ListJobStatusResult::Jobs ListJobStatusResult::getJobs()const
{
return jobs_;
}
int ListJobStatusResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListJobStatusResult::getCode()const
{
return code_;
}
bool ListJobStatusResult::getSuccess()const
{
return success_;
}

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/ccc/model/ListJobsByGroupRequest.h>
using AlibabaCloud::CCC::Model::ListJobsByGroupRequest;
ListJobsByGroupRequest::ListJobsByGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListJobsByGroup")
{}
ListJobsByGroupRequest::~ListJobsByGroupRequest()
{}
std::string ListJobsByGroupRequest::getInstanceId()const
{
return instanceId_;
}
void ListJobsByGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListJobsByGroupRequest::getJobFailureReason()const
{
return jobFailureReason_;
}
void ListJobsByGroupRequest::setJobFailureReason(const std::string& jobFailureReason)
{
jobFailureReason_ = jobFailureReason;
setParameter("JobFailureReason", jobFailureReason);
}
std::string ListJobsByGroupRequest::getJobStatus()const
{
return jobStatus_;
}
void ListJobsByGroupRequest::setJobStatus(const std::string& jobStatus)
{
jobStatus_ = jobStatus;
setParameter("JobStatus", jobStatus);
}
std::string ListJobsByGroupRequest::getJobGroupId()const
{
return jobGroupId_;
}
void ListJobsByGroupRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}
int ListJobsByGroupRequest::getPageSize()const
{
return pageSize_;
}
void ListJobsByGroupRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int ListJobsByGroupRequest::getPageNumber()const
{
return pageNumber_;
}
void ListJobsByGroupRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,166 @@
/*
* 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/ccc/model/ListJobsByGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListJobsByGroupResult::ListJobsByGroupResult() :
ServiceResult()
{}
ListJobsByGroupResult::ListJobsByGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListJobsByGroupResult::~ListJobsByGroupResult()
{}
void ListJobsByGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobsNode = value["Jobs"];
if(!jobsNode["TotalCount"].isNull())
jobs_.totalCount = std::stoi(jobsNode["TotalCount"].asString());
if(!jobsNode["PageNumber"].isNull())
jobs_.pageNumber = std::stoi(jobsNode["PageNumber"].asString());
if(!jobsNode["PageSize"].isNull())
jobs_.pageSize = std::stoi(jobsNode["PageSize"].asString());
auto allList = value["List"]["Job"];
for (auto value : allList)
{
Jobs::Job jobObject;
if(!value["JobId"].isNull())
jobObject.jobId = value["JobId"].asString();
if(!value["GroupId"].isNull())
jobObject.groupId = value["GroupId"].asString();
if(!value["ScenarioId"].isNull())
jobObject.scenarioId = value["ScenarioId"].asString();
if(!value["StrategyId"].isNull())
jobObject.strategyId = value["StrategyId"].asString();
if(!value["Priority"].isNull())
jobObject.priority = std::stoi(value["Priority"].asString());
if(!value["SystemPriority"].isNull())
jobObject.systemPriority = std::stoi(value["SystemPriority"].asString());
if(!value["Status"].isNull())
jobObject.status = value["Status"].asString();
if(!value["ReferenceId"].isNull())
jobObject.referenceId = value["ReferenceId"].asString();
if(!value["FailureReason"].isNull())
jobObject.failureReason = value["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Jobs::Job::Contact contactsObject;
if(!value["ContactId"].isNull())
contactsObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactsObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactsObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactsObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactsObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactsObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactsObject.referenceId = value["ReferenceId"].asString();
if(!value["JobId"].isNull())
contactsObject.jobId = value["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Jobs::Job::KeyValuePair extrasObject;
if(!value["Key"].isNull())
extrasObject.key = value["Key"].asString();
if(!value["Value"].isNull())
extrasObject.value = value["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Jobs::Job::SummaryItem summaryObject;
if(!value["SummaryId"].isNull())
summaryObject.summaryId = value["SummaryId"].asString();
if(!value["GroupId"].isNull())
summaryObject.groupId = value["GroupId"].asString();
if(!value["JobId"].isNull())
summaryObject.jobId = value["JobId"].asString();
if(!value["TaskId"].isNull())
summaryObject.taskId = value["TaskId"].asString();
if(!value["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = value["ConversationDetailId"].asString();
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobObject.callingNumbers.push_back(value.asString());
jobs_.list.push_back(jobObject);
}
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 ListJobsByGroupResult::getMessage()const
{
return message_;
}
ListJobsByGroupResult::Jobs ListJobsByGroupResult::getJobs()const
{
return jobs_;
}
int ListJobsByGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListJobsByGroupResult::getCode()const
{
return code_;
}
bool ListJobsByGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -40,79 +40,78 @@ void ListPhoneNumbersResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
for (auto value : allPhoneNumbers)
{
PhoneNumber phoneNumbersObject;
if(!value["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
if(!value["InstanceId"].isNull())
phoneNumbersObject.instanceId = value["InstanceId"].asString();
if(!value["Number"].isNull())
phoneNumbersObject.number = value["Number"].asString();
if(!value["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
if(!value["TestOnly"].isNull())
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
if(!value["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
if(!value["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
if(!value["Usage"].isNull())
phoneNumbersObject.usage = value["Usage"].asString();
if(!value["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
auto allContactFlow = value["ContactFlow"];
for (auto value : allContactFlow)
{
PhoneNumber::ContactFlow contactFlowObject;
if(!value["ContactFlowId"].isNull())
contactFlowObject.contactFlowId = value["ContactFlowId"].asString();
if(!value["InstanceId"].isNull())
contactFlowObject.instanceId = value["InstanceId"].asString();
if(!value["ContactFlowName"].isNull())
contactFlowObject.contactFlowName = value["ContactFlowName"].asString();
if(!value["ContactFlowDescription"].isNull())
contactFlowObject.contactFlowDescription = value["ContactFlowDescription"].asString();
if(!value["Type"].isNull())
contactFlowObject.type = value["Type"].asString();
phoneNumbersObject.contactFlow.push_back(contactFlowObject);
}
phoneNumbers_.push_back(phoneNumbersObject);
}
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());
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
for (auto value : allPhoneNumbers)
{
PhoneNumber phoneNumbersObject;
if(!value["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
if(!value["InstanceId"].isNull())
phoneNumbersObject.instanceId = value["InstanceId"].asString();
if(!value["Number"].isNull())
phoneNumbersObject.number = value["Number"].asString();
if(!value["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
if(!value["TestOnly"].isNull())
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
if(!value["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
if(!value["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
if(!value["Usage"].isNull())
phoneNumbersObject.usage = value["Usage"].asString();
if(!value["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
if(!value["Province"].isNull())
phoneNumbersObject.province = value["Province"].asString();
if(!value["City"].isNull())
phoneNumbersObject.city = value["City"].asString();
auto contactFlowNode = value["ContactFlow"];
if(!contactFlowNode["ContactFlowId"].isNull())
phoneNumbersObject.contactFlow.contactFlowId = contactFlowNode["ContactFlowId"].asString();
if(!contactFlowNode["InstanceId"].isNull())
phoneNumbersObject.contactFlow.instanceId = contactFlowNode["InstanceId"].asString();
if(!contactFlowNode["ContactFlowName"].isNull())
phoneNumbersObject.contactFlow.contactFlowName = contactFlowNode["ContactFlowName"].asString();
if(!contactFlowNode["ContactFlowDescription"].isNull())
phoneNumbersObject.contactFlow.contactFlowDescription = contactFlowNode["ContactFlowDescription"].asString();
if(!contactFlowNode["Type"].isNull())
phoneNumbersObject.contactFlow.type = contactFlowNode["Type"].asString();
phoneNumbers_.push_back(phoneNumbersObject);
}
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::vector<ListPhoneNumbersResult::PhoneNumber> ListPhoneNumbersResult::getPhoneNumbers()const
{
return phoneNumbers_;
}
std::string ListPhoneNumbersResult::getMessage()const
{
return message_;
}
int ListPhoneNumbersResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListPhoneNumbersResult::getCode()const
{
return code_;
}
bool ListPhoneNumbersResult::getSuccess()const
{
return success_;
}
std::vector<ListPhoneNumbersResult::PhoneNumber> ListPhoneNumbersResult::getPhoneNumbers()const
{
return phoneNumbers_;
}
std::string ListPhoneNumbersResult::getMessage()const
{
return message_;
}
int ListPhoneNumbersResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListPhoneNumbersResult::getCode()const
{
return code_;
}
bool ListPhoneNumbersResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,126 @@
/*
* 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/ccc/model/ListPredictiveJobStatusRequest.h>
using AlibabaCloud::CCC::Model::ListPredictiveJobStatusRequest;
ListPredictiveJobStatusRequest::ListPredictiveJobStatusRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListPredictiveJobStatus")
{}
ListPredictiveJobStatusRequest::~ListPredictiveJobStatusRequest()
{}
std::string ListPredictiveJobStatusRequest::getContactName()const
{
return contactName_;
}
void ListPredictiveJobStatusRequest::setContactName(const std::string& contactName)
{
contactName_ = contactName;
setParameter("ContactName", contactName);
}
std::string ListPredictiveJobStatusRequest::getInstanceId()const
{
return instanceId_;
}
void ListPredictiveJobStatusRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListPredictiveJobStatusRequest::getTimeAlignment()const
{
return timeAlignment_;
}
void ListPredictiveJobStatusRequest::setTimeAlignment(const std::string& timeAlignment)
{
timeAlignment_ = timeAlignment;
setParameter("TimeAlignment", timeAlignment);
}
std::string ListPredictiveJobStatusRequest::getJobGroupId()const
{
return jobGroupId_;
}
void ListPredictiveJobStatusRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}
std::string ListPredictiveJobStatusRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void ListPredictiveJobStatusRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setParameter("PhoneNumber", phoneNumber);
}
int ListPredictiveJobStatusRequest::getPageSize()const
{
return pageSize_;
}
void ListPredictiveJobStatusRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListPredictiveJobStatusRequest::getEndTime()const
{
return endTime_;
}
void ListPredictiveJobStatusRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
long ListPredictiveJobStatusRequest::getStartTime()const
{
return startTime_;
}
void ListPredictiveJobStatusRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
int ListPredictiveJobStatusRequest::getPageNumber()const
{
return pageNumber_;
}
void ListPredictiveJobStatusRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,211 @@
/*
* 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/ccc/model/ListPredictiveJobStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListPredictiveJobStatusResult::ListPredictiveJobStatusResult() :
ServiceResult()
{}
ListPredictiveJobStatusResult::ListPredictiveJobStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListPredictiveJobStatusResult::~ListPredictiveJobStatusResult()
{}
void ListPredictiveJobStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto jobsNode = value["Jobs"];
if(!jobsNode["TotalCount"].isNull())
jobs_.totalCount = std::stoi(jobsNode["TotalCount"].asString());
if(!jobsNode["PageNumber"].isNull())
jobs_.pageNumber = std::stoi(jobsNode["PageNumber"].asString());
if(!jobsNode["PageSize"].isNull())
jobs_.pageSize = std::stoi(jobsNode["PageSize"].asString());
auto allList = value["List"]["Job"];
for (auto value : allList)
{
Jobs::Job jobObject;
if(!value["JobId"].isNull())
jobObject.jobId = value["JobId"].asString();
if(!value["GroupId"].isNull())
jobObject.groupId = value["GroupId"].asString();
if(!value["ScenarioId"].isNull())
jobObject.scenarioId = value["ScenarioId"].asString();
if(!value["StrategyId"].isNull())
jobObject.strategyId = value["StrategyId"].asString();
if(!value["Priority"].isNull())
jobObject.priority = std::stoi(value["Priority"].asString());
if(!value["Status"].isNull())
jobObject.status = value["Status"].asString();
if(!value["ReferenceId"].isNull())
jobObject.referenceId = value["ReferenceId"].asString();
if(!value["FailureReason"].isNull())
jobObject.failureReason = value["FailureReason"].asString();
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
{
Jobs::Job::Contact contactsObject;
if(!value["ContactId"].isNull())
contactsObject.contactId = value["ContactId"].asString();
if(!value["ContactName"].isNull())
contactsObject.contactName = value["ContactName"].asString();
if(!value["Honorific"].isNull())
contactsObject.honorific = value["Honorific"].asString();
if(!value["Role"].isNull())
contactsObject.role = value["Role"].asString();
if(!value["PhoneNumber"].isNull())
contactsObject.phoneNumber = value["PhoneNumber"].asString();
if(!value["State"].isNull())
contactsObject.state = value["State"].asString();
if(!value["ReferenceId"].isNull())
contactsObject.referenceId = value["ReferenceId"].asString();
if(!value["JobId"].isNull())
contactsObject.jobId = value["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtras = value["Extras"]["KeyValuePair"];
for (auto value : allExtras)
{
Jobs::Job::KeyValuePair extrasObject;
if(!value["Key"].isNull())
extrasObject.key = value["Key"].asString();
if(!value["Value"].isNull())
extrasObject.value = value["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allTasks = value["Tasks"]["Task"];
for (auto value : allTasks)
{
Jobs::Job::Task tasksObject;
if(!value["TaskId"].isNull())
tasksObject.taskId = value["TaskId"].asString();
if(!value["JobId"].isNull())
tasksObject.jobId = value["JobId"].asString();
if(!value["ScenarioId"].isNull())
tasksObject.scenarioId = value["ScenarioId"].asString();
if(!value["ChatbotId"].isNull())
tasksObject.chatbotId = value["ChatbotId"].asString();
if(!value["PlanedTime"].isNull())
tasksObject.planedTime = std::stol(value["PlanedTime"].asString());
if(!value["ActualTime"].isNull())
tasksObject.actualTime = std::stol(value["ActualTime"].asString());
if(!value["CallingNumber"].isNull())
tasksObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
tasksObject.calledNumber = value["CalledNumber"].asString();
if(!value["CallId"].isNull())
tasksObject.callId = value["CallId"].asString();
if(!value["Status"].isNull())
tasksObject.status = value["Status"].asString();
if(!value["Brief"].isNull())
tasksObject.brief = value["Brief"].asString();
if(!value["Duration"].isNull())
tasksObject.duration = std::stoi(value["Duration"].asString());
auto contact1Node = value["Contact"];
if(!contact1Node["ContactId"].isNull())
tasksObject.contact1.contactId = contact1Node["ContactId"].asString();
if(!contact1Node["ContactName"].isNull())
tasksObject.contact1.contactName = contact1Node["ContactName"].asString();
if(!contact1Node["Honorific"].isNull())
tasksObject.contact1.honorific = contact1Node["Honorific"].asString();
if(!contact1Node["Role"].isNull())
tasksObject.contact1.role = contact1Node["Role"].asString();
if(!contact1Node["PhoneNumber"].isNull())
tasksObject.contact1.phoneNumber = contact1Node["PhoneNumber"].asString();
if(!contact1Node["State"].isNull())
tasksObject.contact1.state = contact1Node["State"].asString();
if(!contact1Node["ReferenceId"].isNull())
tasksObject.contact1.referenceId = contact1Node["ReferenceId"].asString();
if(!contact1Node["JobId"].isNull())
tasksObject.contact1.jobId = contact1Node["JobId"].asString();
jobObject.tasks.push_back(tasksObject);
}
auto allSummary = value["Summary"]["SummaryItem"];
for (auto value : allSummary)
{
Jobs::Job::SummaryItem summaryObject;
if(!value["SummaryId"].isNull())
summaryObject.summaryId = value["SummaryId"].asString();
if(!value["GroupId"].isNull())
summaryObject.groupId = value["GroupId"].asString();
if(!value["JobId"].isNull())
summaryObject.jobId = value["JobId"].asString();
if(!value["TaskId"].isNull())
summaryObject.taskId = value["TaskId"].asString();
if(!value["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = value["ConversationDetailId"].asString();
if(!value["Category"].isNull())
summaryObject.category = value["Category"].asString();
if(!value["SummaryName"].isNull())
summaryObject.summaryName = value["SummaryName"].asString();
if(!value["Content"].isNull())
summaryObject.content = value["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];
for (auto value : allCallingNumbers)
jobObject.callingNumbers.push_back(value.asString());
jobs_.list.push_back(jobObject);
}
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 ListPredictiveJobStatusResult::getMessage()const
{
return message_;
}
ListPredictiveJobStatusResult::Jobs ListPredictiveJobStatusResult::getJobs()const
{
return jobs_;
}
int ListPredictiveJobStatusResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListPredictiveJobStatusResult::getCode()const
{
return code_;
}
bool ListPredictiveJobStatusResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/ListPrivilegesOfUserRequest.h>
using AlibabaCloud::CCC::Model::ListPrivilegesOfUserRequest;
ListPrivilegesOfUserRequest::ListPrivilegesOfUserRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListPrivilegesOfUser")
{}
ListPrivilegesOfUserRequest::~ListPrivilegesOfUserRequest()
{}
std::string ListPrivilegesOfUserRequest::getInstanceId()const
{
return instanceId_;
}
void ListPrivilegesOfUserRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListPrivilegesOfUserRequest::getUserId()const
{
return userId_;
}
void ListPrivilegesOfUserRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
}
std::string ListPrivilegesOfUserRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListPrivilegesOfUserRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

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/ccc/model/ListPrivilegesOfUserResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListPrivilegesOfUserResult::ListPrivilegesOfUserResult() :
ServiceResult()
{}
ListPrivilegesOfUserResult::ListPrivilegesOfUserResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListPrivilegesOfUserResult::~ListPrivilegesOfUserResult()
{}
void ListPrivilegesOfUserResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPrivileges = value["Privileges"]["Privilege"];
for (auto value : allPrivileges)
{
Privilege privilegesObject;
if(!value["PrivilegeId"].isNull())
privilegesObject.privilegeId = value["PrivilegeId"].asString();
if(!value["PrivilegeName"].isNull())
privilegesObject.privilegeName = value["PrivilegeName"].asString();
if(!value["PrivilegeDescription"].isNull())
privilegesObject.privilegeDescription = value["PrivilegeDescription"].asString();
privileges_.push_back(privilegesObject);
}
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 ListPrivilegesOfUserResult::getMessage()const
{
return message_;
}
std::vector<ListPrivilegesOfUserResult::Privilege> ListPrivilegesOfUserResult::getPrivileges()const
{
return privileges_;
}
int ListPrivilegesOfUserResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListPrivilegesOfUserResult::getCode()const
{
return code_;
}
bool ListPrivilegesOfUserResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/ListRealTimeAgentRequest.h>
using AlibabaCloud::CCC::Model::ListRealTimeAgentRequest;
ListRealTimeAgentRequest::ListRealTimeAgentRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListRealTimeAgent")
{}
ListRealTimeAgentRequest::~ListRealTimeAgentRequest()
{}
std::string ListRealTimeAgentRequest::getInstanceId()const
{
return instanceId_;
}
void ListRealTimeAgentRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListRealTimeAgentRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListRealTimeAgentRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,115 @@
/*
* 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/ccc/model/ListRealTimeAgentResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListRealTimeAgentResult::ListRealTimeAgentResult() :
ServiceResult()
{}
ListRealTimeAgentResult::ListRealTimeAgentResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRealTimeAgentResult::~ListRealTimeAgentResult()
{}
void ListRealTimeAgentResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["User"];
for (auto value : allData)
{
User dataObject;
if(!value["RamId"].isNull())
dataObject.ramId = value["RamId"].asString();
if(!value["DisplayName"].isNull())
dataObject.displayName = value["DisplayName"].asString();
if(!value["Phone"].isNull())
dataObject.phone = value["Phone"].asString();
if(!value["Dn"].isNull())
dataObject.dn = value["Dn"].asString();
if(!value["State"].isNull())
dataObject.state = value["State"].asString();
if(!value["StateDesc"].isNull())
dataObject.stateDesc = value["StateDesc"].asString();
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
for (auto value : allSkillLevels)
{
User::SkillLevel skillLevelsObject;
if(!value["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = value["SkillLevelId"].asString();
if(!value["Level"].isNull())
skillLevelsObject.level = std::stoi(value["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelsObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();
if(!skillNode["InstanceId"].isNull())
skillLevelsObject.skill.instanceId = skillNode["InstanceId"].asString();
if(!skillNode["SkillGroupName"].isNull())
skillLevelsObject.skill.skillGroupName = skillNode["SkillGroupName"].asString();
if(!skillNode["SkillGroupDescription"].isNull())
skillLevelsObject.skill.skillGroupDescription = skillNode["SkillGroupDescription"].asString();
dataObject.skillLevels.push_back(skillLevelsObject);
}
data_.push_back(dataObject);
}
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 ListRealTimeAgentResult::getMessage()const
{
return message_;
}
int ListRealTimeAgentResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRealTimeAgentResult::User> ListRealTimeAgentResult::getData()const
{
return data_;
}
std::string ListRealTimeAgentResult::getCode()const
{
return code_;
}
bool ListRealTimeAgentResult::getSuccess()const
{
return success_;
}

View File

@@ -40,71 +40,71 @@ void ListRecordingsByContactIdResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRecordings = value["Recordings"]["Recording"];
for (auto value : allRecordings)
{
Recording recordingsObject;
if(!value["ContactId"].isNull())
recordingsObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingsObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingsObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingsObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingsObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingsObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingsObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingsObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingsObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingsObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingsObject.instanceId = value["InstanceId"].asString();
recordings_.push_back(recordingsObject);
}
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());
auto allRecordings = value["Recordings"]["Recording"];
for (auto value : allRecordings)
{
Recording recordingsObject;
if(!value["ContactId"].isNull())
recordingsObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingsObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingsObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingsObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingsObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingsObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingsObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingsObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingsObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingsObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingsObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingsObject.instanceId = value["InstanceId"].asString();
recordings_.push_back(recordingsObject);
}
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 ListRecordingsByContactIdResult::getMessage()const
{
return message_;
}
int ListRecordingsByContactIdResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRecordingsByContactIdResult::Recording> ListRecordingsByContactIdResult::getRecordings()const
{
return recordings_;
}
std::string ListRecordingsByContactIdResult::getCode()const
{
return code_;
}
bool ListRecordingsByContactIdResult::getSuccess()const
{
return success_;
}
std::string ListRecordingsByContactIdResult::getMessage()const
{
return message_;
}
int ListRecordingsByContactIdResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRecordingsByContactIdResult::Recording> ListRecordingsByContactIdResult::getRecordings()const
{
return recordings_;
}
std::string ListRecordingsByContactIdResult::getCode()const
{
return code_;
}
bool ListRecordingsByContactIdResult::getSuccess()const
{
return success_;
}

View File

@@ -80,17 +80,6 @@ void ListRecordingsRequest::setPageSize(int pageSize)
setParameter("PageSize", std::to_string(pageSize));
}
long ListRecordingsRequest::getStartTime()const
{
return startTime_;
}
void ListRecordingsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
long ListRecordingsRequest::getStopTime()const
{
return stopTime_;
@@ -102,6 +91,17 @@ void ListRecordingsRequest::setStopTime(long stopTime)
setParameter("StopTime", std::to_string(stopTime));
}
long ListRecordingsRequest::getStartTime()const
{
return startTime_;
}
void ListRecordingsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
int ListRecordingsRequest::getPageNumber()const
{
return pageNumber_;

View File

@@ -40,83 +40,78 @@ void ListRecordingsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRecordings = value["Recordings"];
for (auto value : allRecordings)
{
Recordings recordingsObject;
if(!value["TotalCount"].isNull())
recordingsObject.totalCount = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
recordingsObject.pageNumber = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
recordingsObject.pageSize = std::stoi(value["PageSize"].asString());
auto allList = value["List"]["Recording"];
for (auto value : allList)
{
Recordings::Recording recordingObject;
if(!value["ContactId"].isNull())
recordingObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingObject.instanceId = value["InstanceId"].asString();
recordingsObject.list.push_back(recordingObject);
}
recordings_.push_back(recordingsObject);
}
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());
auto recordingsNode = value["Recordings"];
if(!recordingsNode["TotalCount"].isNull())
recordings_.totalCount = std::stoi(recordingsNode["TotalCount"].asString());
if(!recordingsNode["PageNumber"].isNull())
recordings_.pageNumber = std::stoi(recordingsNode["PageNumber"].asString());
if(!recordingsNode["PageSize"].isNull())
recordings_.pageSize = std::stoi(recordingsNode["PageSize"].asString());
auto allList = value["List"]["Recording"];
for (auto value : allList)
{
Recordings::Recording recordingObject;
if(!value["ContactId"].isNull())
recordingObject.contactId = value["ContactId"].asString();
if(!value["ContactType"].isNull())
recordingObject.contactType = value["ContactType"].asString();
if(!value["AgentId"].isNull())
recordingObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordingObject.agentName = value["AgentName"].asString();
if(!value["CallingNumber"].isNull())
recordingObject.callingNumber = value["CallingNumber"].asString();
if(!value["CalledNumber"].isNull())
recordingObject.calledNumber = value["CalledNumber"].asString();
if(!value["StartTime"].isNull())
recordingObject.startTime = std::stol(value["StartTime"].asString());
if(!value["Duration"].isNull())
recordingObject.duration = std::stoi(value["Duration"].asString());
if(!value["FileName"].isNull())
recordingObject.fileName = value["FileName"].asString();
if(!value["FilePath"].isNull())
recordingObject.filePath = value["FilePath"].asString();
if(!value["FileDescription"].isNull())
recordingObject.fileDescription = value["FileDescription"].asString();
if(!value["Channel"].isNull())
recordingObject.channel = value["Channel"].asString();
if(!value["InstanceId"].isNull())
recordingObject.instanceId = value["InstanceId"].asString();
recordings_.list.push_back(recordingObject);
}
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 ListRecordingsResult::getMessage()const
{
return message_;
}
int ListRecordingsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRecordingsResult::Recordings> ListRecordingsResult::getRecordings()const
{
return recordings_;
}
std::string ListRecordingsResult::getCode()const
{
return code_;
}
bool ListRecordingsResult::getSuccess()const
{
return success_;
}
std::string ListRecordingsResult::getMessage()const
{
return message_;
}
int ListRecordingsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
ListRecordingsResult::Recordings ListRecordingsResult::getRecordings()const
{
return recordings_;
}
std::string ListRecordingsResult::getCode()const
{
return code_;
}
bool ListRecordingsResult::getSuccess()const
{
return success_;
}

View File

@@ -40,53 +40,53 @@ void ListRolesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRoles = value["Roles"]["Role"];
for (auto value : allRoles)
{
Role rolesObject;
if(!value["RoleId"].isNull())
rolesObject.roleId = value["RoleId"].asString();
if(!value["InstanceId"].isNull())
rolesObject.instanceId = value["InstanceId"].asString();
if(!value["RoleName"].isNull())
rolesObject.roleName = value["RoleName"].asString();
if(!value["RoleDescription"].isNull())
rolesObject.roleDescription = value["RoleDescription"].asString();
roles_.push_back(rolesObject);
}
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());
auto allRoles = value["Roles"]["Role"];
for (auto value : allRoles)
{
Role rolesObject;
if(!value["RoleId"].isNull())
rolesObject.roleId = value["RoleId"].asString();
if(!value["InstanceId"].isNull())
rolesObject.instanceId = value["InstanceId"].asString();
if(!value["RoleName"].isNull())
rolesObject.roleName = value["RoleName"].asString();
if(!value["RoleDescription"].isNull())
rolesObject.roleDescription = value["RoleDescription"].asString();
roles_.push_back(rolesObject);
}
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 ListRolesResult::getMessage()const
{
return message_;
}
int ListRolesResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRolesResult::Role> ListRolesResult::getRoles()const
{
return roles_;
}
std::string ListRolesResult::getCode()const
{
return code_;
}
bool ListRolesResult::getSuccess()const
{
return success_;
}
std::string ListRolesResult::getMessage()const
{
return message_;
}
int ListRolesResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListRolesResult::Role> ListRolesResult::getRoles()const
{
return roles_;
}
std::string ListRolesResult::getCode()const
{
return code_;
}
bool ListRolesResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/ListScenarioTemplatesRequest.h>
using AlibabaCloud::CCC::Model::ListScenarioTemplatesRequest;
ListScenarioTemplatesRequest::ListScenarioTemplatesRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListScenarioTemplates")
{}
ListScenarioTemplatesRequest::~ListScenarioTemplatesRequest()
{}

View File

@@ -0,0 +1,141 @@
/*
* 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/ccc/model/ListScenarioTemplatesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListScenarioTemplatesResult::ListScenarioTemplatesResult() :
ServiceResult()
{}
ListScenarioTemplatesResult::ListScenarioTemplatesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListScenarioTemplatesResult::~ListScenarioTemplatesResult()
{}
void ListScenarioTemplatesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allScenarioTemplates = value["ScenarioTemplates"]["Scenario"];
for (auto value : allScenarioTemplates)
{
Scenario scenarioTemplatesObject;
if(!value["Id"].isNull())
scenarioTemplatesObject.id = value["Id"].asString();
if(!value["Name"].isNull())
scenarioTemplatesObject.name = value["Name"].asString();
if(!value["Description"].isNull())
scenarioTemplatesObject.description = value["Description"].asString();
if(!value["Type"].isNull())
scenarioTemplatesObject.type = value["Type"].asString();
if(!value["IsTemplate"].isNull())
scenarioTemplatesObject.isTemplate = value["IsTemplate"].asString() == "true";
auto allSurveys = value["Surveys"]["Survey"];
for (auto value : allSurveys)
{
Scenario::Survey surveysObject;
if(!value["Id"].isNull())
surveysObject.id = value["Id"].asString();
if(!value["Name"].isNull())
surveysObject.name = value["Name"].asString();
if(!value["Description"].isNull())
surveysObject.description = value["Description"].asString();
if(!value["Role"].isNull())
surveysObject.role = value["Role"].asString();
if(!value["Round"].isNull())
surveysObject.round = std::stoi(value["Round"].asString());
if(!value["BeebotId"].isNull())
surveysObject.beebotId = value["BeebotId"].asString();
if(!value["GlobalQuestions"].isNull())
surveysObject.globalQuestions = value["GlobalQuestions"].asString();
auto allIntents = value["Intents"]["IntentNode"];
for (auto value : allIntents)
{
Scenario::Survey::IntentNode intentsObject;
if(!value["NodeId"].isNull())
intentsObject.nodeId = value["NodeId"].asString();
if(!value["IntentId"].isNull())
intentsObject.intentId = value["IntentId"].asString();
surveysObject.intents.push_back(intentsObject);
}
auto flowNode = value["Flow"];
if(!flowNode["FlowId"].isNull())
surveysObject.flow.flowId = flowNode["FlowId"].asString();
if(!flowNode["IsPublished"].isNull())
surveysObject.flow.isPublished = flowNode["IsPublished"].asString() == "true";
if(!flowNode["FlowJson"].isNull())
surveysObject.flow.flowJson = flowNode["FlowJson"].asString();
scenarioTemplatesObject.surveys.push_back(surveysObject);
}
auto allVariables = value["Variables"]["KeyValuePair"];
for (auto value : allVariables)
{
Scenario::KeyValuePair variablesObject;
if(!value["Key"].isNull())
variablesObject.key = value["Key"].asString();
if(!value["Value"].isNull())
variablesObject.value = value["Value"].asString();
scenarioTemplatesObject.variables.push_back(variablesObject);
}
scenarioTemplates_.push_back(scenarioTemplatesObject);
}
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 ListScenarioTemplatesResult::getMessage()const
{
return message_;
}
int ListScenarioTemplatesResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListScenarioTemplatesResult::Scenario> ListScenarioTemplatesResult::getScenarioTemplates()const
{
return scenarioTemplates_;
}
std::string ListScenarioTemplatesResult::getCode()const
{
return code_;
}
bool ListScenarioTemplatesResult::getSuccess()const
{
return success_;
}

View 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/ccc/model/ListScenariosRequest.h>
using AlibabaCloud::CCC::Model::ListScenariosRequest;
ListScenariosRequest::ListScenariosRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListScenarios")
{}
ListScenariosRequest::~ListScenariosRequest()
{}
std::string ListScenariosRequest::getInstanceId()const
{
return instanceId_;
}
void ListScenariosRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,172 @@
/*
* 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/ccc/model/ListScenariosResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListScenariosResult::ListScenariosResult() :
ServiceResult()
{}
ListScenariosResult::ListScenariosResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListScenariosResult::~ListScenariosResult()
{}
void ListScenariosResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allScenarios = value["Scenarios"]["Scenario"];
for (auto value : allScenarios)
{
Scenario scenariosObject;
if(!value["Id"].isNull())
scenariosObject.id = value["Id"].asString();
if(!value["Name"].isNull())
scenariosObject.name = value["Name"].asString();
if(!value["Description"].isNull())
scenariosObject.description = value["Description"].asString();
if(!value["Type"].isNull())
scenariosObject.type = value["Type"].asString();
if(!value["IsTemplate"].isNull())
scenariosObject.isTemplate = value["IsTemplate"].asString() == "true";
auto allSurveys = value["Surveys"]["Survey"];
for (auto value : allSurveys)
{
Scenario::Survey surveysObject;
if(!value["Id"].isNull())
surveysObject.id = value["Id"].asString();
if(!value["Name"].isNull())
surveysObject.name = value["Name"].asString();
if(!value["Description"].isNull())
surveysObject.description = value["Description"].asString();
if(!value["Role"].isNull())
surveysObject.role = value["Role"].asString();
if(!value["Round"].isNull())
surveysObject.round = std::stoi(value["Round"].asString());
if(!value["BeebotId"].isNull())
surveysObject.beebotId = value["BeebotId"].asString();
auto allIntents = value["Intents"]["IntentNode"];
for (auto value : allIntents)
{
Scenario::Survey::IntentNode intentsObject;
if(!value["NodeId"].isNull())
intentsObject.nodeId = value["NodeId"].asString();
if(!value["IntentId"].isNull())
intentsObject.intentId = value["IntentId"].asString();
surveysObject.intents.push_back(intentsObject);
}
scenariosObject.surveys.push_back(surveysObject);
}
auto allVariables = value["Variables"]["KeyValuePair"];
for (auto value : allVariables)
{
Scenario::KeyValuePair variablesObject;
if(!value["Key"].isNull())
variablesObject.key = value["Key"].asString();
if(!value["Value"].isNull())
variablesObject.value = value["Value"].asString();
scenariosObject.variables.push_back(variablesObject);
}
auto strategyNode = value["Strategy"];
if(!strategyNode["Id"].isNull())
scenariosObject.strategy.id = strategyNode["Id"].asString();
if(!strategyNode["Name"].isNull())
scenariosObject.strategy.name = strategyNode["Name"].asString();
if(!strategyNode["Description"].isNull())
scenariosObject.strategy.description = strategyNode["Description"].asString();
if(!strategyNode["Type"].isNull())
scenariosObject.strategy.type = strategyNode["Type"].asString();
if(!strategyNode["StartTime"].isNull())
scenariosObject.strategy.startTime = std::stol(strategyNode["StartTime"].asString());
if(!strategyNode["EndTime"].isNull())
scenariosObject.strategy.endTime = std::stol(strategyNode["EndTime"].asString());
if(!strategyNode["RepeatBy"].isNull())
scenariosObject.strategy.repeatBy = strategyNode["RepeatBy"].asString();
if(!strategyNode["MaxAttemptsPerDay"].isNull())
scenariosObject.strategy.maxAttemptsPerDay = std::stoi(strategyNode["MaxAttemptsPerDay"].asString());
if(!strategyNode["MinAttemptInterval"].isNull())
scenariosObject.strategy.minAttemptInterval = std::stoi(strategyNode["MinAttemptInterval"].asString());
if(!strategyNode["Customized"].isNull())
scenariosObject.strategy.customized = strategyNode["Customized"].asString();
if(!strategyNode["RoutingStrategy"].isNull())
scenariosObject.strategy.routingStrategy = strategyNode["RoutingStrategy"].asString();
if(!strategyNode["FollowUpStrategy"].isNull())
scenariosObject.strategy.followUpStrategy = strategyNode["FollowUpStrategy"].asString();
if(!strategyNode["IsTemplate"].isNull())
scenariosObject.strategy.isTemplate = strategyNode["IsTemplate"].asString() == "true";
auto allWorkingTime = value["WorkingTime"]["TimeFrame"];
for (auto value : allWorkingTime)
{
Scenario::Strategy::TimeFrame timeFrameObject;
if(!value["BeginTime"].isNull())
timeFrameObject.beginTime = value["BeginTime"].asString();
if(!value["EndTime"].isNull())
timeFrameObject.endTime = value["EndTime"].asString();
scenariosObject.strategy.workingTime.push_back(timeFrameObject);
}
auto allRepeatDays = strategyNode["RepeatDays"]["Integer"];
for (auto value : allRepeatDays)
scenariosObject.strategy.repeatDays.push_back(value.asString());
scenarios_.push_back(scenariosObject);
}
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 ListScenariosResult::getMessage()const
{
return message_;
}
std::vector<ListScenariosResult::Scenario> ListScenariosResult::getScenarios()const
{
return scenarios_;
}
int ListScenariosResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListScenariosResult::getCode()const
{
return code_;
}
bool ListScenariosResult::getSuccess()const
{
return success_;
}

Some files were not shown because too many files have changed in this diff Show More