Fixed bugs for CCC.

This commit is contained in:
sdk-team
2020-12-01 08:15:17 +00:00
parent 423fdd2fe5
commit ea23aa89b7
70 changed files with 2942 additions and 586 deletions

View File

@@ -1167,6 +1167,42 @@ CCCClient::DialogueOutcomeCallable CCCClient::dialogueCallable(const DialogueReq
return task->get_future();
}
CCCClient::DisableTrunkProvidersOutcome CCCClient::disableTrunkProviders(const DisableTrunkProvidersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableTrunkProvidersOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableTrunkProvidersOutcome(DisableTrunkProvidersResult(outcome.result()));
else
return DisableTrunkProvidersOutcome(outcome.error());
}
void CCCClient::disableTrunkProvidersAsync(const DisableTrunkProvidersRequest& request, const DisableTrunkProvidersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableTrunkProviders(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::DisableTrunkProvidersOutcomeCallable CCCClient::disableTrunkProvidersCallable(const DisableTrunkProvidersRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableTrunkProvidersOutcome()>>(
[this, request]()
{
return this->disableTrunkProviders(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::DownloadAllTypeRecordingOutcome CCCClient::downloadAllTypeRecording(const DownloadAllTypeRecordingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2391,6 +2427,42 @@ CCCClient::GetUserOutcomeCallable CCCClient::getUserCallable(const GetUserReques
return task->get_future();
}
CCCClient::GetUserByExtensionOutcome CCCClient::getUserByExtension(const GetUserByExtensionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetUserByExtensionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetUserByExtensionOutcome(GetUserByExtensionResult(outcome.result()));
else
return GetUserByExtensionOutcome(outcome.error());
}
void CCCClient::getUserByExtensionAsync(const GetUserByExtensionRequest& request, const GetUserByExtensionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getUserByExtension(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::GetUserByExtensionOutcomeCallable CCCClient::getUserByExtensionCallable(const GetUserByExtensionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetUserByExtensionOutcome()>>(
[this, request]()
{
return this->getUserByExtension(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::InflightTaskTimeoutOutcome CCCClient::inflightTaskTimeout(const InflightTaskTimeoutRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2571,6 +2643,42 @@ CCCClient::ListAgentEventsOutcomeCallable CCCClient::listAgentEventsCallable(con
return task->get_future();
}
CCCClient::ListAgentStateLogsOutcome CCCClient::listAgentStateLogs(const ListAgentStateLogsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListAgentStateLogsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListAgentStateLogsOutcome(ListAgentStateLogsResult(outcome.result()));
else
return ListAgentStateLogsOutcome(outcome.error());
}
void CCCClient::listAgentStateLogsAsync(const ListAgentStateLogsRequest& request, const ListAgentStateLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listAgentStateLogs(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListAgentStateLogsOutcomeCallable CCCClient::listAgentStateLogsCallable(const ListAgentStateLogsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListAgentStateLogsOutcome()>>(
[this, request]()
{
return this->listAgentStateLogs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListAgentStatesOutcome CCCClient::listAgentStates(const ListAgentStatesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3795,6 +3903,114 @@ CCCClient::ListSurveysOutcomeCallable CCCClient::listSurveysCallable(const ListS
return task->get_future();
}
CCCClient::ListTransferableSkillGroupsOutcome CCCClient::listTransferableSkillGroups(const ListTransferableSkillGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTransferableSkillGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTransferableSkillGroupsOutcome(ListTransferableSkillGroupsResult(outcome.result()));
else
return ListTransferableSkillGroupsOutcome(outcome.error());
}
void CCCClient::listTransferableSkillGroupsAsync(const ListTransferableSkillGroupsRequest& request, const ListTransferableSkillGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTransferableSkillGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListTransferableSkillGroupsOutcomeCallable CCCClient::listTransferableSkillGroupsCallable(const ListTransferableSkillGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTransferableSkillGroupsOutcome()>>(
[this, request]()
{
return this->listTransferableSkillGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListTrunkProvidersOutcome CCCClient::listTrunkProviders(const ListTrunkProvidersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTrunkProvidersOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTrunkProvidersOutcome(ListTrunkProvidersResult(outcome.result()));
else
return ListTrunkProvidersOutcome(outcome.error());
}
void CCCClient::listTrunkProvidersAsync(const ListTrunkProvidersRequest& request, const ListTrunkProvidersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTrunkProviders(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListTrunkProvidersOutcomeCallable CCCClient::listTrunkProvidersCallable(const ListTrunkProvidersRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTrunkProvidersOutcome()>>(
[this, request]()
{
return this->listTrunkProviders(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListTrunksOfSkillGroupOutcome CCCClient::listTrunksOfSkillGroup(const ListTrunksOfSkillGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTrunksOfSkillGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTrunksOfSkillGroupOutcome(ListTrunksOfSkillGroupResult(outcome.result()));
else
return ListTrunksOfSkillGroupOutcome(outcome.error());
}
void CCCClient::listTrunksOfSkillGroupAsync(const ListTrunksOfSkillGroupRequest& request, const ListTrunksOfSkillGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTrunksOfSkillGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListTrunksOfSkillGroupOutcomeCallable CCCClient::listTrunksOfSkillGroupCallable(const ListTrunksOfSkillGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTrunksOfSkillGroupOutcome()>>(
[this, request]()
{
return this->listTrunksOfSkillGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListUnreachableContactsOutcome CCCClient::listUnreachableContacts(const ListUnreachableContactsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4083,6 +4299,42 @@ CCCClient::ModifyPhoneTagsOutcomeCallable CCCClient::modifyPhoneTagsCallable(con
return task->get_future();
}
CCCClient::ModifyPrimaryTrunksOfSkillGroupOutcome CCCClient::modifyPrimaryTrunksOfSkillGroup(const ModifyPrimaryTrunksOfSkillGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyPrimaryTrunksOfSkillGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyPrimaryTrunksOfSkillGroupOutcome(ModifyPrimaryTrunksOfSkillGroupResult(outcome.result()));
else
return ModifyPrimaryTrunksOfSkillGroupOutcome(outcome.error());
}
void CCCClient::modifyPrimaryTrunksOfSkillGroupAsync(const ModifyPrimaryTrunksOfSkillGroupRequest& request, const ModifyPrimaryTrunksOfSkillGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyPrimaryTrunksOfSkillGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ModifyPrimaryTrunksOfSkillGroupOutcomeCallable CCCClient::modifyPrimaryTrunksOfSkillGroupCallable(const ModifyPrimaryTrunksOfSkillGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyPrimaryTrunksOfSkillGroupOutcome()>>(
[this, request]()
{
return this->modifyPrimaryTrunksOfSkillGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ModifyPrivacyNumberCallDetailOutcome CCCClient::modifyPrivacyNumberCallDetail(const ModifyPrivacyNumberCallDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -61,14 +61,14 @@ void AddBulkPhoneNumbersResult::parse(const std::string &payload)
phoneNumbersObject.usage = valuePhoneNumbersPhoneNumber["Usage"].asString();
if(!valuePhoneNumbersPhoneNumber["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(valuePhoneNumbersPhoneNumber["Trunks"].asString());
auto allSkillGroupsNode = allPhoneNumbersNode["SkillGroups"]["SkillGroup"];
for (auto allPhoneNumbersNodeSkillGroupsSkillGroup : allSkillGroupsNode)
auto allSkillGroupsNode = valuePhoneNumbersPhoneNumber["SkillGroups"]["SkillGroup"];
for (auto valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup : allSkillGroupsNode)
{
PhoneNumber::SkillGroup skillGroupsObject;
if(!allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupId"].isNull())
skillGroupsObject.skillGroupId = allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupId"].asString();
if(!allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupName"].isNull())
skillGroupsObject.skillGroupName = allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupName"].asString();
if(!valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupId"].isNull())
skillGroupsObject.skillGroupId = valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupId"].asString();
if(!valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupName"].isNull())
skillGroupsObject.skillGroupName = valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupName"].asString();
phoneNumbersObject.skillGroups.push_back(skillGroupsObject);
}
auto contactFlowNode = value["ContactFlow"];

View File

@@ -117,6 +117,17 @@ void AddPhoneTagsRequest::setServiceTag(const std::string& serviceTag)
setParameter("ServiceTag", serviceTag);
}
std::string AddPhoneTagsRequest::getSipTag()const
{
return sipTag_;
}
void AddPhoneTagsRequest::setSipTag(const std::string& sipTag)
{
sipTag_ = sipTag;
setParameter("SipTag", sipTag);
}
std::string AddPhoneTagsRequest::getRegionNameCity()const
{
return regionNameCity_;

View File

@@ -66,14 +66,14 @@ void CreateScenarioFromTemplateResult::parse(const std::string &payload)
surveyObject.round = std::stoi(scenarioNodeSurveysSurvey["Round"].asString());
if(!scenarioNodeSurveysSurvey["BeebotId"].isNull())
surveyObject.beebotId = scenarioNodeSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
auto allIntentsNode = scenarioNodeSurveysSurvey["Intents"]["IntentNode"];
for (auto scenarioNodeSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);

View File

@@ -66,14 +66,14 @@ void CreateScenarioResult::parse(const std::string &payload)
surveyObject.round = std::stoi(scenarioNodeSurveysSurvey["Round"].asString());
if(!scenarioNodeSurveysSurvey["BeebotId"].isNull())
surveyObject.beebotId = scenarioNodeSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
auto allIntentsNode = scenarioNodeSurveysSurvey["Intents"]["IntentNode"];
for (auto scenarioNodeSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);

View File

@@ -0,0 +1,53 @@
/*
* 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/DisableTrunkProvidersRequest.h>
using AlibabaCloud::CCC::Model::DisableTrunkProvidersRequest;
DisableTrunkProvidersRequest::DisableTrunkProvidersRequest() :
RpcServiceRequest("ccc", "2017-07-05", "DisableTrunkProviders")
{
setMethod(HttpRequest::Method::Post);
}
DisableTrunkProvidersRequest::~DisableTrunkProvidersRequest()
{}
std::vector<std::string> DisableTrunkProvidersRequest::getProviderName()const
{
return providerName_;
}
void DisableTrunkProvidersRequest::setProviderName(const std::vector<std::string>& providerName)
{
providerName_ = providerName;
for(int dep1 = 0; dep1!= providerName.size(); dep1++) {
setParameter("ProviderName."+ std::to_string(dep1), providerName.at(dep1));
}
}
std::string DisableTrunkProvidersRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DisableTrunkProvidersRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

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

View File

@@ -58,28 +58,28 @@ void FindUsersResult::parse(const std::string &payload)
userObject.instanceId = usersNodeListUser["InstanceId"].asString();
if(!usersNodeListUser["PrivateOutboundNumberId"].isNull())
userObject.privateOutboundNumberId = usersNodeListUser["PrivateOutboundNumberId"].asString();
auto allRolesNode = allListNode["Roles"]["Role"];
for (auto allListNodeRolesRole : allRolesNode)
auto allRolesNode = usersNodeListUser["Roles"]["Role"];
for (auto usersNodeListUserRolesRole : allRolesNode)
{
Users::User::Role rolesObject;
if(!allListNodeRolesRole["RoleId"].isNull())
rolesObject.roleId = allListNodeRolesRole["RoleId"].asString();
if(!allListNodeRolesRole["InstanceId"].isNull())
rolesObject.instanceId = allListNodeRolesRole["InstanceId"].asString();
if(!allListNodeRolesRole["RoleName"].isNull())
rolesObject.roleName = allListNodeRolesRole["RoleName"].asString();
if(!allListNodeRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = allListNodeRolesRole["RoleDescription"].asString();
if(!usersNodeListUserRolesRole["RoleId"].isNull())
rolesObject.roleId = usersNodeListUserRolesRole["RoleId"].asString();
if(!usersNodeListUserRolesRole["InstanceId"].isNull())
rolesObject.instanceId = usersNodeListUserRolesRole["InstanceId"].asString();
if(!usersNodeListUserRolesRole["RoleName"].isNull())
rolesObject.roleName = usersNodeListUserRolesRole["RoleName"].asString();
if(!usersNodeListUserRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = usersNodeListUserRolesRole["RoleDescription"].asString();
userObject.roles.push_back(rolesObject);
}
auto allSkillLevelsNode = allListNode["SkillLevels"]["SkillLevel"];
for (auto allListNodeSkillLevelsSkillLevel : allSkillLevelsNode)
auto allSkillLevelsNode = usersNodeListUser["SkillLevels"]["SkillLevel"];
for (auto usersNodeListUserSkillLevelsSkillLevel : allSkillLevelsNode)
{
Users::User::SkillLevel skillLevelsObject;
if(!allListNodeSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = allListNodeSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!allListNodeSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(allListNodeSkillLevelsSkillLevel["Level"].asString());
if(!usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!usersNodeListUserSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(usersNodeListUserSkillLevelsSkillLevel["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelsObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();

View File

@@ -49,16 +49,16 @@ void GetConversationListResult::parse(const std::string &payload)
conversationsObject.speaker = valueConversationsConversationDetail["Speaker"].asString();
if(!valueConversationsConversationDetail["Script"].isNull())
conversationsObject.script = valueConversationsConversationDetail["Script"].asString();
auto allSummaryNode = allConversationsNode["Summary"]["SummaryItem"];
for (auto allConversationsNodeSummarySummaryItem : allSummaryNode)
auto allSummaryNode = valueConversationsConversationDetail["Summary"]["SummaryItem"];
for (auto valueConversationsConversationDetailSummarySummaryItem : allSummaryNode)
{
ConversationDetail::SummaryItem summaryObject;
if(!allConversationsNodeSummarySummaryItem["Category"].isNull())
summaryObject.category = allConversationsNodeSummarySummaryItem["Category"].asString();
if(!allConversationsNodeSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = allConversationsNodeSummarySummaryItem["SummaryName"].asString();
if(!allConversationsNodeSummarySummaryItem["Content"].isNull())
summaryObject.content = allConversationsNodeSummarySummaryItem["Content"].asString();
if(!valueConversationsConversationDetailSummarySummaryItem["Category"].isNull())
summaryObject.category = valueConversationsConversationDetailSummarySummaryItem["Category"].asString();
if(!valueConversationsConversationDetailSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = valueConversationsConversationDetailSummarySummaryItem["SummaryName"].asString();
if(!valueConversationsConversationDetailSummarySummaryItem["Content"].isNull())
summaryObject.content = valueConversationsConversationDetailSummarySummaryItem["Content"].asString();
conversationsObject.summary.push_back(summaryObject);
}
conversations_.push_back(conversationsObject);

View File

@@ -68,58 +68,58 @@ void GetJobListResult::parse(const std::string &payload)
jobObject.referenceId = jobsNodeListJob["ReferenceId"].asString();
if(!jobsNodeListJob["FailureReason"].isNull())
jobObject.failureReason = jobsNodeListJob["FailureReason"].asString();
auto allContactsNode = allListNode["Contacts"]["Contact"];
for (auto allListNodeContactsContact : allContactsNode)
auto allContactsNode = jobsNodeListJob["Contacts"]["Contact"];
for (auto jobsNodeListJobContactsContact : allContactsNode)
{
Jobs::Job::Contact contactsObject;
if(!allListNodeContactsContact["ContactId"].isNull())
contactsObject.contactId = allListNodeContactsContact["ContactId"].asString();
if(!allListNodeContactsContact["ContactName"].isNull())
contactsObject.contactName = allListNodeContactsContact["ContactName"].asString();
if(!allListNodeContactsContact["Honorific"].isNull())
contactsObject.honorific = allListNodeContactsContact["Honorific"].asString();
if(!allListNodeContactsContact["Role"].isNull())
contactsObject.role = allListNodeContactsContact["Role"].asString();
if(!allListNodeContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = allListNodeContactsContact["PhoneNumber"].asString();
if(!allListNodeContactsContact["State"].isNull())
contactsObject.state = allListNodeContactsContact["State"].asString();
if(!allListNodeContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = allListNodeContactsContact["ReferenceId"].asString();
if(!allListNodeContactsContact["JobId"].isNull())
contactsObject.jobId = allListNodeContactsContact["JobId"].asString();
if(!jobsNodeListJobContactsContact["ContactId"].isNull())
contactsObject.contactId = jobsNodeListJobContactsContact["ContactId"].asString();
if(!jobsNodeListJobContactsContact["ContactName"].isNull())
contactsObject.contactName = jobsNodeListJobContactsContact["ContactName"].asString();
if(!jobsNodeListJobContactsContact["Honorific"].isNull())
contactsObject.honorific = jobsNodeListJobContactsContact["Honorific"].asString();
if(!jobsNodeListJobContactsContact["Role"].isNull())
contactsObject.role = jobsNodeListJobContactsContact["Role"].asString();
if(!jobsNodeListJobContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = jobsNodeListJobContactsContact["PhoneNumber"].asString();
if(!jobsNodeListJobContactsContact["State"].isNull())
contactsObject.state = jobsNodeListJobContactsContact["State"].asString();
if(!jobsNodeListJobContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = jobsNodeListJobContactsContact["ReferenceId"].asString();
if(!jobsNodeListJobContactsContact["JobId"].isNull())
contactsObject.jobId = jobsNodeListJobContactsContact["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtrasNode = allListNode["Extras"]["KeyValuePair"];
for (auto allListNodeExtrasKeyValuePair : allExtrasNode)
auto allExtrasNode = jobsNodeListJob["Extras"]["KeyValuePair"];
for (auto jobsNodeListJobExtrasKeyValuePair : allExtrasNode)
{
Jobs::Job::KeyValuePair extrasObject;
if(!allListNodeExtrasKeyValuePair["Key"].isNull())
extrasObject.key = allListNodeExtrasKeyValuePair["Key"].asString();
if(!allListNodeExtrasKeyValuePair["Value"].isNull())
extrasObject.value = allListNodeExtrasKeyValuePair["Value"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Key"].isNull())
extrasObject.key = jobsNodeListJobExtrasKeyValuePair["Key"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Value"].isNull())
extrasObject.value = jobsNodeListJobExtrasKeyValuePair["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allSummaryNode = allListNode["Summary"]["SummaryItem"];
for (auto allListNodeSummarySummaryItem : allSummaryNode)
auto allSummaryNode = jobsNodeListJob["Summary"]["SummaryItem"];
for (auto jobsNodeListJobSummarySummaryItem : allSummaryNode)
{
Jobs::Job::SummaryItem summaryObject;
if(!allListNodeSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = allListNodeSummarySummaryItem["SummaryId"].asString();
if(!allListNodeSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = allListNodeSummarySummaryItem["GroupId"].asString();
if(!allListNodeSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = allListNodeSummarySummaryItem["JobId"].asString();
if(!allListNodeSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = allListNodeSummarySummaryItem["TaskId"].asString();
if(!allListNodeSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = allListNodeSummarySummaryItem["ConversationDetailId"].asString();
if(!allListNodeSummarySummaryItem["Category"].isNull())
summaryObject.category = allListNodeSummarySummaryItem["Category"].asString();
if(!allListNodeSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = allListNodeSummarySummaryItem["SummaryName"].asString();
if(!allListNodeSummarySummaryItem["Content"].isNull())
summaryObject.content = allListNodeSummarySummaryItem["Content"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = jobsNodeListJobSummarySummaryItem["SummaryId"].asString();
if(!jobsNodeListJobSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = jobsNodeListJobSummarySummaryItem["GroupId"].asString();
if(!jobsNodeListJobSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = jobsNodeListJobSummarySummaryItem["JobId"].asString();
if(!jobsNodeListJobSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = jobsNodeListJobSummarySummaryItem["TaskId"].asString();
if(!jobsNodeListJobSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = jobsNodeListJobSummarySummaryItem["ConversationDetailId"].asString();
if(!jobsNodeListJobSummarySummaryItem["Category"].isNull())
summaryObject.category = jobsNodeListJobSummarySummaryItem["Category"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = jobsNodeListJobSummarySummaryItem["SummaryName"].asString();
if(!jobsNodeListJobSummarySummaryItem["Content"].isNull())
summaryObject.content = jobsNodeListJobSummarySummaryItem["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];

View File

@@ -116,26 +116,26 @@ void GetJobResult::parse(const std::string &payload)
taskObject.brief = jobNodeTasksTask["Brief"].asString();
if(!jobNodeTasksTask["Duration"].isNull())
taskObject.duration = std::stoi(jobNodeTasksTask["Duration"].asString());
auto allConversationNode = allTasksNode["Conversation"]["ConversationDetail"];
for (auto allTasksNodeConversationConversationDetail : allConversationNode)
auto allConversationNode = jobNodeTasksTask["Conversation"]["ConversationDetail"];
for (auto jobNodeTasksTaskConversationConversationDetail : allConversationNode)
{
Job::Task::ConversationDetail conversationObject;
if(!allTasksNodeConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(allTasksNodeConversationConversationDetail["Timestamp"].asString());
if(!allTasksNodeConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = allTasksNodeConversationConversationDetail["Speaker"].asString();
if(!allTasksNodeConversationConversationDetail["Script"].isNull())
conversationObject.script = allTasksNodeConversationConversationDetail["Script"].asString();
auto allSummary1Node = allConversationNode["Summary"]["SummaryItem"];
for (auto allConversationNodeSummarySummaryItem : allSummary1Node)
if(!jobNodeTasksTaskConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(jobNodeTasksTaskConversationConversationDetail["Timestamp"].asString());
if(!jobNodeTasksTaskConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = jobNodeTasksTaskConversationConversationDetail["Speaker"].asString();
if(!jobNodeTasksTaskConversationConversationDetail["Script"].isNull())
conversationObject.script = jobNodeTasksTaskConversationConversationDetail["Script"].asString();
auto allSummary1Node = jobNodeTasksTaskConversationConversationDetail["Summary"]["SummaryItem"];
for (auto jobNodeTasksTaskConversationConversationDetailSummarySummaryItem : allSummary1Node)
{
Job::Task::ConversationDetail::SummaryItem summary1Object;
if(!allConversationNodeSummarySummaryItem["Category"].isNull())
summary1Object.category = allConversationNodeSummarySummaryItem["Category"].asString();
if(!allConversationNodeSummarySummaryItem["SummaryName"].isNull())
summary1Object.summaryName = allConversationNodeSummarySummaryItem["SummaryName"].asString();
if(!allConversationNodeSummarySummaryItem["Content"].isNull())
summary1Object.content = allConversationNodeSummarySummaryItem["Content"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Category"].isNull())
summary1Object.category = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Category"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].isNull())
summary1Object.summaryName = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Content"].isNull())
summary1Object.content = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Content"].asString();
conversationObject.summary1.push_back(summary1Object);
}
taskObject.conversation.push_back(conversationObject);

View File

@@ -118,32 +118,32 @@ void GetJobStatusByCallIdResult::parse(const std::string &payload)
taskObject.brief = jobNodeTasksTask["Brief"].asString();
if(!jobNodeTasksTask["Duration"].isNull())
taskObject.duration = std::stoi(jobNodeTasksTask["Duration"].asString());
auto allConversationNode = allTasksNode["Conversation"]["ConversationDetail"];
for (auto allTasksNodeConversationConversationDetail : allConversationNode)
auto allConversationNode = jobNodeTasksTask["Conversation"]["ConversationDetail"];
for (auto jobNodeTasksTaskConversationConversationDetail : allConversationNode)
{
Job::Task::ConversationDetail conversationObject;
if(!allTasksNodeConversationConversationDetail["ConversationDetailId"].isNull())
conversationObject.conversationDetailId = allTasksNodeConversationConversationDetail["ConversationDetailId"].asString();
if(!allTasksNodeConversationConversationDetail["TaskId"].isNull())
conversationObject.taskId = allTasksNodeConversationConversationDetail["TaskId"].asString();
if(!allTasksNodeConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(allTasksNodeConversationConversationDetail["Timestamp"].asString());
if(!allTasksNodeConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = allTasksNodeConversationConversationDetail["Speaker"].asString();
if(!allTasksNodeConversationConversationDetail["Script"].isNull())
conversationObject.script = allTasksNodeConversationConversationDetail["Script"].asString();
auto allSummary1Node = allConversationNode["Summary"]["SummaryItem"];
for (auto allConversationNodeSummarySummaryItem : allSummary1Node)
if(!jobNodeTasksTaskConversationConversationDetail["ConversationDetailId"].isNull())
conversationObject.conversationDetailId = jobNodeTasksTaskConversationConversationDetail["ConversationDetailId"].asString();
if(!jobNodeTasksTaskConversationConversationDetail["TaskId"].isNull())
conversationObject.taskId = jobNodeTasksTaskConversationConversationDetail["TaskId"].asString();
if(!jobNodeTasksTaskConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(jobNodeTasksTaskConversationConversationDetail["Timestamp"].asString());
if(!jobNodeTasksTaskConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = jobNodeTasksTaskConversationConversationDetail["Speaker"].asString();
if(!jobNodeTasksTaskConversationConversationDetail["Script"].isNull())
conversationObject.script = jobNodeTasksTaskConversationConversationDetail["Script"].asString();
auto allSummary1Node = jobNodeTasksTaskConversationConversationDetail["Summary"]["SummaryItem"];
for (auto jobNodeTasksTaskConversationConversationDetailSummarySummaryItem : allSummary1Node)
{
Job::Task::ConversationDetail::SummaryItem summary1Object;
if(!allConversationNodeSummarySummaryItem["SummaryId"].isNull())
summary1Object.summaryId = allConversationNodeSummarySummaryItem["SummaryId"].asString();
if(!allConversationNodeSummarySummaryItem["Category"].isNull())
summary1Object.category = allConversationNodeSummarySummaryItem["Category"].asString();
if(!allConversationNodeSummarySummaryItem["SummaryName"].isNull())
summary1Object.summaryName = allConversationNodeSummarySummaryItem["SummaryName"].asString();
if(!allConversationNodeSummarySummaryItem["Content"].isNull())
summary1Object.content = allConversationNodeSummarySummaryItem["Content"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryId"].isNull())
summary1Object.summaryId = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryId"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Category"].isNull())
summary1Object.category = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Category"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].isNull())
summary1Object.summaryName = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].asString();
if(!jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Content"].isNull())
summary1Object.content = jobNodeTasksTaskConversationConversationDetailSummarySummaryItem["Content"].asString();
conversationObject.summary1.push_back(summary1Object);
}
taskObject.conversation.push_back(conversationObject);

View File

@@ -66,14 +66,14 @@ void GetScenarioResult::parse(const std::string &payload)
surveyObject.round = std::stoi(scenarioNodeSurveysSurvey["Round"].asString());
if(!scenarioNodeSurveysSurvey["BeebotId"].isNull())
surveyObject.beebotId = scenarioNodeSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
auto allIntentsNode = scenarioNodeSurveysSurvey["Intents"]["IntentNode"];
for (auto scenarioNodeSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);

View File

@@ -67,26 +67,26 @@ void GetTaskListResult::parse(const std::string &payload)
tasksObject.brief = valueTasksTask["Brief"].asString();
if(!valueTasksTask["Duration"].isNull())
tasksObject.duration = std::stoi(valueTasksTask["Duration"].asString());
auto allConversationNode = allTasksNode["Conversation"]["ConversationDetail"];
for (auto allTasksNodeConversationConversationDetail : allConversationNode)
auto allConversationNode = valueTasksTask["Conversation"]["ConversationDetail"];
for (auto valueTasksTaskConversationConversationDetail : allConversationNode)
{
Task::ConversationDetail conversationObject;
if(!allTasksNodeConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(allTasksNodeConversationConversationDetail["Timestamp"].asString());
if(!allTasksNodeConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = allTasksNodeConversationConversationDetail["Speaker"].asString();
if(!allTasksNodeConversationConversationDetail["Script"].isNull())
conversationObject.script = allTasksNodeConversationConversationDetail["Script"].asString();
auto allSummaryNode = allConversationNode["Summary"]["SummaryItem"];
for (auto allConversationNodeSummarySummaryItem : allSummaryNode)
if(!valueTasksTaskConversationConversationDetail["Timestamp"].isNull())
conversationObject.timestamp = std::stol(valueTasksTaskConversationConversationDetail["Timestamp"].asString());
if(!valueTasksTaskConversationConversationDetail["Speaker"].isNull())
conversationObject.speaker = valueTasksTaskConversationConversationDetail["Speaker"].asString();
if(!valueTasksTaskConversationConversationDetail["Script"].isNull())
conversationObject.script = valueTasksTaskConversationConversationDetail["Script"].asString();
auto allSummaryNode = valueTasksTaskConversationConversationDetail["Summary"]["SummaryItem"];
for (auto valueTasksTaskConversationConversationDetailSummarySummaryItem : allSummaryNode)
{
Task::ConversationDetail::SummaryItem summaryObject;
if(!allConversationNodeSummarySummaryItem["Category"].isNull())
summaryObject.category = allConversationNodeSummarySummaryItem["Category"].asString();
if(!allConversationNodeSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = allConversationNodeSummarySummaryItem["SummaryName"].asString();
if(!allConversationNodeSummarySummaryItem["Content"].isNull())
summaryObject.content = allConversationNodeSummarySummaryItem["Content"].asString();
if(!valueTasksTaskConversationConversationDetailSummarySummaryItem["Category"].isNull())
summaryObject.category = valueTasksTaskConversationConversationDetailSummarySummaryItem["Category"].asString();
if(!valueTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = valueTasksTaskConversationConversationDetailSummarySummaryItem["SummaryName"].asString();
if(!valueTasksTaskConversationConversationDetailSummarySummaryItem["Content"].isNull())
summaryObject.content = valueTasksTaskConversationConversationDetailSummarySummaryItem["Content"].asString();
conversationObject.summary.push_back(summaryObject);
}
tasksObject.conversation.push_back(conversationObject);

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/GetUserByExtensionRequest.h>
using AlibabaCloud::CCC::Model::GetUserByExtensionRequest;
GetUserByExtensionRequest::GetUserByExtensionRequest() :
RpcServiceRequest("ccc", "2017-07-05", "GetUserByExtension")
{
setMethod(HttpRequest::Method::Post);
}
GetUserByExtensionRequest::~GetUserByExtensionRequest()
{}
std::string GetUserByExtensionRequest::getExtension()const
{
return extension_;
}
void GetUserByExtensionRequest::setExtension(const std::string& extension)
{
extension_ = extension;
setParameter("Extension", extension);
}
std::string GetUserByExtensionRequest::getInstanceId()const
{
return instanceId_;
}
void GetUserByExtensionRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,130 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/GetUserByExtensionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetUserByExtensionResult::GetUserByExtensionResult() :
ServiceResult()
{}
GetUserByExtensionResult::GetUserByExtensionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetUserByExtensionResult::~GetUserByExtensionResult()
{}
void GetUserByExtensionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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 allRolesNode = userNode["Roles"]["Role"];
for (auto userNodeRolesRole : allRolesNode)
{
User::Role roleObject;
if(!userNodeRolesRole["RoleId"].isNull())
roleObject.roleId = userNodeRolesRole["RoleId"].asString();
if(!userNodeRolesRole["InstanceId"].isNull())
roleObject.instanceId = userNodeRolesRole["InstanceId"].asString();
if(!userNodeRolesRole["RoleName"].isNull())
roleObject.roleName = userNodeRolesRole["RoleName"].asString();
if(!userNodeRolesRole["RoleDescription"].isNull())
roleObject.roleDescription = userNodeRolesRole["RoleDescription"].asString();
user_.roles.push_back(roleObject);
}
auto allSkillLevelsNode = userNode["SkillLevels"]["SkillLevel"];
for (auto userNodeSkillLevelsSkillLevel : allSkillLevelsNode)
{
User::SkillLevel skillLevelObject;
if(!userNodeSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelObject.skillLevelId = userNodeSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!userNodeSkillLevelsSkillLevel["Level"].isNull())
skillLevelObject.level = std::stoi(userNodeSkillLevelsSkillLevel["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(!detailNode["Extension"].isNull())
user_.detail.extension = detailNode["Extension"].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());
}
GetUserByExtensionResult::User GetUserByExtensionResult::getUser()const
{
return user_;
}
std::string GetUserByExtensionResult::getMessage()const
{
return message_;
}
int GetUserByExtensionResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string GetUserByExtensionResult::getCode()const
{
return code_;
}
bool GetUserByExtensionResult::getSuccess()const
{
return success_;
}

View File

@@ -53,14 +53,14 @@ void ListAgentEventsResult::parse(const std::string &payload)
agentEventListObject.event = valueAgentEventListAgentEvent["Event"].asString();
if(!valueAgentEventListAgentEvent["EventTime"].isNull())
agentEventListObject.eventTime = std::stol(valueAgentEventListAgentEvent["EventTime"].asString());
auto allSkillGroupIdsNode = allAgentEventListNode["SkillGroupIds"]["SkillGroup"];
for (auto allAgentEventListNodeSkillGroupIdsSkillGroup : allSkillGroupIdsNode)
auto allSkillGroupIdsNode = valueAgentEventListAgentEvent["SkillGroupIds"]["SkillGroup"];
for (auto valueAgentEventListAgentEventSkillGroupIdsSkillGroup : allSkillGroupIdsNode)
{
AgentEvent::SkillGroup skillGroupIdsObject;
if(!allAgentEventListNodeSkillGroupIdsSkillGroup["SkillGroupId"].isNull())
skillGroupIdsObject.skillGroupId = allAgentEventListNodeSkillGroupIdsSkillGroup["SkillGroupId"].asString();
if(!allAgentEventListNodeSkillGroupIdsSkillGroup["SkillGroupName"].isNull())
skillGroupIdsObject.skillGroupName = allAgentEventListNodeSkillGroupIdsSkillGroup["SkillGroupName"].asString();
if(!valueAgentEventListAgentEventSkillGroupIdsSkillGroup["SkillGroupId"].isNull())
skillGroupIdsObject.skillGroupId = valueAgentEventListAgentEventSkillGroupIdsSkillGroup["SkillGroupId"].asString();
if(!valueAgentEventListAgentEventSkillGroupIdsSkillGroup["SkillGroupName"].isNull())
skillGroupIdsObject.skillGroupName = valueAgentEventListAgentEventSkillGroupIdsSkillGroup["SkillGroupName"].asString();
agentEventListObject.skillGroupIds.push_back(skillGroupIdsObject);
}
agentEventList_.push_back(agentEventListObject);

View File

@@ -0,0 +1,106 @@
/*
* 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/ListAgentStateLogsRequest.h>
using AlibabaCloud::CCC::Model::ListAgentStateLogsRequest;
ListAgentStateLogsRequest::ListAgentStateLogsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListAgentStateLogs")
{
setMethod(HttpRequest::Method::Post);
}
ListAgentStateLogsRequest::~ListAgentStateLogsRequest()
{}
long ListAgentStateLogsRequest::getEndTime()const
{
return endTime_;
}
void ListAgentStateLogsRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setParameter("EndTime", std::to_string(endTime));
}
long ListAgentStateLogsRequest::getStartTime()const
{
return startTime_;
}
void ListAgentStateLogsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setParameter("StartTime", std::to_string(startTime));
}
long ListAgentStateLogsRequest::getRamId()const
{
return ramId_;
}
void ListAgentStateLogsRequest::setRamId(long ramId)
{
ramId_ = ramId;
setParameter("RamId", std::to_string(ramId));
}
int ListAgentStateLogsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListAgentStateLogsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string ListAgentStateLogsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListAgentStateLogsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ListAgentStateLogsRequest::getInstanceId()const
{
return instanceId_;
}
void ListAgentStateLogsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
int ListAgentStateLogsRequest::getPageSize()const
{
return pageSize_;
}
void ListAgentStateLogsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,108 @@
/*
* 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/ListAgentStateLogsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListAgentStateLogsResult::ListAgentStateLogsResult() :
ServiceResult()
{}
ListAgentStateLogsResult::ListAgentStateLogsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAgentStateLogsResult::~ListAgentStateLogsResult()
{}
void ListAgentStateLogsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto agentStateLogPageNode = value["AgentStateLogPage"];
if(!agentStateLogPageNode["TotalCount"].isNull())
agentStateLogPage_.totalCount = std::stoi(agentStateLogPageNode["TotalCount"].asString());
if(!agentStateLogPageNode["PageNumber"].isNull())
agentStateLogPage_.pageNumber = std::stoi(agentStateLogPageNode["PageNumber"].asString());
if(!agentStateLogPageNode["PageSize"].isNull())
agentStateLogPage_.pageSize = std::stoi(agentStateLogPageNode["PageSize"].asString());
auto allListNode = agentStateLogPageNode["List"]["AgentStateLog"];
for (auto agentStateLogPageNodeListAgentStateLog : allListNode)
{
AgentStateLogPage::AgentStateLog agentStateLogObject;
if(!agentStateLogPageNodeListAgentStateLog["InstanceId"].isNull())
agentStateLogObject.instanceId = agentStateLogPageNodeListAgentStateLog["InstanceId"].asString();
if(!agentStateLogPageNodeListAgentStateLog["RamId"].isNull())
agentStateLogObject.ramId = std::stol(agentStateLogPageNodeListAgentStateLog["RamId"].asString());
if(!agentStateLogPageNodeListAgentStateLog["State"].isNull())
agentStateLogObject.state = agentStateLogPageNodeListAgentStateLog["State"].asString();
if(!agentStateLogPageNodeListAgentStateLog["StateCode"].isNull())
agentStateLogObject.stateCode = agentStateLogPageNodeListAgentStateLog["StateCode"].asString();
if(!agentStateLogPageNodeListAgentStateLog["StateTime"].isNull())
agentStateLogObject.stateTime = std::stol(agentStateLogPageNodeListAgentStateLog["StateTime"].asString());
if(!agentStateLogPageNodeListAgentStateLog["ContactId"].isNull())
agentStateLogObject.contactId = agentStateLogPageNodeListAgentStateLog["ContactId"].asString();
if(!agentStateLogPageNodeListAgentStateLog["ConnectId"].isNull())
agentStateLogObject.connectId = agentStateLogPageNodeListAgentStateLog["ConnectId"].asString();
if(!agentStateLogPageNodeListAgentStateLog["SkillGroupIds"].isNull())
agentStateLogObject.skillGroupIds = agentStateLogPageNodeListAgentStateLog["SkillGroupIds"].asString();
if(!agentStateLogPageNodeListAgentStateLog["CounterParty"].isNull())
agentStateLogObject.counterParty = agentStateLogPageNodeListAgentStateLog["CounterParty"].asString();
agentStateLogPage_.list.push_back(agentStateLogObject);
}
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 ListAgentStateLogsResult::getMessage()const
{
return message_;
}
int ListAgentStateLogsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListAgentStateLogsResult::getCode()const
{
return code_;
}
ListAgentStateLogsResult::AgentStateLogPage ListAgentStateLogsResult::getAgentStateLogPage()const
{
return agentStateLogPage_;
}
bool ListAgentStateLogsResult::getSuccess()const
{
return success_;
}

View File

@@ -52,24 +52,24 @@ void ListAgentSummaryReportsByIntervalResult::parse(const std::string &payload)
PagedAgentSummaryReport::AgentTimeIntervalReport agentTimeIntervalReportObject;
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReport["AgentId"].isNull())
agentTimeIntervalReportObject.agentId = pagedAgentSummaryReportNodeListAgentTimeIntervalReport["AgentId"].asString();
auto allIntervalListNode = allListNode["IntervalList"]["AgentSummaryReport"];
for (auto allListNodeIntervalListAgentSummaryReport : allIntervalListNode)
auto allIntervalListNode = pagedAgentSummaryReportNodeListAgentTimeIntervalReport["IntervalList"]["AgentSummaryReport"];
for (auto pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport : allIntervalListNode)
{
PagedAgentSummaryReport::AgentTimeIntervalReport::AgentSummaryReport intervalListObject;
if(!allListNodeIntervalListAgentSummaryReport["Timestamp"].isNull())
intervalListObject.timestamp = allListNodeIntervalListAgentSummaryReport["Timestamp"].asString();
if(!allListNodeIntervalListAgentSummaryReport["InstanceId"].isNull())
intervalListObject.instanceId = allListNodeIntervalListAgentSummaryReport["InstanceId"].asString();
if(!allListNodeIntervalListAgentSummaryReport["AgentId"].isNull())
intervalListObject.agentId = allListNodeIntervalListAgentSummaryReport["AgentId"].asString();
if(!allListNodeIntervalListAgentSummaryReport["LoginName"].isNull())
intervalListObject.loginName = allListNodeIntervalListAgentSummaryReport["LoginName"].asString();
if(!allListNodeIntervalListAgentSummaryReport["AgentName"].isNull())
intervalListObject.agentName = allListNodeIntervalListAgentSummaryReport["AgentName"].asString();
if(!allListNodeIntervalListAgentSummaryReport["SkillGroupIds"].isNull())
intervalListObject.skillGroupIds = allListNodeIntervalListAgentSummaryReport["SkillGroupIds"].asString();
if(!allListNodeIntervalListAgentSummaryReport["SkillGroupNames"].isNull())
intervalListObject.skillGroupNames = allListNodeIntervalListAgentSummaryReport["SkillGroupNames"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["Timestamp"].isNull())
intervalListObject.timestamp = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["Timestamp"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["InstanceId"].isNull())
intervalListObject.instanceId = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["InstanceId"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["AgentId"].isNull())
intervalListObject.agentId = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["AgentId"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["LoginName"].isNull())
intervalListObject.loginName = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["LoginName"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["AgentName"].isNull())
intervalListObject.agentName = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["AgentName"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["SkillGroupIds"].isNull())
intervalListObject.skillGroupIds = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["SkillGroupIds"].asString();
if(!pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["SkillGroupNames"].isNull())
intervalListObject.skillGroupNames = pagedAgentSummaryReportNodeListAgentTimeIntervalReportIntervalListAgentSummaryReport["SkillGroupNames"].asString();
auto overallNode = value["Overall"];
if(!overallNode["TotalCalls"].isNull())
intervalListObject.overall.totalCalls = std::stol(overallNode["TotalCalls"].asString());
@@ -105,6 +105,10 @@ void ListAgentSummaryReportsByIntervalResult::parse(const std::string &payload)
intervalListObject.overall.satisfactionSurveysResponded = std::stol(overallNode["SatisfactionSurveysResponded"].asString());
if(!overallNode["OneTransferCalls"].isNull())
intervalListObject.overall.oneTransferCalls = std::stol(overallNode["OneTransferCalls"].asString());
if(!overallNode["FirstLogInTime"].isNull())
intervalListObject.overall.firstLogInTime = overallNode["FirstLogInTime"].asString();
if(!overallNode["LastLogOutTime"].isNull())
intervalListObject.overall.lastLogOutTime = overallNode["LastLogOutTime"].asString();
auto inboundNode = value["Inbound"];
if(!inboundNode["CallsOffered"].isNull())
intervalListObject.inbound.callsOffered = std::stol(inboundNode["CallsOffered"].asString());

View File

@@ -97,6 +97,10 @@ void ListAgentSummaryReportsResult::parse(const std::string &payload)
agentSummaryReportObject.overall.satisfactionSurveysResponded = std::stol(overallNode["SatisfactionSurveysResponded"].asString());
if(!overallNode["OneTransferCalls"].isNull())
agentSummaryReportObject.overall.oneTransferCalls = std::stol(overallNode["OneTransferCalls"].asString());
if(!overallNode["FirstLogInTime"].isNull())
agentSummaryReportObject.overall.firstLogInTime = overallNode["FirstLogInTime"].asString();
if(!overallNode["LastLogOutTime"].isNull())
agentSummaryReportObject.overall.lastLogOutTime = overallNode["LastLogOutTime"].asString();
auto inboundNode = value["Inbound"];
if(!inboundNode["CallsOffered"].isNull())
agentSummaryReportObject.inbound.callsOffered = std::stol(inboundNode["CallsOffered"].asString());

View File

@@ -58,14 +58,14 @@ void ListBasicStatisticsReportSubItemsResult::parse(const std::string &payload)
basicStatisticsReportSubItemObject.count = std::stoi(subItemsNodeListBasicStatisticsReportSubItem["Count"].asString());
if(!subItemsNodeListBasicStatisticsReportSubItem["Percentage"].isNull())
basicStatisticsReportSubItemObject.percentage = std::stoi(subItemsNodeListBasicStatisticsReportSubItem["Percentage"].asString());
auto allRowNode = allListNode["Row"]["KeyValuePair"];
for (auto allListNodeRowKeyValuePair : allRowNode)
auto allRowNode = subItemsNodeListBasicStatisticsReportSubItem["Row"]["KeyValuePair"];
for (auto subItemsNodeListBasicStatisticsReportSubItemRowKeyValuePair : allRowNode)
{
SubItems::BasicStatisticsReportSubItem::KeyValuePair rowObject;
if(!allListNodeRowKeyValuePair["Key"].isNull())
rowObject.key = allListNodeRowKeyValuePair["Key"].asString();
if(!allListNodeRowKeyValuePair["Value"].isNull())
rowObject.value = allListNodeRowKeyValuePair["Value"].asString();
if(!subItemsNodeListBasicStatisticsReportSubItemRowKeyValuePair["Key"].isNull())
rowObject.key = subItemsNodeListBasicStatisticsReportSubItemRowKeyValuePair["Key"].asString();
if(!subItemsNodeListBasicStatisticsReportSubItemRowKeyValuePair["Value"].isNull())
rowObject.value = subItemsNodeListBasicStatisticsReportSubItemRowKeyValuePair["Value"].asString();
basicStatisticsReportSubItemObject.row.push_back(rowObject);
}
subItems_.list.push_back(basicStatisticsReportSubItemObject);

View File

@@ -78,40 +78,40 @@ void ListCallDetailRecordsResult::parse(const std::string &payload)
callDetailRecordObject.instanceId = callDetailRecordsNodeListCallDetailRecord["InstanceId"].asString();
if(!callDetailRecordsNodeListCallDetailRecord["SkillGroupIdList"].isNull())
callDetailRecordObject.skillGroupIdList = callDetailRecordsNodeListCallDetailRecord["SkillGroupIdList"].asString();
auto allAgentsNode = allListNode["Agents"]["CallDetailAgent"];
for (auto allListNodeAgentsCallDetailAgent : allAgentsNode)
auto allAgentsNode = callDetailRecordsNodeListCallDetailRecord["Agents"]["CallDetailAgent"];
for (auto callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent : allAgentsNode)
{
CallDetailRecords::CallDetailRecord::CallDetailAgent agentsObject;
if(!allListNodeAgentsCallDetailAgent["AgentId"].isNull())
agentsObject.agentId = allListNodeAgentsCallDetailAgent["AgentId"].asString();
if(!allListNodeAgentsCallDetailAgent["Satisfaction"].isNull())
agentsObject.satisfaction = allListNodeAgentsCallDetailAgent["Satisfaction"].asString();
if(!allListNodeAgentsCallDetailAgent["Feedback"].isNull())
agentsObject.feedback = allListNodeAgentsCallDetailAgent["Feedback"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentId"].isNull())
agentsObject.agentId = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Satisfaction"].isNull())
agentsObject.satisfaction = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Satisfaction"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Feedback"].isNull())
agentsObject.feedback = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Feedback"].asString();
callDetailRecordObject.agents.push_back(agentsObject);
}
auto allRecordingsNode = allListNode["Recordings"]["Recording"];
for (auto allListNodeRecordingsRecording : allRecordingsNode)
auto allRecordingsNode = callDetailRecordsNodeListCallDetailRecord["Recordings"]["Recording"];
for (auto callDetailRecordsNodeListCallDetailRecordRecordingsRecording : allRecordingsNode)
{
CallDetailRecords::CallDetailRecord::Recording recordingsObject;
if(!allListNodeRecordingsRecording["ContactId"].isNull())
recordingsObject.contactId = allListNodeRecordingsRecording["ContactId"].asString();
if(!allListNodeRecordingsRecording["AgentId"].isNull())
recordingsObject.agentId = allListNodeRecordingsRecording["AgentId"].asString();
if(!allListNodeRecordingsRecording["AgentName"].isNull())
recordingsObject.agentName = allListNodeRecordingsRecording["AgentName"].asString();
if(!allListNodeRecordingsRecording["StartTime"].isNull())
recordingsObject.startTime = std::stol(allListNodeRecordingsRecording["StartTime"].asString());
if(!allListNodeRecordingsRecording["Duration"].isNull())
recordingsObject.duration = std::stoi(allListNodeRecordingsRecording["Duration"].asString());
if(!allListNodeRecordingsRecording["FileName"].isNull())
recordingsObject.fileName = allListNodeRecordingsRecording["FileName"].asString();
if(!allListNodeRecordingsRecording["FileDescription"].isNull())
recordingsObject.fileDescription = allListNodeRecordingsRecording["FileDescription"].asString();
if(!allListNodeRecordingsRecording["QualityCheckTid"].isNull())
recordingsObject.qualityCheckTid = allListNodeRecordingsRecording["QualityCheckTid"].asString();
if(!allListNodeRecordingsRecording["QualityCheckTaskId"].isNull())
recordingsObject.qualityCheckTaskId = allListNodeRecordingsRecording["QualityCheckTaskId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactId"].isNull())
recordingsObject.contactId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentId"].isNull())
recordingsObject.agentId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentName"].isNull())
recordingsObject.agentName = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["StartTime"].isNull())
recordingsObject.startTime = std::stol(callDetailRecordsNodeListCallDetailRecordRecordingsRecording["StartTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Duration"].isNull())
recordingsObject.duration = std::stoi(callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Duration"].asString());
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileName"].isNull())
recordingsObject.fileName = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileDescription"].isNull())
recordingsObject.fileDescription = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileDescription"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["QualityCheckTid"].isNull())
recordingsObject.qualityCheckTid = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["QualityCheckTid"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["QualityCheckTaskId"].isNull())
recordingsObject.qualityCheckTaskId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["QualityCheckTaskId"].asString();
callDetailRecordObject.recordings.push_back(recordingsObject);
}
callDetailRecords_.list.push_back(callDetailRecordObject);

View File

@@ -55,48 +55,48 @@ void ListContactFlowsResult::parse(const std::string &payload)
contactFlowsObject.type = valueContactFlowsContactFlow["Type"].asString();
if(!valueContactFlowsContactFlow["AppliedVersion"].isNull())
contactFlowsObject.appliedVersion = valueContactFlowsContactFlow["AppliedVersion"].asString();
auto allVersionsNode = allContactFlowsNode["Versions"]["ContactFlowVersion"];
for (auto allContactFlowsNodeVersionsContactFlowVersion : allVersionsNode)
auto allVersionsNode = valueContactFlowsContactFlow["Versions"]["ContactFlowVersion"];
for (auto valueContactFlowsContactFlowVersionsContactFlowVersion : allVersionsNode)
{
ContactFlow::ContactFlowVersion versionsObject;
if(!allContactFlowsNodeVersionsContactFlowVersion["ContactFlowVersionId"].isNull())
versionsObject.contactFlowVersionId = allContactFlowsNodeVersionsContactFlowVersion["ContactFlowVersionId"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["Version"].isNull())
versionsObject.version = allContactFlowsNodeVersionsContactFlowVersion["Version"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["ContactFlowVersionDescription"].isNull())
versionsObject.contactFlowVersionDescription = allContactFlowsNodeVersionsContactFlowVersion["ContactFlowVersionDescription"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["LastModified"].isNull())
versionsObject.lastModified = allContactFlowsNodeVersionsContactFlowVersion["LastModified"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["LastModifiedBy"].isNull())
versionsObject.lastModifiedBy = allContactFlowsNodeVersionsContactFlowVersion["LastModifiedBy"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["LockedBy"].isNull())
versionsObject.lockedBy = allContactFlowsNodeVersionsContactFlowVersion["LockedBy"].asString();
if(!allContactFlowsNodeVersionsContactFlowVersion["Status"].isNull())
versionsObject.status = allContactFlowsNodeVersionsContactFlowVersion["Status"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["ContactFlowVersionId"].isNull())
versionsObject.contactFlowVersionId = valueContactFlowsContactFlowVersionsContactFlowVersion["ContactFlowVersionId"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["Version"].isNull())
versionsObject.version = valueContactFlowsContactFlowVersionsContactFlowVersion["Version"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["ContactFlowVersionDescription"].isNull())
versionsObject.contactFlowVersionDescription = valueContactFlowsContactFlowVersionsContactFlowVersion["ContactFlowVersionDescription"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["LastModified"].isNull())
versionsObject.lastModified = valueContactFlowsContactFlowVersionsContactFlowVersion["LastModified"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["LastModifiedBy"].isNull())
versionsObject.lastModifiedBy = valueContactFlowsContactFlowVersionsContactFlowVersion["LastModifiedBy"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["LockedBy"].isNull())
versionsObject.lockedBy = valueContactFlowsContactFlowVersionsContactFlowVersion["LockedBy"].asString();
if(!valueContactFlowsContactFlowVersionsContactFlowVersion["Status"].isNull())
versionsObject.status = valueContactFlowsContactFlowVersionsContactFlowVersion["Status"].asString();
contactFlowsObject.versions.push_back(versionsObject);
}
auto allPhoneNumbersNode = allContactFlowsNode["PhoneNumbers"]["PhoneNumber"];
for (auto allContactFlowsNodePhoneNumbersPhoneNumber : allPhoneNumbersNode)
auto allPhoneNumbersNode = valueContactFlowsContactFlow["PhoneNumbers"]["PhoneNumber"];
for (auto valueContactFlowsContactFlowPhoneNumbersPhoneNumber : allPhoneNumbersNode)
{
ContactFlow::PhoneNumber phoneNumbersObject;
if(!allContactFlowsNodePhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = allContactFlowsNodePhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!allContactFlowsNodePhoneNumbersPhoneNumber["InstanceId"].isNull())
phoneNumbersObject.instanceId = allContactFlowsNodePhoneNumbersPhoneNumber["InstanceId"].asString();
if(!allContactFlowsNodePhoneNumbersPhoneNumber["Number"].isNull())
phoneNumbersObject.number = allContactFlowsNodePhoneNumbersPhoneNumber["Number"].asString();
if(!allContactFlowsNodePhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = allContactFlowsNodePhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!allContactFlowsNodePhoneNumbersPhoneNumber["TestOnly"].isNull())
phoneNumbersObject.testOnly = allContactFlowsNodePhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!allContactFlowsNodePhoneNumbersPhoneNumber["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(allContactFlowsNodePhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!allContactFlowsNodePhoneNumbersPhoneNumber["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = allContactFlowsNodePhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!allContactFlowsNodePhoneNumbersPhoneNumber["Usage"].isNull())
phoneNumbersObject.usage = allContactFlowsNodePhoneNumbersPhoneNumber["Usage"].asString();
if(!allContactFlowsNodePhoneNumbersPhoneNumber["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(allContactFlowsNodePhoneNumbersPhoneNumber["Trunks"].asString());
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["InstanceId"].isNull())
phoneNumbersObject.instanceId = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["InstanceId"].asString();
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Number"].isNull())
phoneNumbersObject.number = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Number"].asString();
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["TestOnly"].isNull())
phoneNumbersObject.testOnly = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(valueContactFlowsContactFlowPhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Usage"].isNull())
phoneNumbersObject.usage = valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Usage"].asString();
if(!valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(valueContactFlowsContactFlowPhoneNumbersPhoneNumber["Trunks"].asString());
contactFlowsObject.phoneNumbers.push_back(phoneNumbersObject);
}
contactFlows_.push_back(contactFlowsObject);

View File

@@ -71,16 +71,16 @@ void ListInstancesOfUserResult::parse(const std::string &payload)
instancesObject.createdTime = std::stol(valueInstancesCallCenterInstance["CreatedTime"].asString());
if(!valueInstancesCallCenterInstance["Owner"].isNull())
instancesObject.owner = valueInstancesCallCenterInstance["Owner"].asString();
auto allAdminNode = allInstancesNode["Admin"]["User"];
for (auto allInstancesNodeAdminUser : allAdminNode)
auto allAdminNode = valueInstancesCallCenterInstance["Admin"]["User"];
for (auto valueInstancesCallCenterInstanceAdminUser : allAdminNode)
{
CallCenterInstance::User adminObject;
if(!allInstancesNodeAdminUser["UserId"].isNull())
adminObject.userId = allInstancesNodeAdminUser["UserId"].asString();
if(!allInstancesNodeAdminUser["RamId"].isNull())
adminObject.ramId = allInstancesNodeAdminUser["RamId"].asString();
if(!allInstancesNodeAdminUser["InstanceId"].isNull())
adminObject.instanceId = allInstancesNodeAdminUser["InstanceId"].asString();
if(!valueInstancesCallCenterInstanceAdminUser["UserId"].isNull())
adminObject.userId = valueInstancesCallCenterInstanceAdminUser["UserId"].asString();
if(!valueInstancesCallCenterInstanceAdminUser["RamId"].isNull())
adminObject.ramId = valueInstancesCallCenterInstanceAdminUser["RamId"].asString();
if(!valueInstancesCallCenterInstanceAdminUser["InstanceId"].isNull())
adminObject.instanceId = valueInstancesCallCenterInstanceAdminUser["InstanceId"].asString();
auto detailNode = value["Detail"];
if(!detailNode["LoginName"].isNull())
adminObject.detail.loginName = detailNode["LoginName"].asString();
@@ -94,28 +94,28 @@ void ListInstancesOfUserResult::parse(const std::string &payload)
adminObject.detail.department = detailNode["Department"].asString();
instancesObject.admin.push_back(adminObject);
}
auto allPhoneNumbersNode = allInstancesNode["PhoneNumbers"]["PhoneNumber"];
for (auto allInstancesNodePhoneNumbersPhoneNumber : allPhoneNumbersNode)
auto allPhoneNumbersNode = valueInstancesCallCenterInstance["PhoneNumbers"]["PhoneNumber"];
for (auto valueInstancesCallCenterInstancePhoneNumbersPhoneNumber : allPhoneNumbersNode)
{
CallCenterInstance::PhoneNumber phoneNumbersObject;
if(!allInstancesNodePhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = allInstancesNodePhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!allInstancesNodePhoneNumbersPhoneNumber["InstanceId"].isNull())
phoneNumbersObject.instanceId = allInstancesNodePhoneNumbersPhoneNumber["InstanceId"].asString();
if(!allInstancesNodePhoneNumbersPhoneNumber["Number"].isNull())
phoneNumbersObject.number = allInstancesNodePhoneNumbersPhoneNumber["Number"].asString();
if(!allInstancesNodePhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = allInstancesNodePhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!allInstancesNodePhoneNumbersPhoneNumber["TestOnly"].isNull())
phoneNumbersObject.testOnly = allInstancesNodePhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!allInstancesNodePhoneNumbersPhoneNumber["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(allInstancesNodePhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!allInstancesNodePhoneNumbersPhoneNumber["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = allInstancesNodePhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!allInstancesNodePhoneNumbersPhoneNumber["Usage"].isNull())
phoneNumbersObject.usage = allInstancesNodePhoneNumbersPhoneNumber["Usage"].asString();
if(!allInstancesNodePhoneNumbersPhoneNumber["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(allInstancesNodePhoneNumbersPhoneNumber["Trunks"].asString());
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
phoneNumbersObject.phoneNumberId = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["InstanceId"].isNull())
phoneNumbersObject.instanceId = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["InstanceId"].asString();
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Number"].isNull())
phoneNumbersObject.number = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Number"].asString();
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
phoneNumbersObject.phoneNumberDescription = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["TestOnly"].isNull())
phoneNumbersObject.testOnly = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["RemainingTime"].isNull())
phoneNumbersObject.remainingTime = std::stoi(valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["AllowOutbound"].isNull())
phoneNumbersObject.allowOutbound = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Usage"].isNull())
phoneNumbersObject.usage = valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Usage"].asString();
if(!valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Trunks"].isNull())
phoneNumbersObject.trunks = std::stoi(valueInstancesCallCenterInstancePhoneNumbersPhoneNumber["Trunks"].asString());
instancesObject.phoneNumbers.push_back(phoneNumbersObject);
}
instances_.push_back(instancesObject);

View File

@@ -66,66 +66,66 @@ void ListJobStatusResult::parse(const std::string &payload)
jobObject.referenceId = jobsNodeListJob["ReferenceId"].asString();
if(!jobsNodeListJob["FailureReason"].isNull())
jobObject.failureReason = jobsNodeListJob["FailureReason"].asString();
auto allContactsNode = allListNode["Contacts"]["Contact"];
for (auto allListNodeContactsContact : allContactsNode)
auto allContactsNode = jobsNodeListJob["Contacts"]["Contact"];
for (auto jobsNodeListJobContactsContact : allContactsNode)
{
Jobs::Job::Contact contactsObject;
if(!allListNodeContactsContact["ContactId"].isNull())
contactsObject.contactId = allListNodeContactsContact["ContactId"].asString();
if(!allListNodeContactsContact["ContactName"].isNull())
contactsObject.contactName = allListNodeContactsContact["ContactName"].asString();
if(!allListNodeContactsContact["Honorific"].isNull())
contactsObject.honorific = allListNodeContactsContact["Honorific"].asString();
if(!allListNodeContactsContact["Role"].isNull())
contactsObject.role = allListNodeContactsContact["Role"].asString();
if(!allListNodeContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = allListNodeContactsContact["PhoneNumber"].asString();
if(!allListNodeContactsContact["State"].isNull())
contactsObject.state = allListNodeContactsContact["State"].asString();
if(!allListNodeContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = allListNodeContactsContact["ReferenceId"].asString();
if(!allListNodeContactsContact["JobId"].isNull())
contactsObject.jobId = allListNodeContactsContact["JobId"].asString();
if(!jobsNodeListJobContactsContact["ContactId"].isNull())
contactsObject.contactId = jobsNodeListJobContactsContact["ContactId"].asString();
if(!jobsNodeListJobContactsContact["ContactName"].isNull())
contactsObject.contactName = jobsNodeListJobContactsContact["ContactName"].asString();
if(!jobsNodeListJobContactsContact["Honorific"].isNull())
contactsObject.honorific = jobsNodeListJobContactsContact["Honorific"].asString();
if(!jobsNodeListJobContactsContact["Role"].isNull())
contactsObject.role = jobsNodeListJobContactsContact["Role"].asString();
if(!jobsNodeListJobContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = jobsNodeListJobContactsContact["PhoneNumber"].asString();
if(!jobsNodeListJobContactsContact["State"].isNull())
contactsObject.state = jobsNodeListJobContactsContact["State"].asString();
if(!jobsNodeListJobContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = jobsNodeListJobContactsContact["ReferenceId"].asString();
if(!jobsNodeListJobContactsContact["JobId"].isNull())
contactsObject.jobId = jobsNodeListJobContactsContact["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtrasNode = allListNode["Extras"]["KeyValuePair"];
for (auto allListNodeExtrasKeyValuePair : allExtrasNode)
auto allExtrasNode = jobsNodeListJob["Extras"]["KeyValuePair"];
for (auto jobsNodeListJobExtrasKeyValuePair : allExtrasNode)
{
Jobs::Job::KeyValuePair extrasObject;
if(!allListNodeExtrasKeyValuePair["Key"].isNull())
extrasObject.key = allListNodeExtrasKeyValuePair["Key"].asString();
if(!allListNodeExtrasKeyValuePair["Value"].isNull())
extrasObject.value = allListNodeExtrasKeyValuePair["Value"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Key"].isNull())
extrasObject.key = jobsNodeListJobExtrasKeyValuePair["Key"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Value"].isNull())
extrasObject.value = jobsNodeListJobExtrasKeyValuePair["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allTasksNode = allListNode["Tasks"]["Task"];
for (auto allListNodeTasksTask : allTasksNode)
auto allTasksNode = jobsNodeListJob["Tasks"]["Task"];
for (auto jobsNodeListJobTasksTask : allTasksNode)
{
Jobs::Job::Task tasksObject;
if(!allListNodeTasksTask["TaskId"].isNull())
tasksObject.taskId = allListNodeTasksTask["TaskId"].asString();
if(!allListNodeTasksTask["JobId"].isNull())
tasksObject.jobId = allListNodeTasksTask["JobId"].asString();
if(!allListNodeTasksTask["ScenarioId"].isNull())
tasksObject.scenarioId = allListNodeTasksTask["ScenarioId"].asString();
if(!allListNodeTasksTask["ChatbotId"].isNull())
tasksObject.chatbotId = allListNodeTasksTask["ChatbotId"].asString();
if(!allListNodeTasksTask["PlanedTime"].isNull())
tasksObject.planedTime = std::stol(allListNodeTasksTask["PlanedTime"].asString());
if(!allListNodeTasksTask["ActualTime"].isNull())
tasksObject.actualTime = std::stol(allListNodeTasksTask["ActualTime"].asString());
if(!allListNodeTasksTask["CallingNumber"].isNull())
tasksObject.callingNumber = allListNodeTasksTask["CallingNumber"].asString();
if(!allListNodeTasksTask["CalledNumber"].isNull())
tasksObject.calledNumber = allListNodeTasksTask["CalledNumber"].asString();
if(!allListNodeTasksTask["CallId"].isNull())
tasksObject.callId = allListNodeTasksTask["CallId"].asString();
if(!allListNodeTasksTask["Status"].isNull())
tasksObject.status = allListNodeTasksTask["Status"].asString();
if(!allListNodeTasksTask["Brief"].isNull())
tasksObject.brief = allListNodeTasksTask["Brief"].asString();
if(!allListNodeTasksTask["Duration"].isNull())
tasksObject.duration = std::stoi(allListNodeTasksTask["Duration"].asString());
if(!jobsNodeListJobTasksTask["TaskId"].isNull())
tasksObject.taskId = jobsNodeListJobTasksTask["TaskId"].asString();
if(!jobsNodeListJobTasksTask["JobId"].isNull())
tasksObject.jobId = jobsNodeListJobTasksTask["JobId"].asString();
if(!jobsNodeListJobTasksTask["ScenarioId"].isNull())
tasksObject.scenarioId = jobsNodeListJobTasksTask["ScenarioId"].asString();
if(!jobsNodeListJobTasksTask["ChatbotId"].isNull())
tasksObject.chatbotId = jobsNodeListJobTasksTask["ChatbotId"].asString();
if(!jobsNodeListJobTasksTask["PlanedTime"].isNull())
tasksObject.planedTime = std::stol(jobsNodeListJobTasksTask["PlanedTime"].asString());
if(!jobsNodeListJobTasksTask["ActualTime"].isNull())
tasksObject.actualTime = std::stol(jobsNodeListJobTasksTask["ActualTime"].asString());
if(!jobsNodeListJobTasksTask["CallingNumber"].isNull())
tasksObject.callingNumber = jobsNodeListJobTasksTask["CallingNumber"].asString();
if(!jobsNodeListJobTasksTask["CalledNumber"].isNull())
tasksObject.calledNumber = jobsNodeListJobTasksTask["CalledNumber"].asString();
if(!jobsNodeListJobTasksTask["CallId"].isNull())
tasksObject.callId = jobsNodeListJobTasksTask["CallId"].asString();
if(!jobsNodeListJobTasksTask["Status"].isNull())
tasksObject.status = jobsNodeListJobTasksTask["Status"].asString();
if(!jobsNodeListJobTasksTask["Brief"].isNull())
tasksObject.brief = jobsNodeListJobTasksTask["Brief"].asString();
if(!jobsNodeListJobTasksTask["Duration"].isNull())
tasksObject.duration = std::stoi(jobsNodeListJobTasksTask["Duration"].asString());
auto contact1Node = value["Contact"];
if(!contact1Node["ContactId"].isNull())
tasksObject.contact1.contactId = contact1Node["ContactId"].asString();
@@ -145,26 +145,26 @@ void ListJobStatusResult::parse(const std::string &payload)
tasksObject.contact1.jobId = contact1Node["JobId"].asString();
jobObject.tasks.push_back(tasksObject);
}
auto allSummaryNode = allListNode["Summary"]["SummaryItem"];
for (auto allListNodeSummarySummaryItem : allSummaryNode)
auto allSummaryNode = jobsNodeListJob["Summary"]["SummaryItem"];
for (auto jobsNodeListJobSummarySummaryItem : allSummaryNode)
{
Jobs::Job::SummaryItem summaryObject;
if(!allListNodeSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = allListNodeSummarySummaryItem["SummaryId"].asString();
if(!allListNodeSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = allListNodeSummarySummaryItem["GroupId"].asString();
if(!allListNodeSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = allListNodeSummarySummaryItem["JobId"].asString();
if(!allListNodeSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = allListNodeSummarySummaryItem["TaskId"].asString();
if(!allListNodeSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = allListNodeSummarySummaryItem["ConversationDetailId"].asString();
if(!allListNodeSummarySummaryItem["Category"].isNull())
summaryObject.category = allListNodeSummarySummaryItem["Category"].asString();
if(!allListNodeSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = allListNodeSummarySummaryItem["SummaryName"].asString();
if(!allListNodeSummarySummaryItem["Content"].isNull())
summaryObject.content = allListNodeSummarySummaryItem["Content"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = jobsNodeListJobSummarySummaryItem["SummaryId"].asString();
if(!jobsNodeListJobSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = jobsNodeListJobSummarySummaryItem["GroupId"].asString();
if(!jobsNodeListJobSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = jobsNodeListJobSummarySummaryItem["JobId"].asString();
if(!jobsNodeListJobSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = jobsNodeListJobSummarySummaryItem["TaskId"].asString();
if(!jobsNodeListJobSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = jobsNodeListJobSummarySummaryItem["ConversationDetailId"].asString();
if(!jobsNodeListJobSummarySummaryItem["Category"].isNull())
summaryObject.category = jobsNodeListJobSummarySummaryItem["Category"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = jobsNodeListJobSummarySummaryItem["SummaryName"].asString();
if(!jobsNodeListJobSummarySummaryItem["Content"].isNull())
summaryObject.content = jobsNodeListJobSummarySummaryItem["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];

View File

@@ -68,58 +68,58 @@ void ListJobsByGroupResult::parse(const std::string &payload)
jobObject.referenceId = jobsNodeListJob["ReferenceId"].asString();
if(!jobsNodeListJob["FailureReason"].isNull())
jobObject.failureReason = jobsNodeListJob["FailureReason"].asString();
auto allContactsNode = allListNode["Contacts"]["Contact"];
for (auto allListNodeContactsContact : allContactsNode)
auto allContactsNode = jobsNodeListJob["Contacts"]["Contact"];
for (auto jobsNodeListJobContactsContact : allContactsNode)
{
Jobs::Job::Contact contactsObject;
if(!allListNodeContactsContact["ContactId"].isNull())
contactsObject.contactId = allListNodeContactsContact["ContactId"].asString();
if(!allListNodeContactsContact["ContactName"].isNull())
contactsObject.contactName = allListNodeContactsContact["ContactName"].asString();
if(!allListNodeContactsContact["Honorific"].isNull())
contactsObject.honorific = allListNodeContactsContact["Honorific"].asString();
if(!allListNodeContactsContact["Role"].isNull())
contactsObject.role = allListNodeContactsContact["Role"].asString();
if(!allListNodeContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = allListNodeContactsContact["PhoneNumber"].asString();
if(!allListNodeContactsContact["State"].isNull())
contactsObject.state = allListNodeContactsContact["State"].asString();
if(!allListNodeContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = allListNodeContactsContact["ReferenceId"].asString();
if(!allListNodeContactsContact["JobId"].isNull())
contactsObject.jobId = allListNodeContactsContact["JobId"].asString();
if(!jobsNodeListJobContactsContact["ContactId"].isNull())
contactsObject.contactId = jobsNodeListJobContactsContact["ContactId"].asString();
if(!jobsNodeListJobContactsContact["ContactName"].isNull())
contactsObject.contactName = jobsNodeListJobContactsContact["ContactName"].asString();
if(!jobsNodeListJobContactsContact["Honorific"].isNull())
contactsObject.honorific = jobsNodeListJobContactsContact["Honorific"].asString();
if(!jobsNodeListJobContactsContact["Role"].isNull())
contactsObject.role = jobsNodeListJobContactsContact["Role"].asString();
if(!jobsNodeListJobContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = jobsNodeListJobContactsContact["PhoneNumber"].asString();
if(!jobsNodeListJobContactsContact["State"].isNull())
contactsObject.state = jobsNodeListJobContactsContact["State"].asString();
if(!jobsNodeListJobContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = jobsNodeListJobContactsContact["ReferenceId"].asString();
if(!jobsNodeListJobContactsContact["JobId"].isNull())
contactsObject.jobId = jobsNodeListJobContactsContact["JobId"].asString();
jobObject.contacts.push_back(contactsObject);
}
auto allExtrasNode = allListNode["Extras"]["KeyValuePair"];
for (auto allListNodeExtrasKeyValuePair : allExtrasNode)
auto allExtrasNode = jobsNodeListJob["Extras"]["KeyValuePair"];
for (auto jobsNodeListJobExtrasKeyValuePair : allExtrasNode)
{
Jobs::Job::KeyValuePair extrasObject;
if(!allListNodeExtrasKeyValuePair["Key"].isNull())
extrasObject.key = allListNodeExtrasKeyValuePair["Key"].asString();
if(!allListNodeExtrasKeyValuePair["Value"].isNull())
extrasObject.value = allListNodeExtrasKeyValuePair["Value"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Key"].isNull())
extrasObject.key = jobsNodeListJobExtrasKeyValuePair["Key"].asString();
if(!jobsNodeListJobExtrasKeyValuePair["Value"].isNull())
extrasObject.value = jobsNodeListJobExtrasKeyValuePair["Value"].asString();
jobObject.extras.push_back(extrasObject);
}
auto allSummaryNode = allListNode["Summary"]["SummaryItem"];
for (auto allListNodeSummarySummaryItem : allSummaryNode)
auto allSummaryNode = jobsNodeListJob["Summary"]["SummaryItem"];
for (auto jobsNodeListJobSummarySummaryItem : allSummaryNode)
{
Jobs::Job::SummaryItem summaryObject;
if(!allListNodeSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = allListNodeSummarySummaryItem["SummaryId"].asString();
if(!allListNodeSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = allListNodeSummarySummaryItem["GroupId"].asString();
if(!allListNodeSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = allListNodeSummarySummaryItem["JobId"].asString();
if(!allListNodeSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = allListNodeSummarySummaryItem["TaskId"].asString();
if(!allListNodeSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = allListNodeSummarySummaryItem["ConversationDetailId"].asString();
if(!allListNodeSummarySummaryItem["Category"].isNull())
summaryObject.category = allListNodeSummarySummaryItem["Category"].asString();
if(!allListNodeSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = allListNodeSummarySummaryItem["SummaryName"].asString();
if(!allListNodeSummarySummaryItem["Content"].isNull())
summaryObject.content = allListNodeSummarySummaryItem["Content"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryId"].isNull())
summaryObject.summaryId = jobsNodeListJobSummarySummaryItem["SummaryId"].asString();
if(!jobsNodeListJobSummarySummaryItem["GroupId"].isNull())
summaryObject.groupId = jobsNodeListJobSummarySummaryItem["GroupId"].asString();
if(!jobsNodeListJobSummarySummaryItem["JobId"].isNull())
summaryObject.jobId = jobsNodeListJobSummarySummaryItem["JobId"].asString();
if(!jobsNodeListJobSummarySummaryItem["TaskId"].isNull())
summaryObject.taskId = jobsNodeListJobSummarySummaryItem["TaskId"].asString();
if(!jobsNodeListJobSummarySummaryItem["ConversationDetailId"].isNull())
summaryObject.conversationDetailId = jobsNodeListJobSummarySummaryItem["ConversationDetailId"].asString();
if(!jobsNodeListJobSummarySummaryItem["Category"].isNull())
summaryObject.category = jobsNodeListJobSummarySummaryItem["Category"].asString();
if(!jobsNodeListJobSummarySummaryItem["SummaryName"].isNull())
summaryObject.summaryName = jobsNodeListJobSummarySummaryItem["SummaryName"].asString();
if(!jobsNodeListJobSummarySummaryItem["Content"].isNull())
summaryObject.content = jobsNodeListJobSummarySummaryItem["Content"].asString();
jobObject.summary.push_back(summaryObject);
}
auto allCallingNumbers = value["CallingNumbers"]["String"];

View File

@@ -71,14 +71,14 @@ void ListPhoneNumbersResult::parse(const std::string &payload)
phoneNumbersObject.numberCommodityStatus = std::stoi(valuePhoneNumbersPhoneNumber["NumberCommodityStatus"].asString());
if(!valuePhoneNumbersPhoneNumber["SipTelX"].isNull())
phoneNumbersObject.sipTelX = valuePhoneNumbersPhoneNumber["SipTelX"].asString();
auto allSkillGroupsNode = allPhoneNumbersNode["SkillGroups"]["SkillGroup"];
for (auto allPhoneNumbersNodeSkillGroupsSkillGroup : allSkillGroupsNode)
auto allSkillGroupsNode = valuePhoneNumbersPhoneNumber["SkillGroups"]["SkillGroup"];
for (auto valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup : allSkillGroupsNode)
{
PhoneNumber::SkillGroup skillGroupsObject;
if(!allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupId"].isNull())
skillGroupsObject.skillGroupId = allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupId"].asString();
if(!allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupName"].isNull())
skillGroupsObject.skillGroupName = allPhoneNumbersNodeSkillGroupsSkillGroup["SkillGroupName"].asString();
if(!valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupId"].isNull())
skillGroupsObject.skillGroupId = valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupId"].asString();
if(!valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupName"].isNull())
skillGroupsObject.skillGroupName = valuePhoneNumbersPhoneNumberSkillGroupsSkillGroup["SkillGroupName"].asString();
phoneNumbersObject.skillGroups.push_back(skillGroupsObject);
}
auto contactFlowNode = value["ContactFlow"];

View File

@@ -55,14 +55,14 @@ void ListRealTimeAgentResult::parse(const std::string &payload)
dataObject.state = valueDataUser["State"].asString();
if(!valueDataUser["StateDesc"].isNull())
dataObject.stateDesc = valueDataUser["StateDesc"].asString();
auto allSkillLevelsNode = allDataNode["SkillLevels"]["SkillLevel"];
for (auto allDataNodeSkillLevelsSkillLevel : allSkillLevelsNode)
auto allSkillLevelsNode = valueDataUser["SkillLevels"]["SkillLevel"];
for (auto valueDataUserSkillLevelsSkillLevel : allSkillLevelsNode)
{
User::SkillLevel skillLevelsObject;
if(!allDataNodeSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = allDataNodeSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!allDataNodeSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(allDataNodeSkillLevelsSkillLevel["Level"].asString());
if(!valueDataUserSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = valueDataUserSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!valueDataUserSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(valueDataUserSkillLevelsSkillLevel["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelsObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();

View File

@@ -80,66 +80,66 @@ void ListRecentCallRecordsResult::parse(const std::string &payload)
callDetailRecordObject.satisfactionDesc = callDetailRecordsNodeListCallDetailRecord["SatisfactionDesc"].asString();
if(!callDetailRecordsNodeListCallDetailRecord["Feedback"].isNull())
callDetailRecordObject.feedback = callDetailRecordsNodeListCallDetailRecord["Feedback"].asString();
auto allAgentsNode = allListNode["Agents"]["CallDetailAgent"];
for (auto allListNodeAgentsCallDetailAgent : allAgentsNode)
auto allAgentsNode = callDetailRecordsNodeListCallDetailRecord["Agents"]["CallDetailAgent"];
for (auto callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent : allAgentsNode)
{
CallDetailRecords::CallDetailRecord::CallDetailAgent agentsObject;
if(!allListNodeAgentsCallDetailAgent["ContactId"].isNull())
agentsObject.contactId = allListNodeAgentsCallDetailAgent["ContactId"].asString();
if(!allListNodeAgentsCallDetailAgent["AgentId"].isNull())
agentsObject.agentId = allListNodeAgentsCallDetailAgent["AgentId"].asString();
if(!allListNodeAgentsCallDetailAgent["AgentName"].isNull())
agentsObject.agentName = allListNodeAgentsCallDetailAgent["AgentName"].asString();
if(!allListNodeAgentsCallDetailAgent["SkillGroupName"].isNull())
agentsObject.skillGroupName = allListNodeAgentsCallDetailAgent["SkillGroupName"].asString();
if(!allListNodeAgentsCallDetailAgent["QueueTime"].isNull())
agentsObject.queueTime = std::stoi(allListNodeAgentsCallDetailAgent["QueueTime"].asString());
if(!allListNodeAgentsCallDetailAgent["RingTime"].isNull())
agentsObject.ringTime = std::stoi(allListNodeAgentsCallDetailAgent["RingTime"].asString());
if(!allListNodeAgentsCallDetailAgent["StartTime"].isNull())
agentsObject.startTime = std::stol(allListNodeAgentsCallDetailAgent["StartTime"].asString());
if(!allListNodeAgentsCallDetailAgent["TalkTime"].isNull())
agentsObject.talkTime = std::stoi(allListNodeAgentsCallDetailAgent["TalkTime"].asString());
if(!allListNodeAgentsCallDetailAgent["HoldTime"].isNull())
agentsObject.holdTime = std::stoi(allListNodeAgentsCallDetailAgent["HoldTime"].asString());
if(!allListNodeAgentsCallDetailAgent["WorkTime"].isNull())
agentsObject.workTime = std::stoi(allListNodeAgentsCallDetailAgent["WorkTime"].asString());
if(!allListNodeAgentsCallDetailAgent["Satisfaction"].isNull())
agentsObject.satisfaction = allListNodeAgentsCallDetailAgent["Satisfaction"].asString();
if(!allListNodeAgentsCallDetailAgent["Feedback"].isNull())
agentsObject.feedback = allListNodeAgentsCallDetailAgent["Feedback"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["ContactId"].isNull())
agentsObject.contactId = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["ContactId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentId"].isNull())
agentsObject.agentId = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentName"].isNull())
agentsObject.agentName = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["AgentName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["SkillGroupName"].isNull())
agentsObject.skillGroupName = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["SkillGroupName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["QueueTime"].isNull())
agentsObject.queueTime = std::stoi(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["QueueTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["RingTime"].isNull())
agentsObject.ringTime = std::stoi(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["RingTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["StartTime"].isNull())
agentsObject.startTime = std::stol(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["StartTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["TalkTime"].isNull())
agentsObject.talkTime = std::stoi(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["TalkTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["HoldTime"].isNull())
agentsObject.holdTime = std::stoi(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["HoldTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["WorkTime"].isNull())
agentsObject.workTime = std::stoi(callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["WorkTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Satisfaction"].isNull())
agentsObject.satisfaction = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Satisfaction"].asString();
if(!callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Feedback"].isNull())
agentsObject.feedback = callDetailRecordsNodeListCallDetailRecordAgentsCallDetailAgent["Feedback"].asString();
callDetailRecordObject.agents.push_back(agentsObject);
}
auto allRecordingsNode = allListNode["Recordings"]["Recording"];
for (auto allListNodeRecordingsRecording : allRecordingsNode)
auto allRecordingsNode = callDetailRecordsNodeListCallDetailRecord["Recordings"]["Recording"];
for (auto callDetailRecordsNodeListCallDetailRecordRecordingsRecording : allRecordingsNode)
{
CallDetailRecords::CallDetailRecord::Recording recordingsObject;
if(!allListNodeRecordingsRecording["ContactId"].isNull())
recordingsObject.contactId = allListNodeRecordingsRecording["ContactId"].asString();
if(!allListNodeRecordingsRecording["ContactType"].isNull())
recordingsObject.contactType = allListNodeRecordingsRecording["ContactType"].asString();
if(!allListNodeRecordingsRecording["AgentId"].isNull())
recordingsObject.agentId = allListNodeRecordingsRecording["AgentId"].asString();
if(!allListNodeRecordingsRecording["AgentName"].isNull())
recordingsObject.agentName = allListNodeRecordingsRecording["AgentName"].asString();
if(!allListNodeRecordingsRecording["CallingNumber"].isNull())
recordingsObject.callingNumber = allListNodeRecordingsRecording["CallingNumber"].asString();
if(!allListNodeRecordingsRecording["CalledNumber"].isNull())
recordingsObject.calledNumber = allListNodeRecordingsRecording["CalledNumber"].asString();
if(!allListNodeRecordingsRecording["StartTime"].isNull())
recordingsObject.startTime = std::stol(allListNodeRecordingsRecording["StartTime"].asString());
if(!allListNodeRecordingsRecording["Duration"].isNull())
recordingsObject.duration = std::stoi(allListNodeRecordingsRecording["Duration"].asString());
if(!allListNodeRecordingsRecording["FileName"].isNull())
recordingsObject.fileName = allListNodeRecordingsRecording["FileName"].asString();
if(!allListNodeRecordingsRecording["FilePath"].isNull())
recordingsObject.filePath = allListNodeRecordingsRecording["FilePath"].asString();
if(!allListNodeRecordingsRecording["FileDescription"].isNull())
recordingsObject.fileDescription = allListNodeRecordingsRecording["FileDescription"].asString();
if(!allListNodeRecordingsRecording["Channel"].isNull())
recordingsObject.channel = allListNodeRecordingsRecording["Channel"].asString();
if(!allListNodeRecordingsRecording["InstanceId"].isNull())
recordingsObject.instanceId = allListNodeRecordingsRecording["InstanceId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactId"].isNull())
recordingsObject.contactId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactType"].isNull())
recordingsObject.contactType = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["ContactType"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentId"].isNull())
recordingsObject.agentId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentId"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentName"].isNull())
recordingsObject.agentName = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["AgentName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["CallingNumber"].isNull())
recordingsObject.callingNumber = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["CallingNumber"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["CalledNumber"].isNull())
recordingsObject.calledNumber = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["CalledNumber"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["StartTime"].isNull())
recordingsObject.startTime = std::stol(callDetailRecordsNodeListCallDetailRecordRecordingsRecording["StartTime"].asString());
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Duration"].isNull())
recordingsObject.duration = std::stoi(callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Duration"].asString());
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileName"].isNull())
recordingsObject.fileName = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileName"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FilePath"].isNull())
recordingsObject.filePath = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FilePath"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileDescription"].isNull())
recordingsObject.fileDescription = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["FileDescription"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Channel"].isNull())
recordingsObject.channel = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["Channel"].asString();
if(!callDetailRecordsNodeListCallDetailRecordRecordingsRecording["InstanceId"].isNull())
recordingsObject.instanceId = callDetailRecordsNodeListCallDetailRecordRecordingsRecording["InstanceId"].asString();
callDetailRecordObject.recordings.push_back(recordingsObject);
}
callDetailRecords_.list.push_back(callDetailRecordObject);

View File

@@ -53,32 +53,32 @@ void ListScenarioTemplatesResult::parse(const std::string &payload)
scenarioTemplatesObject.type = valueScenarioTemplatesScenario["Type"].asString();
if(!valueScenarioTemplatesScenario["IsTemplate"].isNull())
scenarioTemplatesObject.isTemplate = valueScenarioTemplatesScenario["IsTemplate"].asString() == "true";
auto allSurveysNode = allScenarioTemplatesNode["Surveys"]["Survey"];
for (auto allScenarioTemplatesNodeSurveysSurvey : allSurveysNode)
auto allSurveysNode = valueScenarioTemplatesScenario["Surveys"]["Survey"];
for (auto valueScenarioTemplatesScenarioSurveysSurvey : allSurveysNode)
{
Scenario::Survey surveysObject;
if(!allScenarioTemplatesNodeSurveysSurvey["Id"].isNull())
surveysObject.id = allScenarioTemplatesNodeSurveysSurvey["Id"].asString();
if(!allScenarioTemplatesNodeSurveysSurvey["Name"].isNull())
surveysObject.name = allScenarioTemplatesNodeSurveysSurvey["Name"].asString();
if(!allScenarioTemplatesNodeSurveysSurvey["Description"].isNull())
surveysObject.description = allScenarioTemplatesNodeSurveysSurvey["Description"].asString();
if(!allScenarioTemplatesNodeSurveysSurvey["Role"].isNull())
surveysObject.role = allScenarioTemplatesNodeSurveysSurvey["Role"].asString();
if(!allScenarioTemplatesNodeSurveysSurvey["Round"].isNull())
surveysObject.round = std::stoi(allScenarioTemplatesNodeSurveysSurvey["Round"].asString());
if(!allScenarioTemplatesNodeSurveysSurvey["BeebotId"].isNull())
surveysObject.beebotId = allScenarioTemplatesNodeSurveysSurvey["BeebotId"].asString();
if(!allScenarioTemplatesNodeSurveysSurvey["GlobalQuestions"].isNull())
surveysObject.globalQuestions = allScenarioTemplatesNodeSurveysSurvey["GlobalQuestions"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
if(!valueScenarioTemplatesScenarioSurveysSurvey["Id"].isNull())
surveysObject.id = valueScenarioTemplatesScenarioSurveysSurvey["Id"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurvey["Name"].isNull())
surveysObject.name = valueScenarioTemplatesScenarioSurveysSurvey["Name"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurvey["Description"].isNull())
surveysObject.description = valueScenarioTemplatesScenarioSurveysSurvey["Description"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurvey["Role"].isNull())
surveysObject.role = valueScenarioTemplatesScenarioSurveysSurvey["Role"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurvey["Round"].isNull())
surveysObject.round = std::stoi(valueScenarioTemplatesScenarioSurveysSurvey["Round"].asString());
if(!valueScenarioTemplatesScenarioSurveysSurvey["BeebotId"].isNull())
surveysObject.beebotId = valueScenarioTemplatesScenarioSurveysSurvey["BeebotId"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurvey["GlobalQuestions"].isNull())
surveysObject.globalQuestions = valueScenarioTemplatesScenarioSurveysSurvey["GlobalQuestions"].asString();
auto allIntentsNode = valueScenarioTemplatesScenarioSurveysSurvey["Intents"]["IntentNode"];
for (auto valueScenarioTemplatesScenarioSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = valueScenarioTemplatesScenarioSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!valueScenarioTemplatesScenarioSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = valueScenarioTemplatesScenarioSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveysObject.intents.push_back(intentsObject);
}
auto flowNode = value["Flow"];
@@ -90,14 +90,14 @@ void ListScenarioTemplatesResult::parse(const std::string &payload)
surveysObject.flow.flowJson = flowNode["FlowJson"].asString();
scenarioTemplatesObject.surveys.push_back(surveysObject);
}
auto allVariablesNode = allScenarioTemplatesNode["Variables"]["KeyValuePair"];
for (auto allScenarioTemplatesNodeVariablesKeyValuePair : allVariablesNode)
auto allVariablesNode = valueScenarioTemplatesScenario["Variables"]["KeyValuePair"];
for (auto valueScenarioTemplatesScenarioVariablesKeyValuePair : allVariablesNode)
{
Scenario::KeyValuePair variablesObject;
if(!allScenarioTemplatesNodeVariablesKeyValuePair["Key"].isNull())
variablesObject.key = allScenarioTemplatesNodeVariablesKeyValuePair["Key"].asString();
if(!allScenarioTemplatesNodeVariablesKeyValuePair["Value"].isNull())
variablesObject.value = allScenarioTemplatesNodeVariablesKeyValuePair["Value"].asString();
if(!valueScenarioTemplatesScenarioVariablesKeyValuePair["Key"].isNull())
variablesObject.key = valueScenarioTemplatesScenarioVariablesKeyValuePair["Key"].asString();
if(!valueScenarioTemplatesScenarioVariablesKeyValuePair["Value"].isNull())
variablesObject.value = valueScenarioTemplatesScenarioVariablesKeyValuePair["Value"].asString();
scenarioTemplatesObject.variables.push_back(variablesObject);
}
scenarioTemplates_.push_back(scenarioTemplatesObject);

View File

@@ -53,42 +53,42 @@ void ListScenariosResult::parse(const std::string &payload)
scenariosObject.type = valueScenariosScenario["Type"].asString();
if(!valueScenariosScenario["IsTemplate"].isNull())
scenariosObject.isTemplate = valueScenariosScenario["IsTemplate"].asString() == "true";
auto allSurveysNode = allScenariosNode["Surveys"]["Survey"];
for (auto allScenariosNodeSurveysSurvey : allSurveysNode)
auto allSurveysNode = valueScenariosScenario["Surveys"]["Survey"];
for (auto valueScenariosScenarioSurveysSurvey : allSurveysNode)
{
Scenario::Survey surveysObject;
if(!allScenariosNodeSurveysSurvey["Id"].isNull())
surveysObject.id = allScenariosNodeSurveysSurvey["Id"].asString();
if(!allScenariosNodeSurveysSurvey["Name"].isNull())
surveysObject.name = allScenariosNodeSurveysSurvey["Name"].asString();
if(!allScenariosNodeSurveysSurvey["Description"].isNull())
surveysObject.description = allScenariosNodeSurveysSurvey["Description"].asString();
if(!allScenariosNodeSurveysSurvey["Role"].isNull())
surveysObject.role = allScenariosNodeSurveysSurvey["Role"].asString();
if(!allScenariosNodeSurveysSurvey["Round"].isNull())
surveysObject.round = std::stoi(allScenariosNodeSurveysSurvey["Round"].asString());
if(!allScenariosNodeSurveysSurvey["BeebotId"].isNull())
surveysObject.beebotId = allScenariosNodeSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
if(!valueScenariosScenarioSurveysSurvey["Id"].isNull())
surveysObject.id = valueScenariosScenarioSurveysSurvey["Id"].asString();
if(!valueScenariosScenarioSurveysSurvey["Name"].isNull())
surveysObject.name = valueScenariosScenarioSurveysSurvey["Name"].asString();
if(!valueScenariosScenarioSurveysSurvey["Description"].isNull())
surveysObject.description = valueScenariosScenarioSurveysSurvey["Description"].asString();
if(!valueScenariosScenarioSurveysSurvey["Role"].isNull())
surveysObject.role = valueScenariosScenarioSurveysSurvey["Role"].asString();
if(!valueScenariosScenarioSurveysSurvey["Round"].isNull())
surveysObject.round = std::stoi(valueScenariosScenarioSurveysSurvey["Round"].asString());
if(!valueScenariosScenarioSurveysSurvey["BeebotId"].isNull())
surveysObject.beebotId = valueScenariosScenarioSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = valueScenariosScenarioSurveysSurvey["Intents"]["IntentNode"];
for (auto valueScenariosScenarioSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!valueScenariosScenarioSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = valueScenariosScenarioSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!valueScenariosScenarioSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = valueScenariosScenarioSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveysObject.intents.push_back(intentsObject);
}
scenariosObject.surveys.push_back(surveysObject);
}
auto allVariablesNode = allScenariosNode["Variables"]["KeyValuePair"];
for (auto allScenariosNodeVariablesKeyValuePair : allVariablesNode)
auto allVariablesNode = valueScenariosScenario["Variables"]["KeyValuePair"];
for (auto valueScenariosScenarioVariablesKeyValuePair : allVariablesNode)
{
Scenario::KeyValuePair variablesObject;
if(!allScenariosNodeVariablesKeyValuePair["Key"].isNull())
variablesObject.key = allScenariosNodeVariablesKeyValuePair["Key"].asString();
if(!allScenariosNodeVariablesKeyValuePair["Value"].isNull())
variablesObject.value = allScenariosNodeVariablesKeyValuePair["Value"].asString();
if(!valueScenariosScenarioVariablesKeyValuePair["Key"].isNull())
variablesObject.key = valueScenariosScenarioVariablesKeyValuePair["Key"].asString();
if(!valueScenariosScenarioVariablesKeyValuePair["Value"].isNull())
variablesObject.value = valueScenariosScenarioVariablesKeyValuePair["Value"].asString();
scenariosObject.variables.push_back(variablesObject);
}
auto strategyNode = value["Strategy"];

View File

@@ -52,18 +52,18 @@ void ListSkillGroupSummaryReportsByIntervalResult::parse(const std::string &payl
PagedSkillGroupSummaryReport::SkillGroupTimeIntervalReport skillGroupTimeIntervalReportObject;
if(!pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReport["SkillGroupId"].isNull())
skillGroupTimeIntervalReportObject.skillGroupId = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReport["SkillGroupId"].asString();
auto allIntervalListNode = allListNode["IntervalList"]["SkillGroupSummaryReport"];
for (auto allListNodeIntervalListSkillGroupSummaryReport : allIntervalListNode)
auto allIntervalListNode = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReport["IntervalList"]["SkillGroupSummaryReport"];
for (auto pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport : allIntervalListNode)
{
PagedSkillGroupSummaryReport::SkillGroupTimeIntervalReport::SkillGroupSummaryReport intervalListObject;
if(!allListNodeIntervalListSkillGroupSummaryReport["Timestamp"].isNull())
intervalListObject.timestamp = allListNodeIntervalListSkillGroupSummaryReport["Timestamp"].asString();
if(!allListNodeIntervalListSkillGroupSummaryReport["InstanceId"].isNull())
intervalListObject.instanceId = allListNodeIntervalListSkillGroupSummaryReport["InstanceId"].asString();
if(!allListNodeIntervalListSkillGroupSummaryReport["SkillGroupId"].isNull())
intervalListObject.skillGroupId = allListNodeIntervalListSkillGroupSummaryReport["SkillGroupId"].asString();
if(!allListNodeIntervalListSkillGroupSummaryReport["SkillGroupName"].isNull())
intervalListObject.skillGroupName = allListNodeIntervalListSkillGroupSummaryReport["SkillGroupName"].asString();
if(!pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["Timestamp"].isNull())
intervalListObject.timestamp = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["Timestamp"].asString();
if(!pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["InstanceId"].isNull())
intervalListObject.instanceId = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["InstanceId"].asString();
if(!pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["SkillGroupId"].isNull())
intervalListObject.skillGroupId = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["SkillGroupId"].asString();
if(!pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["SkillGroupName"].isNull())
intervalListObject.skillGroupName = pagedSkillGroupSummaryReportNodeListSkillGroupTimeIntervalReportIntervalListSkillGroupSummaryReport["SkillGroupName"].asString();
auto overallNode = value["Overall"];
if(!overallNode["TotalCalls"].isNull())
intervalListObject.overall.totalCalls = std::stol(overallNode["TotalCalls"].asString());

View File

@@ -59,28 +59,28 @@ void ListSkillGroupsResult::parse(const std::string &payload)
skillGroupsObject.routingStrategy = valueSkillGroupsSkillGroup["RoutingStrategy"].asString();
if(!valueSkillGroupsSkillGroup["UserCount"].isNull())
skillGroupsObject.userCount = std::stoi(valueSkillGroupsSkillGroup["UserCount"].asString());
auto allOutboundPhoneNumbersNode = allSkillGroupsNode["OutboundPhoneNumbers"]["PhoneNumber"];
for (auto allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber : allOutboundPhoneNumbersNode)
auto allOutboundPhoneNumbersNode = valueSkillGroupsSkillGroup["OutboundPhoneNumbers"]["PhoneNumber"];
for (auto valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber : allOutboundPhoneNumbersNode)
{
SkillGroup::PhoneNumber outboundPhoneNumbersObject;
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
outboundPhoneNumbersObject.phoneNumberId = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["InstanceId"].isNull())
outboundPhoneNumbersObject.instanceId = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["InstanceId"].asString();
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Number"].isNull())
outboundPhoneNumbersObject.number = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Number"].asString();
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
outboundPhoneNumbersObject.phoneNumberDescription = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["TestOnly"].isNull())
outboundPhoneNumbersObject.testOnly = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["RemainingTime"].isNull())
outboundPhoneNumbersObject.remainingTime = std::stoi(allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["AllowOutbound"].isNull())
outboundPhoneNumbersObject.allowOutbound = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Usage"].isNull())
outboundPhoneNumbersObject.usage = allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Usage"].asString();
if(!allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Trunks"].isNull())
outboundPhoneNumbersObject.trunks = std::stoi(allSkillGroupsNodeOutboundPhoneNumbersPhoneNumber["Trunks"].asString());
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["PhoneNumberId"].isNull())
outboundPhoneNumbersObject.phoneNumberId = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["PhoneNumberId"].asString();
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["InstanceId"].isNull())
outboundPhoneNumbersObject.instanceId = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["InstanceId"].asString();
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Number"].isNull())
outboundPhoneNumbersObject.number = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Number"].asString();
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["PhoneNumberDescription"].isNull())
outboundPhoneNumbersObject.phoneNumberDescription = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["PhoneNumberDescription"].asString();
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["TestOnly"].isNull())
outboundPhoneNumbersObject.testOnly = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["TestOnly"].asString() == "true";
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["RemainingTime"].isNull())
outboundPhoneNumbersObject.remainingTime = std::stoi(valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["RemainingTime"].asString());
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["AllowOutbound"].isNull())
outboundPhoneNumbersObject.allowOutbound = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["AllowOutbound"].asString() == "true";
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Usage"].isNull())
outboundPhoneNumbersObject.usage = valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Usage"].asString();
if(!valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Trunks"].isNull())
outboundPhoneNumbersObject.trunks = std::stoi(valueSkillGroupsSkillGroupOutboundPhoneNumbersPhoneNumber["Trunks"].asString());
skillGroupsObject.outboundPhoneNumbers.push_back(outboundPhoneNumbersObject);
}
skillGroups_.push_back(skillGroupsObject);

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/ListTransferableSkillGroupsRequest.h>
using AlibabaCloud::CCC::Model::ListTransferableSkillGroupsRequest;
ListTransferableSkillGroupsRequest::ListTransferableSkillGroupsRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListTransferableSkillGroups")
{
setMethod(HttpRequest::Method::Post);
}
ListTransferableSkillGroupsRequest::~ListTransferableSkillGroupsRequest()
{}
std::string ListTransferableSkillGroupsRequest::getInstanceId()const
{
return instanceId_;
}
void ListTransferableSkillGroupsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListTransferableSkillGroupsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListTransferableSkillGroupsRequest::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/ListTransferableSkillGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListTransferableSkillGroupsResult::ListTransferableSkillGroupsResult() :
ServiceResult()
{}
ListTransferableSkillGroupsResult::ListTransferableSkillGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTransferableSkillGroupsResult::~ListTransferableSkillGroupsResult()
{}
void ListTransferableSkillGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSkillGroupsNode = value["SkillGroups"]["SkillGroup"];
for (auto valueSkillGroupsSkillGroup : allSkillGroupsNode)
{
SkillGroup skillGroupsObject;
if(!valueSkillGroupsSkillGroup["SkillGroupId"].isNull())
skillGroupsObject.skillGroupId = valueSkillGroupsSkillGroup["SkillGroupId"].asString();
if(!valueSkillGroupsSkillGroup["InstanceId"].isNull())
skillGroupsObject.instanceId = valueSkillGroupsSkillGroup["InstanceId"].asString();
if(!valueSkillGroupsSkillGroup["SkillGroupName"].isNull())
skillGroupsObject.skillGroupName = valueSkillGroupsSkillGroup["SkillGroupName"].asString();
if(!valueSkillGroupsSkillGroup["AccSkillGroupName"].isNull())
skillGroupsObject.accSkillGroupName = valueSkillGroupsSkillGroup["AccSkillGroupName"].asString();
if(!valueSkillGroupsSkillGroup["AccQueueName"].isNull())
skillGroupsObject.accQueueName = valueSkillGroupsSkillGroup["AccQueueName"].asString();
if(!valueSkillGroupsSkillGroup["SkillGroupDescription"].isNull())
skillGroupsObject.skillGroupDescription = valueSkillGroupsSkillGroup["SkillGroupDescription"].asString();
if(!valueSkillGroupsSkillGroup["RoutingStrategy"].isNull())
skillGroupsObject.routingStrategy = valueSkillGroupsSkillGroup["RoutingStrategy"].asString();
if(!valueSkillGroupsSkillGroup["AllowPrivateOutboundNumber"].isNull())
skillGroupsObject.allowPrivateOutboundNumber = valueSkillGroupsSkillGroup["AllowPrivateOutboundNumber"].asString() == "true";
if(!valueSkillGroupsSkillGroup["UserCount"].isNull())
skillGroupsObject.userCount = std::stoi(valueSkillGroupsSkillGroup["UserCount"].asString());
skillGroups_.push_back(skillGroupsObject);
}
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 ListTransferableSkillGroupsResult::getMessage()const
{
return message_;
}
int ListTransferableSkillGroupsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListTransferableSkillGroupsResult::SkillGroup> ListTransferableSkillGroupsResult::getSkillGroups()const
{
return skillGroups_;
}
std::string ListTransferableSkillGroupsResult::getCode()const
{
return code_;
}
bool ListTransferableSkillGroupsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/ListTrunkProvidersRequest.h>
using AlibabaCloud::CCC::Model::ListTrunkProvidersRequest;
ListTrunkProvidersRequest::ListTrunkProvidersRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListTrunkProviders")
{
setMethod(HttpRequest::Method::Post);
}
ListTrunkProvidersRequest::~ListTrunkProvidersRequest()
{}
std::string ListTrunkProvidersRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListTrunkProvidersRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/ListTrunkProvidersResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListTrunkProvidersResult::ListTrunkProvidersResult() :
ServiceResult()
{}
ListTrunkProvidersResult::ListTrunkProvidersResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTrunkProvidersResult::~ListTrunkProvidersResult()
{}
void ListTrunkProvidersResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTrunkProvidersNode = value["TrunkProviders"]["TrunkProvider"];
for (auto valueTrunkProvidersTrunkProvider : allTrunkProvidersNode)
{
TrunkProvider trunkProvidersObject;
if(!valueTrunkProvidersTrunkProvider["ProviderName"].isNull())
trunkProvidersObject.providerName = valueTrunkProvidersTrunkProvider["ProviderName"].asString();
if(!valueTrunkProvidersTrunkProvider["Status"].isNull())
trunkProvidersObject.status = valueTrunkProvidersTrunkProvider["Status"].asString();
trunkProviders_.push_back(trunkProvidersObject);
}
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 ListTrunkProvidersResult::getMessage()const
{
return message_;
}
int ListTrunkProvidersResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListTrunkProvidersResult::TrunkProvider> ListTrunkProvidersResult::getTrunkProviders()const
{
return trunkProviders_;
}
std::string ListTrunkProvidersResult::getCode()const
{
return code_;
}
bool ListTrunkProvidersResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/ListTrunksOfSkillGroupRequest.h>
using AlibabaCloud::CCC::Model::ListTrunksOfSkillGroupRequest;
ListTrunksOfSkillGroupRequest::ListTrunksOfSkillGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ListTrunksOfSkillGroup")
{
setMethod(HttpRequest::Method::Post);
}
ListTrunksOfSkillGroupRequest::~ListTrunksOfSkillGroupRequest()
{}
std::string ListTrunksOfSkillGroupRequest::getInstanceId()const
{
return instanceId_;
}
void ListTrunksOfSkillGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListTrunksOfSkillGroupRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void ListTrunksOfSkillGroupRequest::setSkillGroupId(const std::string& skillGroupId)
{
skillGroupId_ = skillGroupId;
setParameter("SkillGroupId", skillGroupId);
}
std::string ListTrunksOfSkillGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListTrunksOfSkillGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/ListTrunksOfSkillGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListTrunksOfSkillGroupResult::ListTrunksOfSkillGroupResult() :
ServiceResult()
{}
ListTrunksOfSkillGroupResult::ListTrunksOfSkillGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTrunksOfSkillGroupResult::~ListTrunksOfSkillGroupResult()
{}
void ListTrunksOfSkillGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTrunkConfigsNode = value["TrunkConfigs"]["TrunkConfig"];
for (auto valueTrunkConfigsTrunkConfig : allTrunkConfigsNode)
{
TrunkConfig trunkConfigsObject;
if(!valueTrunkConfigsTrunkConfig["ProviderName"].isNull())
trunkConfigsObject.providerName = valueTrunkConfigsTrunkConfig["ProviderName"].asString();
if(!valueTrunkConfigsTrunkConfig["Primary"].isNull())
trunkConfigsObject.primary = valueTrunkConfigsTrunkConfig["Primary"].asString() == "true";
trunkConfigs_.push_back(trunkConfigsObject);
}
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 ListTrunksOfSkillGroupResult::getMessage()const
{
return message_;
}
int ListTrunksOfSkillGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListTrunksOfSkillGroupResult::TrunkConfig> ListTrunksOfSkillGroupResult::getTrunkConfigs()const
{
return trunkConfigs_;
}
std::string ListTrunksOfSkillGroupResult::getCode()const
{
return code_;
}
bool ListTrunksOfSkillGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -52,22 +52,22 @@ void ListUnreachableContactsResult::parse(const std::string &payload)
UnreachableContacts::UnreachableContact unreachableContactObject;
if(!unreachableContactsNodeListUnreachableContact["TotalAttempts"].isNull())
unreachableContactObject.totalAttempts = std::stoi(unreachableContactsNodeListUnreachableContact["TotalAttempts"].asString());
auto allContactsNode = allListNode["Contacts"]["Contact"];
for (auto allListNodeContactsContact : allContactsNode)
auto allContactsNode = unreachableContactsNodeListUnreachableContact["Contacts"]["Contact"];
for (auto unreachableContactsNodeListUnreachableContactContactsContact : allContactsNode)
{
UnreachableContacts::UnreachableContact::Contact contactsObject;
if(!allListNodeContactsContact["ContactId"].isNull())
contactsObject.contactId = allListNodeContactsContact["ContactId"].asString();
if(!allListNodeContactsContact["ContactName"].isNull())
contactsObject.contactName = allListNodeContactsContact["ContactName"].asString();
if(!allListNodeContactsContact["Role"].isNull())
contactsObject.role = allListNodeContactsContact["Role"].asString();
if(!allListNodeContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = allListNodeContactsContact["PhoneNumber"].asString();
if(!allListNodeContactsContact["State"].isNull())
contactsObject.state = allListNodeContactsContact["State"].asString();
if(!allListNodeContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = allListNodeContactsContact["ReferenceId"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["ContactId"].isNull())
contactsObject.contactId = unreachableContactsNodeListUnreachableContactContactsContact["ContactId"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["ContactName"].isNull())
contactsObject.contactName = unreachableContactsNodeListUnreachableContactContactsContact["ContactName"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["Role"].isNull())
contactsObject.role = unreachableContactsNodeListUnreachableContactContactsContact["Role"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["PhoneNumber"].isNull())
contactsObject.phoneNumber = unreachableContactsNodeListUnreachableContactContactsContact["PhoneNumber"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["State"].isNull())
contactsObject.state = unreachableContactsNodeListUnreachableContactContactsContact["State"].asString();
if(!unreachableContactsNodeListUnreachableContactContactsContact["ReferenceId"].isNull())
contactsObject.referenceId = unreachableContactsNodeListUnreachableContactContactsContact["ReferenceId"].asString();
unreachableContactObject.contacts.push_back(contactsObject);
}
unreachableContacts_.list.push_back(unreachableContactObject);

View File

@@ -56,42 +56,42 @@ void ListUsersOfSkillGroupResult::parse(const std::string &payload)
userObject.ramId = usersNodeListUser["RamId"].asString();
if(!usersNodeListUser["InstanceId"].isNull())
userObject.instanceId = usersNodeListUser["InstanceId"].asString();
auto allRolesNode = allListNode["Roles"]["Role"];
for (auto allListNodeRolesRole : allRolesNode)
auto allRolesNode = usersNodeListUser["Roles"]["Role"];
for (auto usersNodeListUserRolesRole : allRolesNode)
{
Users::User::Role rolesObject;
if(!allListNodeRolesRole["RoleId"].isNull())
rolesObject.roleId = allListNodeRolesRole["RoleId"].asString();
if(!allListNodeRolesRole["InstanceId"].isNull())
rolesObject.instanceId = allListNodeRolesRole["InstanceId"].asString();
if(!allListNodeRolesRole["RoleName"].isNull())
rolesObject.roleName = allListNodeRolesRole["RoleName"].asString();
if(!allListNodeRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = allListNodeRolesRole["RoleDescription"].asString();
if(!allListNodeRolesRole["UserCount"].isNull())
rolesObject.userCount = std::stoi(allListNodeRolesRole["UserCount"].asString());
auto allPrivilegesNode = allRolesNode["Privileges"]["Privilege"];
for (auto allRolesNodePrivilegesPrivilege : allPrivilegesNode)
if(!usersNodeListUserRolesRole["RoleId"].isNull())
rolesObject.roleId = usersNodeListUserRolesRole["RoleId"].asString();
if(!usersNodeListUserRolesRole["InstanceId"].isNull())
rolesObject.instanceId = usersNodeListUserRolesRole["InstanceId"].asString();
if(!usersNodeListUserRolesRole["RoleName"].isNull())
rolesObject.roleName = usersNodeListUserRolesRole["RoleName"].asString();
if(!usersNodeListUserRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = usersNodeListUserRolesRole["RoleDescription"].asString();
if(!usersNodeListUserRolesRole["UserCount"].isNull())
rolesObject.userCount = std::stoi(usersNodeListUserRolesRole["UserCount"].asString());
auto allPrivilegesNode = usersNodeListUserRolesRole["Privileges"]["Privilege"];
for (auto usersNodeListUserRolesRolePrivilegesPrivilege : allPrivilegesNode)
{
Users::User::Role::Privilege privilegesObject;
if(!allRolesNodePrivilegesPrivilege["PrivilegeId"].isNull())
privilegesObject.privilegeId = allRolesNodePrivilegesPrivilege["PrivilegeId"].asString();
if(!allRolesNodePrivilegesPrivilege["PrivilegeName"].isNull())
privilegesObject.privilegeName = allRolesNodePrivilegesPrivilege["PrivilegeName"].asString();
if(!allRolesNodePrivilegesPrivilege["PrivilegeDescription"].isNull())
privilegesObject.privilegeDescription = allRolesNodePrivilegesPrivilege["PrivilegeDescription"].asString();
if(!usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeId"].isNull())
privilegesObject.privilegeId = usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeId"].asString();
if(!usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeName"].isNull())
privilegesObject.privilegeName = usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeName"].asString();
if(!usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeDescription"].isNull())
privilegesObject.privilegeDescription = usersNodeListUserRolesRolePrivilegesPrivilege["PrivilegeDescription"].asString();
rolesObject.privileges.push_back(privilegesObject);
}
userObject.roles.push_back(rolesObject);
}
auto allSkillLevelsNode = allListNode["SkillLevels"]["SkillLevel"];
for (auto allListNodeSkillLevelsSkillLevel : allSkillLevelsNode)
auto allSkillLevelsNode = usersNodeListUser["SkillLevels"]["SkillLevel"];
for (auto usersNodeListUserSkillLevelsSkillLevel : allSkillLevelsNode)
{
Users::User::SkillLevel skillLevelsObject;
if(!allListNodeSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = allListNodeSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!allListNodeSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(allListNodeSkillLevelsSkillLevel["Level"].asString());
if(!usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!usersNodeListUserSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(usersNodeListUserSkillLevelsSkillLevel["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelsObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();

View File

@@ -60,28 +60,28 @@ void ListUsersResult::parse(const std::string &payload)
userObject.primary = usersNodeListUser["Primary"].asString() == "true";
if(!usersNodeListUser["PrivateOutboundNumberId"].isNull())
userObject.privateOutboundNumberId = usersNodeListUser["PrivateOutboundNumberId"].asString();
auto allRolesNode = allListNode["Roles"]["Role"];
for (auto allListNodeRolesRole : allRolesNode)
auto allRolesNode = usersNodeListUser["Roles"]["Role"];
for (auto usersNodeListUserRolesRole : allRolesNode)
{
Users::User::Role rolesObject;
if(!allListNodeRolesRole["RoleId"].isNull())
rolesObject.roleId = allListNodeRolesRole["RoleId"].asString();
if(!allListNodeRolesRole["InstanceId"].isNull())
rolesObject.instanceId = allListNodeRolesRole["InstanceId"].asString();
if(!allListNodeRolesRole["RoleName"].isNull())
rolesObject.roleName = allListNodeRolesRole["RoleName"].asString();
if(!allListNodeRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = allListNodeRolesRole["RoleDescription"].asString();
if(!usersNodeListUserRolesRole["RoleId"].isNull())
rolesObject.roleId = usersNodeListUserRolesRole["RoleId"].asString();
if(!usersNodeListUserRolesRole["InstanceId"].isNull())
rolesObject.instanceId = usersNodeListUserRolesRole["InstanceId"].asString();
if(!usersNodeListUserRolesRole["RoleName"].isNull())
rolesObject.roleName = usersNodeListUserRolesRole["RoleName"].asString();
if(!usersNodeListUserRolesRole["RoleDescription"].isNull())
rolesObject.roleDescription = usersNodeListUserRolesRole["RoleDescription"].asString();
userObject.roles.push_back(rolesObject);
}
auto allSkillLevelsNode = allListNode["SkillLevels"]["SkillLevel"];
for (auto allListNodeSkillLevelsSkillLevel : allSkillLevelsNode)
auto allSkillLevelsNode = usersNodeListUser["SkillLevels"]["SkillLevel"];
for (auto usersNodeListUserSkillLevelsSkillLevel : allSkillLevelsNode)
{
Users::User::SkillLevel skillLevelsObject;
if(!allListNodeSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = allListNodeSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!allListNodeSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(allListNodeSkillLevelsSkillLevel["Level"].asString());
if(!usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].isNull())
skillLevelsObject.skillLevelId = usersNodeListUserSkillLevelsSkillLevel["SkillLevelId"].asString();
if(!usersNodeListUserSkillLevelsSkillLevel["Level"].isNull())
skillLevelsObject.level = std::stoi(usersNodeListUserSkillLevelsSkillLevel["Level"].asString());
auto skillNode = value["Skill"];
if(!skillNode["SkillGroupId"].isNull())
skillLevelsObject.skill.skillGroupId = skillNode["SkillGroupId"].asString();

View File

@@ -0,0 +1,75 @@
/*
* 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/ModifyPrimaryTrunksOfSkillGroupRequest.h>
using AlibabaCloud::CCC::Model::ModifyPrimaryTrunksOfSkillGroupRequest;
ModifyPrimaryTrunksOfSkillGroupRequest::ModifyPrimaryTrunksOfSkillGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "ModifyPrimaryTrunksOfSkillGroup")
{
setMethod(HttpRequest::Method::Post);
}
ModifyPrimaryTrunksOfSkillGroupRequest::~ModifyPrimaryTrunksOfSkillGroupRequest()
{}
std::string ModifyPrimaryTrunksOfSkillGroupRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ModifyPrimaryTrunksOfSkillGroupRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::vector<std::string> ModifyPrimaryTrunksOfSkillGroupRequest::getPrimaryProviderName()const
{
return primaryProviderName_;
}
void ModifyPrimaryTrunksOfSkillGroupRequest::setPrimaryProviderName(const std::vector<std::string>& primaryProviderName)
{
primaryProviderName_ = primaryProviderName;
for(int dep1 = 0; dep1!= primaryProviderName.size(); dep1++) {
setParameter("PrimaryProviderName."+ std::to_string(dep1), primaryProviderName.at(dep1));
}
}
std::string ModifyPrimaryTrunksOfSkillGroupRequest::getInstanceId()const
{
return instanceId_;
}
void ModifyPrimaryTrunksOfSkillGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ModifyPrimaryTrunksOfSkillGroupRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void ModifyPrimaryTrunksOfSkillGroupRequest::setSkillGroupId(const std::string& skillGroupId)
{
skillGroupId_ = skillGroupId;
setParameter("SkillGroupId", skillGroupId);
}

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

View File

@@ -66,14 +66,14 @@ void ModifyScenarioResult::parse(const std::string &payload)
surveyObject.round = std::stoi(scenarioNodeSurveysSurvey["Round"].asString());
if(!scenarioNodeSurveysSurvey["BeebotId"].isNull())
surveyObject.beebotId = scenarioNodeSurveysSurvey["BeebotId"].asString();
auto allIntentsNode = allSurveysNode["Intents"]["IntentNode"];
for (auto allSurveysNodeIntentsIntentNode : allIntentsNode)
auto allIntentsNode = scenarioNodeSurveysSurvey["Intents"]["IntentNode"];
for (auto scenarioNodeSurveysSurveyIntentsIntentNode : allIntentsNode)
{
Scenario::Survey::IntentNode intentsObject;
if(!allSurveysNodeIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = allSurveysNodeIntentsIntentNode["NodeId"].asString();
if(!allSurveysNodeIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = allSurveysNodeIntentsIntentNode["IntentId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].isNull())
intentsObject.nodeId = scenarioNodeSurveysSurveyIntentsIntentNode["NodeId"].asString();
if(!scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].isNull())
intentsObject.intentId = scenarioNodeSurveysSurveyIntentsIntentNode["IntentId"].asString();
surveyObject.intents.push_back(intentsObject);
}
scenario_.surveys.push_back(surveyObject);

View File

@@ -38,6 +38,17 @@ void RequestLoginInfoRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::string RequestLoginInfoRequest::getUserId()const
{
return userId_;
}
void RequestLoginInfoRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
}
std::string RequestLoginInfoRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -38,6 +38,19 @@ void ResetUserStatusRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::vector<long> ResetUserStatusRequest::getRamIdList()const
{
return ramIdList_;
}
void ResetUserStatusRequest::setRamIdList(const std::vector<long>& ramIdList)
{
ramIdList_ = ramIdList;
for(int dep1 = 0; dep1!= ramIdList.size(); dep1++) {
setParameter("RamIdList."+ std::to_string(dep1), std::to_string(ramIdList.at(dep1)));
}
}
std::string ResetUserStatusRequest::getAccessKeyId()const
{
return accessKeyId_;