diff --git a/CHANGELOG b/CHANGELOG index 353132337..48a314886 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2021-08-20 Version: 1.36.858 +- Update Dyvmsapi SDK. +- Add GetCallInfo. + 2021-08-19 Version: 1.36.857 - Add SupportSessionManager for DescribeCloudAssistantStatus. diff --git a/VERSION b/VERSION index f1e7a8b2e..58d15ab90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.857 \ No newline at end of file +1.36.858 \ No newline at end of file diff --git a/dyvmsapi/CMakeLists.txt b/dyvmsapi/CMakeLists.txt index 55ee39f30..d29e6cfa3 100644 --- a/dyvmsapi/CMakeLists.txt +++ b/dyvmsapi/CMakeLists.txt @@ -55,6 +55,8 @@ set(dyvmsapi_public_header_model include/alibabacloud/dyvmsapi/model/DoubleCallSeatResult.h include/alibabacloud/dyvmsapi/model/ExecuteCallTaskRequest.h include/alibabacloud/dyvmsapi/model/ExecuteCallTaskResult.h + include/alibabacloud/dyvmsapi/model/GetCallInfoRequest.h + include/alibabacloud/dyvmsapi/model/GetCallInfoResult.h include/alibabacloud/dyvmsapi/model/GetHotlineQualificationByOrderRequest.h include/alibabacloud/dyvmsapi/model/GetHotlineQualificationByOrderResult.h include/alibabacloud/dyvmsapi/model/GetRtcTokenRequest.h @@ -174,6 +176,8 @@ set(dyvmsapi_src src/model/DoubleCallSeatResult.cc src/model/ExecuteCallTaskRequest.cc src/model/ExecuteCallTaskResult.cc + src/model/GetCallInfoRequest.cc + src/model/GetCallInfoResult.cc src/model/GetHotlineQualificationByOrderRequest.cc src/model/GetHotlineQualificationByOrderResult.cc src/model/GetRtcTokenRequest.cc diff --git a/dyvmsapi/include/alibabacloud/dyvmsapi/DyvmsapiClient.h b/dyvmsapi/include/alibabacloud/dyvmsapi/DyvmsapiClient.h index 28000b306..abb4a7dd1 100644 --- a/dyvmsapi/include/alibabacloud/dyvmsapi/DyvmsapiClient.h +++ b/dyvmsapi/include/alibabacloud/dyvmsapi/DyvmsapiClient.h @@ -56,6 +56,8 @@ #include "model/DoubleCallSeatResult.h" #include "model/ExecuteCallTaskRequest.h" #include "model/ExecuteCallTaskResult.h" +#include "model/GetCallInfoRequest.h" +#include "model/GetCallInfoResult.h" #include "model/GetHotlineQualificationByOrderRequest.h" #include "model/GetHotlineQualificationByOrderResult.h" #include "model/GetRtcTokenRequest.h" @@ -198,6 +200,9 @@ namespace AlibabaCloud typedef Outcome ExecuteCallTaskOutcome; typedef std::future ExecuteCallTaskOutcomeCallable; typedef std::function&)> ExecuteCallTaskAsyncHandler; + typedef Outcome GetCallInfoOutcome; + typedef std::future GetCallInfoOutcomeCallable; + typedef std::function&)> GetCallInfoAsyncHandler; typedef Outcome GetHotlineQualificationByOrderOutcome; typedef std::future GetHotlineQualificationByOrderOutcomeCallable; typedef std::function&)> GetHotlineQualificationByOrderAsyncHandler; @@ -377,6 +382,9 @@ namespace AlibabaCloud ExecuteCallTaskOutcome executeCallTask(const Model::ExecuteCallTaskRequest &request)const; void executeCallTaskAsync(const Model::ExecuteCallTaskRequest& request, const ExecuteCallTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ExecuteCallTaskOutcomeCallable executeCallTaskCallable(const Model::ExecuteCallTaskRequest& request) const; + GetCallInfoOutcome getCallInfo(const Model::GetCallInfoRequest &request)const; + void getCallInfoAsync(const Model::GetCallInfoRequest& request, const GetCallInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetCallInfoOutcomeCallable getCallInfoCallable(const Model::GetCallInfoRequest& request) const; GetHotlineQualificationByOrderOutcome getHotlineQualificationByOrder(const Model::GetHotlineQualificationByOrderRequest &request)const; void getHotlineQualificationByOrderAsync(const Model::GetHotlineQualificationByOrderRequest& request, const GetHotlineQualificationByOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetHotlineQualificationByOrderOutcomeCallable getHotlineQualificationByOrderCallable(const Model::GetHotlineQualificationByOrderRequest& request) const; diff --git a/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoRequest.h b/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoRequest.h new file mode 100644 index 000000000..ae5757b0f --- /dev/null +++ b/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFOREQUEST_H_ +#define ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dyvmsapi + { + namespace Model + { + class ALIBABACLOUD_DYVMSAPI_EXPORT GetCallInfoRequest : public RpcServiceRequest + { + + public: + GetCallInfoRequest(); + ~GetCallInfoRequest(); + + std::string getRtcId()const; + void setRtcId(const std::string& rtcId); + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + + private: + std::string rtcId_; + long resourceOwnerId_; + std::string accessKeyId_; + std::string resourceOwnerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFOREQUEST_H_ \ No newline at end of file diff --git a/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoResult.h b/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoResult.h new file mode 100644 index 000000000..9f932e428 --- /dev/null +++ b/dyvmsapi/include/alibabacloud/dyvmsapi/model/GetCallInfoResult.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFORESULT_H_ +#define ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dyvmsapi + { + namespace Model + { + class ALIBABACLOUD_DYVMSAPI_EXPORT GetCallInfoResult : public ServiceResult + { + public: + struct Data + { + std::string status; + std::string channelId; + }; + + + GetCallInfoResult(); + explicit GetCallInfoResult(const std::string &payload); + ~GetCallInfoResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DYVMSAPI_MODEL_GETCALLINFORESULT_H_ \ No newline at end of file diff --git a/dyvmsapi/src/DyvmsapiClient.cc b/dyvmsapi/src/DyvmsapiClient.cc index 62d062b73..6f36e3e80 100644 --- a/dyvmsapi/src/DyvmsapiClient.cc +++ b/dyvmsapi/src/DyvmsapiClient.cc @@ -663,6 +663,42 @@ DyvmsapiClient::ExecuteCallTaskOutcomeCallable DyvmsapiClient::executeCallTaskCa return task->get_future(); } +DyvmsapiClient::GetCallInfoOutcome DyvmsapiClient::getCallInfo(const GetCallInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetCallInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetCallInfoOutcome(GetCallInfoResult(outcome.result())); + else + return GetCallInfoOutcome(outcome.error()); +} + +void DyvmsapiClient::getCallInfoAsync(const GetCallInfoRequest& request, const GetCallInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getCallInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DyvmsapiClient::GetCallInfoOutcomeCallable DyvmsapiClient::getCallInfoCallable(const GetCallInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getCallInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DyvmsapiClient::GetHotlineQualificationByOrderOutcome DyvmsapiClient::getHotlineQualificationByOrder(const GetHotlineQualificationByOrderRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dyvmsapi/src/model/GetCallInfoRequest.cc b/dyvmsapi/src/model/GetCallInfoRequest.cc new file mode 100644 index 000000000..894c816f5 --- /dev/null +++ b/dyvmsapi/src/model/GetCallInfoRequest.cc @@ -0,0 +1,84 @@ +/* + * 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::Dyvmsapi::Model::GetCallInfoRequest; + +GetCallInfoRequest::GetCallInfoRequest() : + RpcServiceRequest("dyvmsapi", "2017-05-25", "GetCallInfo") +{ + setMethod(HttpRequest::Method::Post); +} + +GetCallInfoRequest::~GetCallInfoRequest() +{} + +std::string GetCallInfoRequest::getRtcId()const +{ + return rtcId_; +} + +void GetCallInfoRequest::setRtcId(const std::string& rtcId) +{ + rtcId_ = rtcId; + setParameter("RtcId", rtcId); +} + +long GetCallInfoRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetCallInfoRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetCallInfoRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GetCallInfoRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string GetCallInfoRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void GetCallInfoRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +long GetCallInfoRequest::getOwnerId()const +{ + return ownerId_; +} + +void GetCallInfoRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/dyvmsapi/src/model/GetCallInfoResult.cc b/dyvmsapi/src/model/GetCallInfoResult.cc new file mode 100644 index 000000000..b480f6b79 --- /dev/null +++ b/dyvmsapi/src/model/GetCallInfoResult.cc @@ -0,0 +1,68 @@ +/* + * 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::Dyvmsapi; +using namespace AlibabaCloud::Dyvmsapi::Model; + +GetCallInfoResult::GetCallInfoResult() : + ServiceResult() +{} + +GetCallInfoResult::GetCallInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetCallInfoResult::~GetCallInfoResult() +{} + +void GetCallInfoResult::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["ChannelId"].isNull()) + data_.channelId = dataNode["ChannelId"].asString(); + if(!dataNode["Status"].isNull()) + data_.status = dataNode["Status"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetCallInfoResult::getMessage()const +{ + return message_; +} + +GetCallInfoResult::Data GetCallInfoResult::getData()const +{ + return data_; +} + +std::string GetCallInfoResult::getCode()const +{ + return code_; +} +