Add API for unregister sip phone device, masked callee, etc.

This commit is contained in:
sdk-team
2021-11-29 08:54:14 +00:00
parent 4095ec22b9
commit fe11ae7d12
28 changed files with 728 additions and 33 deletions

View File

@@ -155,6 +155,10 @@ set(ccc_public_header_model
include/alibabacloud/ccc/model/ListRecentCallDetailRecordsResult.h
include/alibabacloud/ccc/model/ListRolesRequest.h
include/alibabacloud/ccc/model/ListRolesResult.h
include/alibabacloud/ccc/model/ListSipCallRecordsRequest.h
include/alibabacloud/ccc/model/ListSipCallRecordsResult.h
include/alibabacloud/ccc/model/ListSipTracesRequest.h
include/alibabacloud/ccc/model/ListSipTracesResult.h
include/alibabacloud/ccc/model/ListSkillGroupsRequest.h
include/alibabacloud/ccc/model/ListSkillGroupsResult.h
include/alibabacloud/ccc/model/ListSkillLevelsOfUserRequest.h
@@ -380,6 +384,10 @@ set(ccc_src
src/model/ListRecentCallDetailRecordsResult.cc
src/model/ListRolesRequest.cc
src/model/ListRolesResult.cc
src/model/ListSipCallRecordsRequest.cc
src/model/ListSipCallRecordsResult.cc
src/model/ListSipTracesRequest.cc
src/model/ListSipTracesResult.cc
src/model/ListSkillGroupsRequest.cc
src/model/ListSkillGroupsResult.cc
src/model/ListSkillLevelsOfUserRequest.cc

View File

@@ -156,6 +156,10 @@
#include "model/ListRecentCallDetailRecordsResult.h"
#include "model/ListRolesRequest.h"
#include "model/ListRolesResult.h"
#include "model/ListSipCallRecordsRequest.h"
#include "model/ListSipCallRecordsResult.h"
#include "model/ListSipTracesRequest.h"
#include "model/ListSipTracesResult.h"
#include "model/ListSkillGroupsRequest.h"
#include "model/ListSkillGroupsResult.h"
#include "model/ListSkillLevelsOfUserRequest.h"
@@ -454,6 +458,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListRolesResult> ListRolesOutcome;
typedef std::future<ListRolesOutcome> ListRolesOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListRolesRequest&, const ListRolesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRolesAsyncHandler;
typedef Outcome<Error, Model::ListSipCallRecordsResult> ListSipCallRecordsOutcome;
typedef std::future<ListSipCallRecordsOutcome> ListSipCallRecordsOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListSipCallRecordsRequest&, const ListSipCallRecordsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSipCallRecordsAsyncHandler;
typedef Outcome<Error, Model::ListSipTracesResult> ListSipTracesOutcome;
typedef std::future<ListSipTracesOutcome> ListSipTracesOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListSipTracesRequest&, const ListSipTracesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSipTracesAsyncHandler;
typedef Outcome<Error, Model::ListSkillGroupsResult> ListSkillGroupsOutcome;
typedef std::future<ListSkillGroupsOutcome> ListSkillGroupsOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListSkillGroupsRequest&, const ListSkillGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSkillGroupsAsyncHandler;
@@ -792,6 +802,12 @@ namespace AlibabaCloud
ListRolesOutcome listRoles(const Model::ListRolesRequest &request)const;
void listRolesAsync(const Model::ListRolesRequest& request, const ListRolesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListRolesOutcomeCallable listRolesCallable(const Model::ListRolesRequest& request) const;
ListSipCallRecordsOutcome listSipCallRecords(const Model::ListSipCallRecordsRequest &request)const;
void listSipCallRecordsAsync(const Model::ListSipCallRecordsRequest& request, const ListSipCallRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSipCallRecordsOutcomeCallable listSipCallRecordsCallable(const Model::ListSipCallRecordsRequest& request) const;
ListSipTracesOutcome listSipTraces(const Model::ListSipTracesRequest &request)const;
void listSipTracesAsync(const Model::ListSipTracesRequest& request, const ListSipTracesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSipTracesOutcomeCallable listSipTracesCallable(const Model::ListSipTracesRequest& request) const;
ListSkillGroupsOutcome listSkillGroups(const Model::ListSkillGroupsRequest &request)const;
void listSkillGroupsAsync(const Model::ListSkillGroupsRequest& request, const ListSkillGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSkillGroupsOutcomeCallable listSkillGroupsCallable(const Model::ListSkillGroupsRequest& request) const;

View File

@@ -38,16 +38,16 @@ namespace AlibabaCloud
explicit CreateCampaignResult(const std::string &payload);
~CreateCampaignResult();
std::string getMessage()const;
std::string getCampaignId()const;
long getHttpStatusCode()const;
std::string getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string campaignId_;
long httpStatusCode_;
std::string data_;
std::string code_;
};

View File

@@ -69,27 +69,38 @@ namespace AlibabaCloud
std::string queueName;
int queueType;
};
struct CustomerEventsItem
{
struct EventSequenceItem6
{
long eventTime;
std::string event;
};
std::vector<CustomerEventsItem::EventSequenceItem6> eventSequence5;
std::string customerId;
};
std::vector<AgentEventsItem> agentEvents;
std::string skillGroupIds;
std::string calledNumber;
std::string contactType;
std::string releaseInitiator;
std::string contactDisposition;
std::string instanceId;
int satisfaction;
long startTime;
std::string contactId;
long callDuration;
std::string callingNumber;
std::vector<QueueEventsItem> queueEvents;
std::string calleeLocation;
bool recordingReady;
long releaseTime;
std::vector<CustomerEventsItem> customerEvents;
std::string skillGroupNames;
std::string satisfactionSurveyChannel;
std::string agentIds;
bool satisfactionSurveyOffered;
long establishedTime;
std::string skillGroupIds;
std::string releaseInitiator;
std::string instanceId;
long startTime;
long callDuration;
std::vector<QueueEventsItem> queueEvents;
std::string calleeLocation;
long releaseTime;
std::string satisfactionSurveyChannel;
std::string agentIds;
std::string callerLocation;
std::string agentNames;
std::vector<IvrEventsItem> ivrEvents;

View File

@@ -50,7 +50,6 @@ namespace AlibabaCloud
bool simulation;
std::string campaignId;
std::string state;
long completedRate;
long actualEndTime;
long planedEndTime;
std::string queueName;

View File

@@ -51,7 +51,6 @@ namespace AlibabaCloud
bool simulation;
std::string campaignId;
std::string state;
long completedRate;
long actualEndTime;
long planedEndTime;
std::string queueName;

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.
*/
#ifndef ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSREQUEST_H_
#define ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT ListSipCallRecordsRequest : public RpcServiceRequest
{
public:
ListSipCallRecordsRequest();
~ListSipCallRecordsRequest();
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getContactIdList()const;
void setContactIdList(const std::string& contactIdList);
private:
std::string instanceId_;
std::string contactIdList_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSREQUEST_H_

View File

@@ -0,0 +1,76 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT ListSipCallRecordsResult : public ServiceResult
{
public:
struct SipCallRecords
{
std::string callee;
std::string lastResponseText;
std::string callerClusterId;
std::string calleeClusterId;
std::string instanceId;
std::string callId;
int releaseReasonCode;
std::string contactId;
long ringTime;
long inviteTime;
std::string earlyMediaText;
long releasedTime;
std::string caller;
int lastResponseCode;
long establishedTime;
std::string earlyMediaUrl;
};
ListSipCallRecordsResult();
explicit ListSipCallRecordsResult(const std::string &payload);
~ListSipCallRecordsResult();
std::string getMessage()const;
int getHttpStatusCode()const;
std::vector<SipCallRecords> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
std::vector<SipCallRecords> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_LISTSIPCALLRECORDSRESULT_H_

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.
*/
#ifndef ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESREQUEST_H_
#define ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT ListSipTracesRequest : public RpcServiceRequest
{
public:
ListSipTracesRequest();
~ListSipTracesRequest();
std::string getCallId()const;
void setCallId(const std::string& callId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string callId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT ListSipTracesResult : public ServiceResult
{
public:
struct CallTraces
{
std::string destinationNodeIp;
std::string callId;
std::string firstLine;
std::string payload;
std::string contactId;
long timestamp;
std::string sourceNodeIp;
};
ListSipTracesResult();
explicit ListSipTracesResult(const std::string &payload);
~ListSipTracesResult();
std::string getMessage()const;
int getHttpStatusCode()const;
std::vector<CallTraces> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
std::vector<CallTraces> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_LISTSIPTRACESRESULT_H_

View File

@@ -38,8 +38,8 @@ namespace AlibabaCloud
{
std::string description;
std::string skillGroupName;
std::string instanceId;
int phoneNumberCount;
std::string instanceId;
int userCount;
std::string displayName;
std::string skillGroupId;

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
std::string getCallee()const;
void setCallee(const std::string& callee);
std::string getMaskedCallee()const;
void setMaskedCallee(const std::string& maskedCallee);
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getDeviceId()const;
@@ -52,6 +54,7 @@ namespace AlibabaCloud
private:
std::string callee_;
std::string maskedCallee_;
std::string userId_;
std::string deviceId_;
std::string tags_;

View File

@@ -39,6 +39,8 @@ namespace AlibabaCloud
void setContactFlowId(const std::string& contactFlowId);
std::string getCallee()const;
void setCallee(const std::string& callee);
std::string getMaskedCallee()const;
void setMaskedCallee(const std::string& maskedCallee);
std::string getContactFlowVariables()const;
void setContactFlowVariables(const std::string& contactFlowVariables);
std::string getTags()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
private:
std::string contactFlowId_;
std::string callee_;
std::string maskedCallee_;
std::string contactFlowVariables_;
std::string tags_;
int timeoutSeconds_;

View File

@@ -2463,6 +2463,78 @@ CCCClient::ListRolesOutcomeCallable CCCClient::listRolesCallable(const ListRoles
return task->get_future();
}
CCCClient::ListSipCallRecordsOutcome CCCClient::listSipCallRecords(const ListSipCallRecordsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSipCallRecordsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSipCallRecordsOutcome(ListSipCallRecordsResult(outcome.result()));
else
return ListSipCallRecordsOutcome(outcome.error());
}
void CCCClient::listSipCallRecordsAsync(const ListSipCallRecordsRequest& request, const ListSipCallRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSipCallRecords(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListSipCallRecordsOutcomeCallable CCCClient::listSipCallRecordsCallable(const ListSipCallRecordsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSipCallRecordsOutcome()>>(
[this, request]()
{
return this->listSipCallRecords(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListSipTracesOutcome CCCClient::listSipTraces(const ListSipTracesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSipTracesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSipTracesOutcome(ListSipTracesResult(outcome.result()));
else
return ListSipTracesOutcome(outcome.error());
}
void CCCClient::listSipTracesAsync(const ListSipTracesRequest& request, const ListSipTracesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSipTraces(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::ListSipTracesOutcomeCallable CCCClient::listSipTracesCallable(const ListSipTracesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSipTracesOutcome()>>(
[this, request]()
{
return this->listSipTraces(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ListSkillGroupsOutcome CCCClient::listSkillGroups(const ListSkillGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -39,8 +39,8 @@ void CreateCampaignResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["CampaignId"].isNull())
campaignId_ = value["CampaignId"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
@@ -55,16 +55,16 @@ std::string CreateCampaignResult::getMessage()const
return message_;
}
std::string CreateCampaignResult::getCampaignId()const
{
return campaignId_;
}
long CreateCampaignResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string CreateCampaignResult::getData()const
{
return data_;
}
std::string CreateCampaignResult::getCode()const
{
return code_;

View File

@@ -146,6 +146,24 @@ void GetCallDetailRecordResult::parse(const std::string &payload)
}
data_.queueEvents.push_back(queueEventsItemObject);
}
auto allCustomerEventsNode = dataNode["CustomerEvents"]["CustomerEventsItem"];
for (auto dataNodeCustomerEventsCustomerEventsItem : allCustomerEventsNode)
{
Data::CustomerEventsItem customerEventsItemObject;
if(!dataNodeCustomerEventsCustomerEventsItem["CustomerId"].isNull())
customerEventsItemObject.customerId = dataNodeCustomerEventsCustomerEventsItem["CustomerId"].asString();
auto allEventSequence5Node = dataNodeCustomerEventsCustomerEventsItem["EventSequence"]["EventSequenceItem"];
for (auto dataNodeCustomerEventsCustomerEventsItemEventSequenceEventSequenceItem : allEventSequence5Node)
{
Data::CustomerEventsItem::EventSequenceItem6 eventSequence5Object;
if(!dataNodeCustomerEventsCustomerEventsItemEventSequenceEventSequenceItem["Event"].isNull())
eventSequence5Object.event = dataNodeCustomerEventsCustomerEventsItemEventSequenceEventSequenceItem["Event"].asString();
if(!dataNodeCustomerEventsCustomerEventsItemEventSequenceEventSequenceItem["EventTime"].isNull())
eventSequence5Object.eventTime = std::stol(dataNodeCustomerEventsCustomerEventsItemEventSequenceEventSequenceItem["EventTime"].asString());
customerEventsItemObject.eventSequence5.push_back(eventSequence5Object);
}
data_.customerEvents.push_back(customerEventsItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())

View File

@@ -50,8 +50,6 @@ void GetCampaignResult::parse(const std::string &payload)
data_.casesUncompleted = std::stol(dataNode["CasesUncompleted"].asString());
if(!dataNode["CasesConnected"].isNull())
data_.casesConnected = std::stol(dataNode["CasesConnected"].asString());
if(!dataNode["CompletedRate"].isNull())
data_.completedRate = std::stol(dataNode["CompletedRate"].asString());
if(!dataNode["MaxAttemptCount"].isNull())
data_.maxAttemptCount = std::stol(dataNode["MaxAttemptCount"].asString());
if(!dataNode["MinAttemptInterval"].isNull())

View File

@@ -40,10 +40,10 @@ void GetMonoRecordingResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["FileName"].isNull())
data_.fileName = dataNode["FileName"].asString();
if(!dataNode["FileUrl"].isNull())
data_.fileUrl = dataNode["FileUrl"].asString();
if(!dataNode["FileName"].isNull())
data_.fileName = dataNode["FileName"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())

View File

@@ -60,8 +60,6 @@ void ListCampaignsResult::parse(const std::string &payload)
listItemObject.casesUncompleted = std::stol(dataNodeListlistItem["CasesUncompleted"].asString());
if(!dataNodeListlistItem["CasesConnected"].isNull())
listItemObject.casesConnected = std::stol(dataNodeListlistItem["CasesConnected"].asString());
if(!dataNodeListlistItem["CompletedRate"].isNull())
listItemObject.completedRate = std::stol(dataNodeListlistItem["CompletedRate"].asString());
if(!dataNodeListlistItem["MaxAttemptCount"].isNull())
listItemObject.maxAttemptCount = std::stol(dataNodeListlistItem["MaxAttemptCount"].asString());
if(!dataNodeListlistItem["MinAttemptInterval"].isNull())

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/ListSipCallRecordsRequest.h>
using AlibabaCloud::CCC::Model::ListSipCallRecordsRequest;
ListSipCallRecordsRequest::ListSipCallRecordsRequest() :
RpcServiceRequest("ccc", "2020-07-01", "ListSipCallRecords")
{
setMethod(HttpRequest::Method::Post);
}
ListSipCallRecordsRequest::~ListSipCallRecordsRequest()
{}
std::string ListSipCallRecordsRequest::getInstanceId()const
{
return instanceId_;
}
void ListSipCallRecordsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListSipCallRecordsRequest::getContactIdList()const
{
return contactIdList_;
}
void ListSipCallRecordsRequest::setContactIdList(const std::string& contactIdList)
{
contactIdList_ = contactIdList;
setParameter("ContactIdList", contactIdList);
}

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/ListSipCallRecordsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListSipCallRecordsResult::ListSipCallRecordsResult() :
ServiceResult()
{}
ListSipCallRecordsResult::ListSipCallRecordsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSipCallRecordsResult::~ListSipCallRecordsResult()
{}
void ListSipCallRecordsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["sipCallRecords"];
for (auto valueDatasipCallRecords : allDataNode)
{
SipCallRecords dataObject;
if(!valueDatasipCallRecords["InstanceId"].isNull())
dataObject.instanceId = valueDatasipCallRecords["InstanceId"].asString();
if(!valueDatasipCallRecords["CallId"].isNull())
dataObject.callId = valueDatasipCallRecords["CallId"].asString();
if(!valueDatasipCallRecords["ContactId"].isNull())
dataObject.contactId = valueDatasipCallRecords["ContactId"].asString();
if(!valueDatasipCallRecords["Caller"].isNull())
dataObject.caller = valueDatasipCallRecords["Caller"].asString();
if(!valueDatasipCallRecords["Callee"].isNull())
dataObject.callee = valueDatasipCallRecords["Callee"].asString();
if(!valueDatasipCallRecords["CallerClusterId"].isNull())
dataObject.callerClusterId = valueDatasipCallRecords["CallerClusterId"].asString();
if(!valueDatasipCallRecords["CalleeClusterId"].isNull())
dataObject.calleeClusterId = valueDatasipCallRecords["CalleeClusterId"].asString();
if(!valueDatasipCallRecords["LastResponseCode"].isNull())
dataObject.lastResponseCode = std::stoi(valueDatasipCallRecords["LastResponseCode"].asString());
if(!valueDatasipCallRecords["LastResponseText"].isNull())
dataObject.lastResponseText = valueDatasipCallRecords["LastResponseText"].asString();
if(!valueDatasipCallRecords["InviteTime"].isNull())
dataObject.inviteTime = std::stol(valueDatasipCallRecords["InviteTime"].asString());
if(!valueDatasipCallRecords["RingTime"].isNull())
dataObject.ringTime = std::stol(valueDatasipCallRecords["RingTime"].asString());
if(!valueDatasipCallRecords["EstablishedTime"].isNull())
dataObject.establishedTime = std::stol(valueDatasipCallRecords["EstablishedTime"].asString());
if(!valueDatasipCallRecords["ReleasedTime"].isNull())
dataObject.releasedTime = std::stol(valueDatasipCallRecords["ReleasedTime"].asString());
if(!valueDatasipCallRecords["ReleaseReasonCode"].isNull())
dataObject.releaseReasonCode = std::stoi(valueDatasipCallRecords["ReleaseReasonCode"].asString());
if(!valueDatasipCallRecords["EarlyMediaUrl"].isNull())
dataObject.earlyMediaUrl = valueDatasipCallRecords["EarlyMediaUrl"].asString();
if(!valueDatasipCallRecords["EarlyMediaText"].isNull())
dataObject.earlyMediaText = valueDatasipCallRecords["EarlyMediaText"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListSipCallRecordsResult::getMessage()const
{
return message_;
}
int ListSipCallRecordsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListSipCallRecordsResult::SipCallRecords> ListSipCallRecordsResult::getData()const
{
return data_;
}
std::string ListSipCallRecordsResult::getCode()const
{
return code_;
}

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/ListSipTracesRequest.h>
using AlibabaCloud::CCC::Model::ListSipTracesRequest;
ListSipTracesRequest::ListSipTracesRequest() :
RpcServiceRequest("ccc", "2020-07-01", "ListSipTraces")
{
setMethod(HttpRequest::Method::Post);
}
ListSipTracesRequest::~ListSipTracesRequest()
{}
std::string ListSipTracesRequest::getCallId()const
{
return callId_;
}
void ListSipTracesRequest::setCallId(const std::string& callId)
{
callId_ = callId;
setParameter("CallId", callId);
}
std::string ListSipTracesRequest::getInstanceId()const
{
return instanceId_;
}
void ListSipTracesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/ListSipTracesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
ListSipTracesResult::ListSipTracesResult() :
ServiceResult()
{}
ListSipTracesResult::ListSipTracesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSipTracesResult::~ListSipTracesResult()
{}
void ListSipTracesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["CallTraces"];
for (auto valueDataCallTraces : allDataNode)
{
CallTraces dataObject;
if(!valueDataCallTraces["CallId"].isNull())
dataObject.callId = valueDataCallTraces["CallId"].asString();
if(!valueDataCallTraces["ContactId"].isNull())
dataObject.contactId = valueDataCallTraces["ContactId"].asString();
if(!valueDataCallTraces["FirstLine"].isNull())
dataObject.firstLine = valueDataCallTraces["FirstLine"].asString();
if(!valueDataCallTraces["DestinationNodeIp"].isNull())
dataObject.destinationNodeIp = valueDataCallTraces["DestinationNodeIp"].asString();
if(!valueDataCallTraces["SourceNodeIp"].isNull())
dataObject.sourceNodeIp = valueDataCallTraces["SourceNodeIp"].asString();
if(!valueDataCallTraces["Payload"].isNull())
dataObject.payload = valueDataCallTraces["Payload"].asString();
if(!valueDataCallTraces["Timestamp"].isNull())
dataObject.timestamp = std::stol(valueDataCallTraces["Timestamp"].asString());
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListSipTracesResult::getMessage()const
{
return message_;
}
int ListSipTracesResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::vector<ListSipTracesResult::CallTraces> ListSipTracesResult::getData()const
{
return data_;
}
std::string ListSipTracesResult::getCode()const
{
return code_;
}

View File

@@ -50,12 +50,10 @@ void ListSkillGroupsResult::parse(const std::string &payload)
for (auto dataNodeListSkillGroup : allListNode)
{
Data::SkillGroup skillGroupObject;
if(!dataNodeListSkillGroup["Description"].isNull())
skillGroupObject.description = dataNodeListSkillGroup["Description"].asString();
if(!dataNodeListSkillGroup["DisplayName"].isNull())
skillGroupObject.displayName = dataNodeListSkillGroup["DisplayName"].asString();
if(!dataNodeListSkillGroup["InstanceId"].isNull())
skillGroupObject.instanceId = dataNodeListSkillGroup["InstanceId"].asString();
if(!dataNodeListSkillGroup["Description"].isNull())
skillGroupObject.description = dataNodeListSkillGroup["Description"].asString();
if(!dataNodeListSkillGroup["PhoneNumberCount"].isNull())
skillGroupObject.phoneNumberCount = std::stoi(dataNodeListSkillGroup["PhoneNumberCount"].asString());
if(!dataNodeListSkillGroup["SkillGroupId"].isNull())
@@ -64,6 +62,8 @@ void ListSkillGroupsResult::parse(const std::string &payload)
skillGroupObject.skillGroupName = dataNodeListSkillGroup["SkillGroupName"].asString();
if(!dataNodeListSkillGroup["UserCount"].isNull())
skillGroupObject.userCount = std::stoi(dataNodeListSkillGroup["UserCount"].asString());
if(!dataNodeListSkillGroup["InstanceId"].isNull())
skillGroupObject.instanceId = dataNodeListSkillGroup["InstanceId"].asString();
data_.list.push_back(skillGroupObject);
}
if(!value["Code"].isNull())

View File

@@ -38,6 +38,17 @@ void MakeCallRequest::setCallee(const std::string& callee)
setParameter("Callee", callee);
}
std::string MakeCallRequest::getMaskedCallee()const
{
return maskedCallee_;
}
void MakeCallRequest::setMaskedCallee(const std::string& maskedCallee)
{
maskedCallee_ = maskedCallee;
setParameter("MaskedCallee", maskedCallee);
}
std::string MakeCallRequest::getUserId()const
{
return userId_;

View File

@@ -49,6 +49,17 @@ void StartPredictiveCallRequest::setCallee(const std::string& callee)
setParameter("Callee", callee);
}
std::string StartPredictiveCallRequest::getMaskedCallee()const
{
return maskedCallee_;
}
void StartPredictiveCallRequest::setMaskedCallee(const std::string& maskedCallee)
{
maskedCallee_ = maskedCallee;
setParameter("MaskedCallee", maskedCallee);
}
std::string StartPredictiveCallRequest::getContactFlowVariables()const
{
return contactFlowVariables_;