diff --git a/CHANGELOG b/CHANGELOG index b29532111..b02b95ad2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-08-10 Version: 1.36.846 +- Export instance relative API. + 2021-08-10 Version: 1.36.845 - Update TaggingAdImage. diff --git a/VERSION b/VERSION index 4d97c5340..c2c10883d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.845 \ No newline at end of file +1.36.846 \ No newline at end of file diff --git a/ccc/CMakeLists.txt b/ccc/CMakeLists.txt index 025d08996..cf4a94af7 100644 --- a/ccc/CMakeLists.txt +++ b/ccc/CMakeLists.txt @@ -131,6 +131,8 @@ set(ccc_public_header_model include/alibabacloud/ccc/model/ListPhoneNumbersOfSkillGroupResult.h include/alibabacloud/ccc/model/ListPrivilegesOfUserRequest.h include/alibabacloud/ccc/model/ListPrivilegesOfUserResult.h + include/alibabacloud/ccc/model/ListRamUsersRequest.h + include/alibabacloud/ccc/model/ListRamUsersResult.h include/alibabacloud/ccc/model/ListRealtimeAgentStatesRequest.h include/alibabacloud/ccc/model/ListRealtimeAgentStatesResult.h include/alibabacloud/ccc/model/ListRealtimeSkillGroupStatesRequest.h @@ -330,6 +332,8 @@ set(ccc_src src/model/ListPhoneNumbersOfSkillGroupResult.cc src/model/ListPrivilegesOfUserRequest.cc src/model/ListPrivilegesOfUserResult.cc + src/model/ListRamUsersRequest.cc + src/model/ListRamUsersResult.cc src/model/ListRealtimeAgentStatesRequest.cc src/model/ListRealtimeAgentStatesResult.cc src/model/ListRealtimeSkillGroupStatesRequest.cc diff --git a/ccc/include/alibabacloud/ccc/CCCClient.h b/ccc/include/alibabacloud/ccc/CCCClient.h index 921bd90a1..c88c3514e 100644 --- a/ccc/include/alibabacloud/ccc/CCCClient.h +++ b/ccc/include/alibabacloud/ccc/CCCClient.h @@ -132,6 +132,8 @@ #include "model/ListPhoneNumbersOfSkillGroupResult.h" #include "model/ListPrivilegesOfUserRequest.h" #include "model/ListPrivilegesOfUserResult.h" +#include "model/ListRamUsersRequest.h" +#include "model/ListRamUsersResult.h" #include "model/ListRealtimeAgentStatesRequest.h" #include "model/ListRealtimeAgentStatesResult.h" #include "model/ListRealtimeSkillGroupStatesRequest.h" @@ -392,6 +394,9 @@ namespace AlibabaCloud typedef Outcome ListPrivilegesOfUserOutcome; typedef std::future ListPrivilegesOfUserOutcomeCallable; typedef std::function&)> ListPrivilegesOfUserAsyncHandler; + typedef Outcome ListRamUsersOutcome; + typedef std::future ListRamUsersOutcomeCallable; + typedef std::function&)> ListRamUsersAsyncHandler; typedef Outcome ListRealtimeAgentStatesOutcome; typedef std::future ListRealtimeAgentStatesOutcomeCallable; typedef std::function&)> ListRealtimeAgentStatesAsyncHandler; @@ -691,6 +696,9 @@ namespace AlibabaCloud ListPrivilegesOfUserOutcome listPrivilegesOfUser(const Model::ListPrivilegesOfUserRequest &request)const; void listPrivilegesOfUserAsync(const Model::ListPrivilegesOfUserRequest& request, const ListPrivilegesOfUserAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListPrivilegesOfUserOutcomeCallable listPrivilegesOfUserCallable(const Model::ListPrivilegesOfUserRequest& request) const; + ListRamUsersOutcome listRamUsers(const Model::ListRamUsersRequest &request)const; + void listRamUsersAsync(const Model::ListRamUsersRequest& request, const ListRamUsersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListRamUsersOutcomeCallable listRamUsersCallable(const Model::ListRamUsersRequest& request) const; ListRealtimeAgentStatesOutcome listRealtimeAgentStates(const Model::ListRealtimeAgentStatesRequest &request)const; void listRealtimeAgentStatesAsync(const Model::ListRealtimeAgentStatesRequest& request, const ListRealtimeAgentStatesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListRealtimeAgentStatesOutcomeCallable listRealtimeAgentStatesCallable(const Model::ListRealtimeAgentStatesRequest& request) const; diff --git a/ccc/include/alibabacloud/ccc/model/AnswerCallResult.h b/ccc/include/alibabacloud/ccc/model/AnswerCallResult.h index 254cfc550..8a867f9cf 100644 --- a/ccc/include/alibabacloud/ccc/model/AnswerCallResult.h +++ b/ccc/include/alibabacloud/ccc/model/AnswerCallResult.h @@ -73,6 +73,7 @@ namespace AlibabaCloud long reserved; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/include/alibabacloud/ccc/model/CancelAttendedTransferResult.h b/ccc/include/alibabacloud/ccc/model/CancelAttendedTransferResult.h index a3b6866c1..ed8a12c66 100644 --- a/ccc/include/alibabacloud/ccc/model/CancelAttendedTransferResult.h +++ b/ccc/include/alibabacloud/ccc/model/CancelAttendedTransferResult.h @@ -75,6 +75,7 @@ namespace AlibabaCloud long reserved; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/include/alibabacloud/ccc/model/CompleteAttendedTransferResult.h b/ccc/include/alibabacloud/ccc/model/CompleteAttendedTransferResult.h index c60a7655e..14b81b913 100644 --- a/ccc/include/alibabacloud/ccc/model/CompleteAttendedTransferResult.h +++ b/ccc/include/alibabacloud/ccc/model/CompleteAttendedTransferResult.h @@ -76,6 +76,7 @@ namespace AlibabaCloud long reserved; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/include/alibabacloud/ccc/model/InitiateAttendedTransferResult.h b/ccc/include/alibabacloud/ccc/model/InitiateAttendedTransferResult.h index e61f8c575..80846a1ef 100644 --- a/ccc/include/alibabacloud/ccc/model/InitiateAttendedTransferResult.h +++ b/ccc/include/alibabacloud/ccc/model/InitiateAttendedTransferResult.h @@ -76,6 +76,7 @@ namespace AlibabaCloud long reserved; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/include/alibabacloud/ccc/model/ListRamUsersRequest.h b/ccc/include/alibabacloud/ccc/model/ListRamUsersRequest.h new file mode 100644 index 000000000..180d68f61 --- /dev/null +++ b/ccc/include/alibabacloud/ccc/model/ListRamUsersRequest.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_LISTRAMUSERSREQUEST_H_ +#define ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CCC + { + namespace Model + { + class ALIBABACLOUD_CCC_EXPORT ListRamUsersRequest : public RpcServiceRequest + { + + public: + ListRamUsersRequest(); + ~ListRamUsersRequest(); + + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getSearchPattern()const; + void setSearchPattern(const std::string& searchPattern); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + int pageNumber_; + std::string searchPattern_; + std::string instanceId_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSREQUEST_H_ \ No newline at end of file diff --git a/ccc/include/alibabacloud/ccc/model/ListRamUsersResult.h b/ccc/include/alibabacloud/ccc/model/ListRamUsersResult.h new file mode 100644 index 000000000..c5b393d95 --- /dev/null +++ b/ccc/include/alibabacloud/ccc/model/ListRamUsersResult.h @@ -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_LISTRAMUSERSRESULT_H_ +#define ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CCC + { + namespace Model + { + class ALIBABACLOUD_CCC_EXPORT ListRamUsersResult : public ServiceResult + { + public: + struct Data + { + struct RamUser + { + std::string loginName; + std::string email; + long aliyunUid; + bool primary; + std::string displayName; + std::string ramId; + std::string mobile; + }; + int totalCount; + int pageSize; + int pageNumber; + std::vector list; + }; + + + ListRamUsersResult(); + explicit ListRamUsersResult(const std::string &payload); + ~ListRamUsersResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + std::vector getParams()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + std::vector params_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSRESULT_H_ \ No newline at end of file diff --git a/ccc/include/alibabacloud/ccc/model/MakeCallResult.h b/ccc/include/alibabacloud/ccc/model/MakeCallResult.h index 5e4e6a35f..d6ba9b04b 100644 --- a/ccc/include/alibabacloud/ccc/model/MakeCallResult.h +++ b/ccc/include/alibabacloud/ccc/model/MakeCallResult.h @@ -71,6 +71,7 @@ namespace AlibabaCloud std::vector signedSkillGroupIdList; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/include/alibabacloud/ccc/model/PollUserStatusResult.h b/ccc/include/alibabacloud/ccc/model/PollUserStatusResult.h index 3a13ef90a..a9fcdc347 100644 --- a/ccc/include/alibabacloud/ccc/model/PollUserStatusResult.h +++ b/ccc/include/alibabacloud/ccc/model/PollUserStatusResult.h @@ -77,6 +77,7 @@ namespace AlibabaCloud long reserved; }; UserContext userContext; + long contextId; CallContext callContext; }; diff --git a/ccc/src/CCCClient.cc b/ccc/src/CCCClient.cc index 03e1a4772..f88a3a6e4 100644 --- a/ccc/src/CCCClient.cc +++ b/ccc/src/CCCClient.cc @@ -2031,6 +2031,42 @@ CCCClient::ListPrivilegesOfUserOutcomeCallable CCCClient::listPrivilegesOfUserCa return task->get_future(); } +CCCClient::ListRamUsersOutcome CCCClient::listRamUsers(const ListRamUsersRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListRamUsersOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListRamUsersOutcome(ListRamUsersResult(outcome.result())); + else + return ListRamUsersOutcome(outcome.error()); +} + +void CCCClient::listRamUsersAsync(const ListRamUsersRequest& request, const ListRamUsersAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listRamUsers(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CCCClient::ListRamUsersOutcomeCallable CCCClient::listRamUsersCallable(const ListRamUsersRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listRamUsers(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CCCClient::ListRealtimeAgentStatesOutcome CCCClient::listRealtimeAgentStates(const ListRealtimeAgentStatesRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ccc/src/model/AnswerCallResult.cc b/ccc/src/model/AnswerCallResult.cc index 411e7c153..3bc949a1e 100644 --- a/ccc/src/model/AnswerCallResult.cc +++ b/ccc/src/model/AnswerCallResult.cc @@ -40,6 +40,8 @@ void AnswerCallResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["InstanceId"].isNull()) data_.callContext.instanceId = callContextNode["InstanceId"].asString(); diff --git a/ccc/src/model/CancelAttendedTransferResult.cc b/ccc/src/model/CancelAttendedTransferResult.cc index 9e095b315..06d453af4 100644 --- a/ccc/src/model/CancelAttendedTransferResult.cc +++ b/ccc/src/model/CancelAttendedTransferResult.cc @@ -40,6 +40,8 @@ void CancelAttendedTransferResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["CallType"].isNull()) data_.callContext.callType = callContextNode["CallType"].asString(); diff --git a/ccc/src/model/CompleteAttendedTransferResult.cc b/ccc/src/model/CompleteAttendedTransferResult.cc index b51423313..0c4c3b252 100644 --- a/ccc/src/model/CompleteAttendedTransferResult.cc +++ b/ccc/src/model/CompleteAttendedTransferResult.cc @@ -40,6 +40,8 @@ void CompleteAttendedTransferResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["CallType"].isNull()) data_.callContext.callType = callContextNode["CallType"].asString(); diff --git a/ccc/src/model/InitiateAttendedTransferResult.cc b/ccc/src/model/InitiateAttendedTransferResult.cc index 5850cd930..6099e4dba 100644 --- a/ccc/src/model/InitiateAttendedTransferResult.cc +++ b/ccc/src/model/InitiateAttendedTransferResult.cc @@ -40,6 +40,8 @@ void InitiateAttendedTransferResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["CallType"].isNull()) data_.callContext.callType = callContextNode["CallType"].asString(); diff --git a/ccc/src/model/ListRamUsersRequest.cc b/ccc/src/model/ListRamUsersRequest.cc new file mode 100644 index 000000000..fee45ab77 --- /dev/null +++ b/ccc/src/model/ListRamUsersRequest.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::ListRamUsersRequest; + +ListRamUsersRequest::ListRamUsersRequest() : + RpcServiceRequest("ccc", "2020-07-01", "ListRamUsers") +{ + setMethod(HttpRequest::Method::Post); +} + +ListRamUsersRequest::~ListRamUsersRequest() +{} + +int ListRamUsersRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListRamUsersRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string ListRamUsersRequest::getSearchPattern()const +{ + return searchPattern_; +} + +void ListRamUsersRequest::setSearchPattern(const std::string& searchPattern) +{ + searchPattern_ = searchPattern; + setParameter("SearchPattern", searchPattern); +} + +std::string ListRamUsersRequest::getInstanceId()const +{ + return instanceId_; +} + +void ListRamUsersRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + +int ListRamUsersRequest::getPageSize()const +{ + return pageSize_; +} + +void ListRamUsersRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/ccc/src/model/ListRamUsersResult.cc b/ccc/src/model/ListRamUsersResult.cc new file mode 100644 index 000000000..181909a67 --- /dev/null +++ b/ccc/src/model/ListRamUsersResult.cc @@ -0,0 +1,105 @@ +/* + * 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; + +ListRamUsersResult::ListRamUsersResult() : + ServiceResult() +{} + +ListRamUsersResult::ListRamUsersResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListRamUsersResult::~ListRamUsersResult() +{} + +void ListRamUsersResult::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"]["RamUser"]; + for (auto dataNodeListRamUser : allListNode) + { + Data::RamUser ramUserObject; + if(!dataNodeListRamUser["AliyunUid"].isNull()) + ramUserObject.aliyunUid = std::stol(dataNodeListRamUser["AliyunUid"].asString()); + if(!dataNodeListRamUser["DisplayName"].isNull()) + ramUserObject.displayName = dataNodeListRamUser["DisplayName"].asString(); + if(!dataNodeListRamUser["Email"].isNull()) + ramUserObject.email = dataNodeListRamUser["Email"].asString(); + if(!dataNodeListRamUser["LoginName"].isNull()) + ramUserObject.loginName = dataNodeListRamUser["LoginName"].asString(); + if(!dataNodeListRamUser["Mobile"].isNull()) + ramUserObject.mobile = dataNodeListRamUser["Mobile"].asString(); + if(!dataNodeListRamUser["Primary"].isNull()) + ramUserObject.primary = dataNodeListRamUser["Primary"].asString() == "true"; + if(!dataNodeListRamUser["RamId"].isNull()) + ramUserObject.ramId = dataNodeListRamUser["RamId"].asString(); + data_.list.push_back(ramUserObject); + } + auto allParams = value["Params"]["Param"]; + for (const auto &item : allParams) + params_.push_back(item.asString()); + 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 ListRamUsersResult::getMessage()const +{ + return message_; +} + +int ListRamUsersResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +std::vector ListRamUsersResult::getParams()const +{ + return params_; +} + +ListRamUsersResult::Data ListRamUsersResult::getData()const +{ + return data_; +} + +std::string ListRamUsersResult::getCode()const +{ + return code_; +} + diff --git a/ccc/src/model/MakeCallResult.cc b/ccc/src/model/MakeCallResult.cc index e0a5ebcc3..7474b2e8d 100644 --- a/ccc/src/model/MakeCallResult.cc +++ b/ccc/src/model/MakeCallResult.cc @@ -40,6 +40,8 @@ void MakeCallResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["CallType"].isNull()) data_.callContext.callType = callContextNode["CallType"].asString(); diff --git a/ccc/src/model/PollUserStatusResult.cc b/ccc/src/model/PollUserStatusResult.cc index fe52df42a..8128c4432 100644 --- a/ccc/src/model/PollUserStatusResult.cc +++ b/ccc/src/model/PollUserStatusResult.cc @@ -40,6 +40,8 @@ void PollUserStatusResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; + if(!dataNode["ContextId"].isNull()) + data_.contextId = std::stol(dataNode["ContextId"].asString()); auto callContextNode = dataNode["CallContext"]; if(!callContextNode["CallType"].isNull()) data_.callContext.callType = callContextNode["CallType"].asString();