Export instance relative API.

This commit is contained in:
sdk-team
2021-08-10 07:58:34 +00:00
parent 58cbb932cd
commit 11e315b724
21 changed files with 381 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2021-08-10 Version: 1.36.846
- Export instance relative API.
2021-08-10 Version: 1.36.845
- Update TaggingAdImage.

View File

@@ -1 +1 @@
1.36.845
1.36.846

View File

@@ -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

View File

@@ -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<Error, Model::ListPrivilegesOfUserResult> ListPrivilegesOfUserOutcome;
typedef std::future<ListPrivilegesOfUserOutcome> ListPrivilegesOfUserOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListPrivilegesOfUserRequest&, const ListPrivilegesOfUserOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPrivilegesOfUserAsyncHandler;
typedef Outcome<Error, Model::ListRamUsersResult> ListRamUsersOutcome;
typedef std::future<ListRamUsersOutcome> ListRamUsersOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListRamUsersRequest&, const ListRamUsersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRamUsersAsyncHandler;
typedef Outcome<Error, Model::ListRealtimeAgentStatesResult> ListRealtimeAgentStatesOutcome;
typedef std::future<ListRealtimeAgentStatesOutcome> ListRealtimeAgentStatesOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ListRealtimeAgentStatesRequest&, const ListRealtimeAgentStatesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
ListRealtimeAgentStatesOutcomeCallable listRealtimeAgentStatesCallable(const Model::ListRealtimeAgentStatesRequest& request) const;

View File

@@ -73,6 +73,7 @@ namespace AlibabaCloud
long reserved;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -75,6 +75,7 @@ namespace AlibabaCloud
long reserved;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -76,6 +76,7 @@ namespace AlibabaCloud
long reserved;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -76,6 +76,7 @@ namespace AlibabaCloud
long reserved;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccc/CCCExport.h>
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_

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_LISTRAMUSERSRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSRESULT_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 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<RamUser> list;
};
ListRamUsersResult();
explicit ListRamUsersResult(const std::string &payload);
~ListRamUsersResult();
std::string getMessage()const;
int getHttpStatusCode()const;
std::vector<std::string> getParams()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
std::vector<std::string> params_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_LISTRAMUSERSRESULT_H_

View File

@@ -71,6 +71,7 @@ namespace AlibabaCloud
std::vector<std::string> signedSkillGroupIdList;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -77,6 +77,7 @@ namespace AlibabaCloud
long reserved;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<ListRamUsersOutcome()>>(
[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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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 <alibabacloud/ccc/model/ListRamUsersRequest.h>
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));
}

View File

@@ -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 <alibabacloud/ccc/model/ListRamUsersResult.h>
#include <json/json.h>
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<std::string> ListRamUsersResult::getParams()const
{
return params_;
}
ListRamUsersResult::Data ListRamUsersResult::getData()const
{
return data_;
}
std::string ListRamUsersResult::getCode()const
{
return code_;
}

View File

@@ -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();

View File

@@ -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();