From 482c28eea74544075216e9c8d9e09db00edab49b Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 25 May 2021 08:43:02 +0000 Subject: [PATCH] Export new API for IVR tracking. --- CHANGELOG | 3 + VERSION | 2 +- ccc/CMakeLists.txt | 4 + ccc/include/alibabacloud/ccc/CCCClient.h | 8 ++ .../ccc/model/ListIvrTrackingDetailsRequest.h | 57 +++++++++ .../ccc/model/ListIvrTrackingDetailsResult.h | 83 +++++++++++++ ccc/src/CCCClient.cc | 36 ++++++ .../model/ListIvrTrackingDetailsRequest.cc | 73 +++++++++++ ccc/src/model/ListIvrTrackingDetailsResult.cc | 115 ++++++++++++++++++ 9 files changed, 380 insertions(+), 1 deletion(-) create mode 100644 ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsRequest.h create mode 100644 ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsResult.h create mode 100644 ccc/src/model/ListIvrTrackingDetailsRequest.cc create mode 100644 ccc/src/model/ListIvrTrackingDetailsResult.cc diff --git a/CHANGELOG b/CHANGELOG index f2e6d2f16..fbb0de13e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-05-25 Version: 1.36.756 +- Export new API for IVR tracking. + 2021-05-24 Version: 1.36.755 - Support a2a openapi. diff --git a/VERSION b/VERSION index 3b99917c7..f87c6319d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.755 \ No newline at end of file +1.36.756 \ No newline at end of file diff --git a/ccc/CMakeLists.txt b/ccc/CMakeLists.txt index 1a0adb4a3..c45d3e29e 100644 --- a/ccc/CMakeLists.txt +++ b/ccc/CMakeLists.txt @@ -115,6 +115,8 @@ set(ccc_public_header_model include/alibabacloud/ccc/model/ListIntervalInstanceReportResult.h include/alibabacloud/ccc/model/ListIntervalSkillGroupReportRequest.h include/alibabacloud/ccc/model/ListIntervalSkillGroupReportResult.h + include/alibabacloud/ccc/model/ListIvrTrackingDetailsRequest.h + include/alibabacloud/ccc/model/ListIvrTrackingDetailsResult.h include/alibabacloud/ccc/model/ListOutboundNumbersOfUserRequest.h include/alibabacloud/ccc/model/ListOutboundNumbersOfUserResult.h include/alibabacloud/ccc/model/ListPersonalNumbersOfUserRequest.h @@ -294,6 +296,8 @@ set(ccc_src src/model/ListIntervalInstanceReportResult.cc src/model/ListIntervalSkillGroupReportRequest.cc src/model/ListIntervalSkillGroupReportResult.cc + src/model/ListIvrTrackingDetailsRequest.cc + src/model/ListIvrTrackingDetailsResult.cc src/model/ListOutboundNumbersOfUserRequest.cc src/model/ListOutboundNumbersOfUserResult.cc src/model/ListPersonalNumbersOfUserRequest.cc diff --git a/ccc/include/alibabacloud/ccc/CCCClient.h b/ccc/include/alibabacloud/ccc/CCCClient.h index 868c1f3f6..4e85f8bdd 100644 --- a/ccc/include/alibabacloud/ccc/CCCClient.h +++ b/ccc/include/alibabacloud/ccc/CCCClient.h @@ -116,6 +116,8 @@ #include "model/ListIntervalInstanceReportResult.h" #include "model/ListIntervalSkillGroupReportRequest.h" #include "model/ListIntervalSkillGroupReportResult.h" +#include "model/ListIvrTrackingDetailsRequest.h" +#include "model/ListIvrTrackingDetailsResult.h" #include "model/ListOutboundNumbersOfUserRequest.h" #include "model/ListOutboundNumbersOfUserResult.h" #include "model/ListPersonalNumbersOfUserRequest.h" @@ -348,6 +350,9 @@ namespace AlibabaCloud typedef Outcome ListIntervalSkillGroupReportOutcome; typedef std::future ListIntervalSkillGroupReportOutcomeCallable; typedef std::function&)> ListIntervalSkillGroupReportAsyncHandler; + typedef Outcome ListIvrTrackingDetailsOutcome; + typedef std::future ListIvrTrackingDetailsOutcomeCallable; + typedef std::function&)> ListIvrTrackingDetailsAsyncHandler; typedef Outcome ListOutboundNumbersOfUserOutcome; typedef std::future ListOutboundNumbersOfUserOutcomeCallable; typedef std::function&)> ListOutboundNumbersOfUserAsyncHandler; @@ -617,6 +622,9 @@ namespace AlibabaCloud ListIntervalSkillGroupReportOutcome listIntervalSkillGroupReport(const Model::ListIntervalSkillGroupReportRequest &request)const; void listIntervalSkillGroupReportAsync(const Model::ListIntervalSkillGroupReportRequest& request, const ListIntervalSkillGroupReportAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListIntervalSkillGroupReportOutcomeCallable listIntervalSkillGroupReportCallable(const Model::ListIntervalSkillGroupReportRequest& request) const; + ListIvrTrackingDetailsOutcome listIvrTrackingDetails(const Model::ListIvrTrackingDetailsRequest &request)const; + void listIvrTrackingDetailsAsync(const Model::ListIvrTrackingDetailsRequest& request, const ListIvrTrackingDetailsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListIvrTrackingDetailsOutcomeCallable listIvrTrackingDetailsCallable(const Model::ListIvrTrackingDetailsRequest& request) const; ListOutboundNumbersOfUserOutcome listOutboundNumbersOfUser(const Model::ListOutboundNumbersOfUserRequest &request)const; void listOutboundNumbersOfUserAsync(const Model::ListOutboundNumbersOfUserRequest& request, const ListOutboundNumbersOfUserAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListOutboundNumbersOfUserOutcomeCallable listOutboundNumbersOfUserCallable(const Model::ListOutboundNumbersOfUserRequest& request) const; diff --git a/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsRequest.h b/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsRequest.h new file mode 100644 index 000000000..d4ab3601b --- /dev/null +++ b/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsRequest.h @@ -0,0 +1,57 @@ +/* + * 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_LISTIVRTRACKINGDETAILSREQUEST_H_ +#define ALIBABACLOUD_CCC_MODEL_LISTIVRTRACKINGDETAILSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CCC + { + namespace Model + { + class ALIBABACLOUD_CCC_EXPORT ListIvrTrackingDetailsRequest : public RpcServiceRequest + { + + public: + ListIvrTrackingDetailsRequest(); + ~ListIvrTrackingDetailsRequest(); + + std::string getContactId()const; + void setContactId(const std::string& contactId); + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + std::string contactId_; + int pageNumber_; + std::string instanceId_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CCC_MODEL_LISTIVRTRACKINGDETAILSREQUEST_H_ \ No newline at end of file diff --git a/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsResult.h b/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsResult.h new file mode 100644 index 000000000..4f5e31fa3 --- /dev/null +++ b/ccc/include/alibabacloud/ccc/model/ListIvrTrackingDetailsResult.h @@ -0,0 +1,83 @@ +/* + * 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_LISTIVRTRACKINGDETAILSRESULT_H_ +#define ALIBABACLOUD_CCC_MODEL_LISTIVRTRACKINGDETAILSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CCC + { + namespace Model + { + class ALIBABACLOUD_CCC_EXPORT ListIvrTrackingDetailsResult : public ServiceResult + { + public: + struct Data + { + struct IvrTracking + { + std::string callee; + std::string instance; + std::string nodeName; + long enterTime; + std::string contactId; + std::string nodeExitCode; + std::string channelId; + std::string channelVariables; + std::string flowId; + long leaveTime; + std::string nodeProperties; + std::string caller; + std::string flowName; + std::string nodeType; + std::string nodeId; + std::string nodeVariables; + }; + int totalCount; + int pageSize; + int pageNumber; + std::vector list; + }; + + + ListIvrTrackingDetailsResult(); + explicit ListIvrTrackingDetailsResult(const std::string &payload); + ~ListIvrTrackingDetailsResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CCC_MODEL_LISTIVRTRACKINGDETAILSRESULT_H_ \ No newline at end of file diff --git a/ccc/src/CCCClient.cc b/ccc/src/CCCClient.cc index fac3030c3..03664f2e4 100644 --- a/ccc/src/CCCClient.cc +++ b/ccc/src/CCCClient.cc @@ -1743,6 +1743,42 @@ CCCClient::ListIntervalSkillGroupReportOutcomeCallable CCCClient::listIntervalSk return task->get_future(); } +CCCClient::ListIvrTrackingDetailsOutcome CCCClient::listIvrTrackingDetails(const ListIvrTrackingDetailsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListIvrTrackingDetailsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListIvrTrackingDetailsOutcome(ListIvrTrackingDetailsResult(outcome.result())); + else + return ListIvrTrackingDetailsOutcome(outcome.error()); +} + +void CCCClient::listIvrTrackingDetailsAsync(const ListIvrTrackingDetailsRequest& request, const ListIvrTrackingDetailsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listIvrTrackingDetails(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CCCClient::ListIvrTrackingDetailsOutcomeCallable CCCClient::listIvrTrackingDetailsCallable(const ListIvrTrackingDetailsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listIvrTrackingDetails(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CCCClient::ListOutboundNumbersOfUserOutcome CCCClient::listOutboundNumbersOfUser(const ListOutboundNumbersOfUserRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ccc/src/model/ListIvrTrackingDetailsRequest.cc b/ccc/src/model/ListIvrTrackingDetailsRequest.cc new file mode 100644 index 000000000..a1d4b06a5 --- /dev/null +++ b/ccc/src/model/ListIvrTrackingDetailsRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::CCC::Model::ListIvrTrackingDetailsRequest; + +ListIvrTrackingDetailsRequest::ListIvrTrackingDetailsRequest() : + RpcServiceRequest("ccc", "2020-07-01", "ListIvrTrackingDetails") +{ + setMethod(HttpRequest::Method::Post); +} + +ListIvrTrackingDetailsRequest::~ListIvrTrackingDetailsRequest() +{} + +std::string ListIvrTrackingDetailsRequest::getContactId()const +{ + return contactId_; +} + +void ListIvrTrackingDetailsRequest::setContactId(const std::string& contactId) +{ + contactId_ = contactId; + setParameter("ContactId", contactId); +} + +int ListIvrTrackingDetailsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListIvrTrackingDetailsRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string ListIvrTrackingDetailsRequest::getInstanceId()const +{ + return instanceId_; +} + +void ListIvrTrackingDetailsRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + +int ListIvrTrackingDetailsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListIvrTrackingDetailsRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/ccc/src/model/ListIvrTrackingDetailsResult.cc b/ccc/src/model/ListIvrTrackingDetailsResult.cc new file mode 100644 index 000000000..2ec7007c0 --- /dev/null +++ b/ccc/src/model/ListIvrTrackingDetailsResult.cc @@ -0,0 +1,115 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::CCC; +using namespace AlibabaCloud::CCC::Model; + +ListIvrTrackingDetailsResult::ListIvrTrackingDetailsResult() : + ServiceResult() +{} + +ListIvrTrackingDetailsResult::ListIvrTrackingDetailsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListIvrTrackingDetailsResult::~ListIvrTrackingDetailsResult() +{} + +void ListIvrTrackingDetailsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["PageNumber"].isNull()) + data_.pageNumber = std::stoi(dataNode["PageNumber"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + auto allListNode = dataNode["List"]["IvrTracking"]; + for (auto dataNodeListIvrTracking : allListNode) + { + Data::IvrTracking ivrTrackingObject; + if(!dataNodeListIvrTracking["Callee"].isNull()) + ivrTrackingObject.callee = dataNodeListIvrTracking["Callee"].asString(); + if(!dataNodeListIvrTracking["Caller"].isNull()) + ivrTrackingObject.caller = dataNodeListIvrTracking["Caller"].asString(); + if(!dataNodeListIvrTracking["ChannelId"].isNull()) + ivrTrackingObject.channelId = dataNodeListIvrTracking["ChannelId"].asString(); + if(!dataNodeListIvrTracking["ChannelVariables"].isNull()) + ivrTrackingObject.channelVariables = dataNodeListIvrTracking["ChannelVariables"].asString(); + if(!dataNodeListIvrTracking["ContactId"].isNull()) + ivrTrackingObject.contactId = dataNodeListIvrTracking["ContactId"].asString(); + if(!dataNodeListIvrTracking["EnterTime"].isNull()) + ivrTrackingObject.enterTime = std::stol(dataNodeListIvrTracking["EnterTime"].asString()); + if(!dataNodeListIvrTracking["FlowId"].isNull()) + ivrTrackingObject.flowId = dataNodeListIvrTracking["FlowId"].asString(); + if(!dataNodeListIvrTracking["FlowName"].isNull()) + ivrTrackingObject.flowName = dataNodeListIvrTracking["FlowName"].asString(); + if(!dataNodeListIvrTracking["Instance"].isNull()) + ivrTrackingObject.instance = dataNodeListIvrTracking["Instance"].asString(); + if(!dataNodeListIvrTracking["LeaveTime"].isNull()) + ivrTrackingObject.leaveTime = std::stol(dataNodeListIvrTracking["LeaveTime"].asString()); + if(!dataNodeListIvrTracking["NodeExitCode"].isNull()) + ivrTrackingObject.nodeExitCode = dataNodeListIvrTracking["NodeExitCode"].asString(); + if(!dataNodeListIvrTracking["NodeId"].isNull()) + ivrTrackingObject.nodeId = dataNodeListIvrTracking["NodeId"].asString(); + if(!dataNodeListIvrTracking["NodeName"].isNull()) + ivrTrackingObject.nodeName = dataNodeListIvrTracking["NodeName"].asString(); + if(!dataNodeListIvrTracking["NodeProperties"].isNull()) + ivrTrackingObject.nodeProperties = dataNodeListIvrTracking["NodeProperties"].asString(); + if(!dataNodeListIvrTracking["NodeType"].isNull()) + ivrTrackingObject.nodeType = dataNodeListIvrTracking["NodeType"].asString(); + if(!dataNodeListIvrTracking["NodeVariables"].isNull()) + ivrTrackingObject.nodeVariables = dataNodeListIvrTracking["NodeVariables"].asString(); + data_.list.push_back(ivrTrackingObject); + } + 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 ListIvrTrackingDetailsResult::getMessage()const +{ + return message_; +} + +int ListIvrTrackingDetailsResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +ListIvrTrackingDetailsResult::Data ListIvrTrackingDetailsResult::getData()const +{ + return data_; +} + +std::string ListIvrTrackingDetailsResult::getCode()const +{ + return code_; +} +