Generated 2023-01-20 for csas.

This commit is contained in:
sdk-team
2024-07-03 02:53:19 +00:00
parent 78426b2c35
commit befcff9add
12 changed files with 633 additions and 1 deletions

View File

@@ -1635,6 +1635,42 @@ CsasClient::ListIdpDepartmentsOutcomeCallable CsasClient::listIdpDepartmentsCall
return task->get_future();
}
CsasClient::ListNacUserCertOutcome CsasClient::listNacUserCert(const ListNacUserCertRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListNacUserCertOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListNacUserCertOutcome(ListNacUserCertResult(outcome.result()));
else
return ListNacUserCertOutcome(outcome.error());
}
void CsasClient::listNacUserCertAsync(const ListNacUserCertRequest& request, const ListNacUserCertAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listNacUserCert(request), context);
};
asyncExecute(new Runnable(fn));
}
CsasClient::ListNacUserCertOutcomeCallable CsasClient::listNacUserCertCallable(const ListNacUserCertRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListNacUserCertOutcome()>>(
[this, request]()
{
return this->listNacUserCert(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CsasClient::ListPolicesForPrivateAccessApplicationOutcome CsasClient::listPolicesForPrivateAccessApplication(const ListPolicesForPrivateAccessApplicationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2607,6 +2643,42 @@ CsasClient::UpdateIdpDepartmentOutcomeCallable CsasClient::updateIdpDepartmentCa
return task->get_future();
}
CsasClient::UpdateNacUserCertStatusOutcome CsasClient::updateNacUserCertStatus(const UpdateNacUserCertStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateNacUserCertStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateNacUserCertStatusOutcome(UpdateNacUserCertStatusResult(outcome.result()));
else
return UpdateNacUserCertStatusOutcome(outcome.error());
}
void CsasClient::updateNacUserCertStatusAsync(const UpdateNacUserCertStatusRequest& request, const UpdateNacUserCertStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateNacUserCertStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
CsasClient::UpdateNacUserCertStatusOutcomeCallable CsasClient::updateNacUserCertStatusCallable(const UpdateNacUserCertStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateNacUserCertStatusOutcome()>>(
[this, request]()
{
return this->updateNacUserCertStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CsasClient::UpdatePrivateAccessApplicationOutcome CsasClient::updatePrivateAccessApplication(const UpdatePrivateAccessApplicationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,99 @@
/*
* 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/csas/model/ListNacUserCertRequest.h>
using AlibabaCloud::Csas::Model::ListNacUserCertRequest;
ListNacUserCertRequest::ListNacUserCertRequest()
: RpcServiceRequest("csas", "2023-01-20", "ListNacUserCert") {
setMethod(HttpRequest::Method::Post);
}
ListNacUserCertRequest::~ListNacUserCertRequest() {}
long ListNacUserCertRequest::getEndTime() const {
return endTime_;
}
void ListNacUserCertRequest::setEndTime(long endTime) {
endTime_ = endTime;
setParameter(std::string("EndTime"), std::to_string(endTime));
}
std::string ListNacUserCertRequest::getCurrentPage() const {
return currentPage_;
}
void ListNacUserCertRequest::setCurrentPage(const std::string &currentPage) {
currentPage_ = currentPage;
setParameter(std::string("CurrentPage"), currentPage);
}
long ListNacUserCertRequest::getStartTime() const {
return startTime_;
}
void ListNacUserCertRequest::setStartTime(long startTime) {
startTime_ = startTime;
setParameter(std::string("StartTime"), std::to_string(startTime));
}
std::string ListNacUserCertRequest::getDeviceType() const {
return deviceType_;
}
void ListNacUserCertRequest::setDeviceType(const std::string &deviceType) {
deviceType_ = deviceType;
setParameter(std::string("DeviceType"), deviceType);
}
std::string ListNacUserCertRequest::getPageSize() const {
return pageSize_;
}
void ListNacUserCertRequest::setPageSize(const std::string &pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), pageSize);
}
std::string ListNacUserCertRequest::getDepartment() const {
return department_;
}
void ListNacUserCertRequest::setDepartment(const std::string &department) {
department_ = department;
setParameter(std::string("Department"), department);
}
std::string ListNacUserCertRequest::getUsername() const {
return username_;
}
void ListNacUserCertRequest::setUsername(const std::string &username) {
username_ = username;
setParameter(std::string("Username"), username);
}
std::string ListNacUserCertRequest::getStatus() const {
return status_;
}
void ListNacUserCertRequest::setStatus(const std::string &status) {
status_ = status;
setParameter(std::string("Status"), status);
}

View File

@@ -0,0 +1,96 @@
/*
* 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/csas/model/ListNacUserCertResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Csas;
using namespace AlibabaCloud::Csas::Model;
ListNacUserCertResult::ListNacUserCertResult() :
ServiceResult()
{}
ListNacUserCertResult::ListNacUserCertResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListNacUserCertResult::~ListNacUserCertResult()
{}
void ListNacUserCertResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataListNode = value["DataList"]["DataListItem"];
for (auto valueDataListDataListItem : allDataListNode)
{
DataListItem dataListObject;
if(!valueDataListDataListItem["Username"].isNull())
dataListObject.username = valueDataListDataListItem["Username"].asString();
if(!valueDataListDataListItem["Aliuid"].isNull())
dataListObject.aliuid = valueDataListDataListItem["Aliuid"].asString();
if(!valueDataListDataListItem["ExpiredTime"].isNull())
dataListObject.expiredTime = valueDataListDataListItem["ExpiredTime"].asString();
if(!valueDataListDataListItem["Department"].isNull())
dataListObject.department = valueDataListDataListItem["Department"].asString();
if(!valueDataListDataListItem["DeviceType"].isNull())
dataListObject.deviceType = valueDataListDataListItem["DeviceType"].asString();
if(!valueDataListDataListItem["Status"].isNull())
dataListObject.status = valueDataListDataListItem["Status"].asString();
if(!valueDataListDataListItem["UserId"].isNull())
dataListObject.userId = valueDataListDataListItem["UserId"].asString();
if(!valueDataListDataListItem["DevTag"].isNull())
dataListObject.devTag = valueDataListDataListItem["DevTag"].asString();
if(!valueDataListDataListItem["Hostname"].isNull())
dataListObject.hostname = valueDataListDataListItem["Hostname"].asString();
if(!valueDataListDataListItem["Mac"].isNull())
dataListObject.mac = valueDataListDataListItem["Mac"].asString();
dataList_.push_back(dataListObject);
}
if(!value["Code"].isNull())
code_ = std::stol(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TotalNum"].isNull())
totalNum_ = std::stol(value["TotalNum"].asString());
}
std::vector<ListNacUserCertResult::DataListItem> ListNacUserCertResult::getDataList()const
{
return dataList_;
}
long ListNacUserCertResult::getTotalNum()const
{
return totalNum_;
}
std::string ListNacUserCertResult::getMessage()const
{
return message_;
}
long ListNacUserCertResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,48 @@
/*
* 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/csas/model/UpdateNacUserCertStatusRequest.h>
using AlibabaCloud::Csas::Model::UpdateNacUserCertStatusRequest;
UpdateNacUserCertStatusRequest::UpdateNacUserCertStatusRequest()
: RpcServiceRequest("csas", "2023-01-20", "UpdateNacUserCertStatus") {
setMethod(HttpRequest::Method::Post);
}
UpdateNacUserCertStatusRequest::~UpdateNacUserCertStatusRequest() {}
std::vector<UpdateNacUserCertStatusRequest::IdList> UpdateNacUserCertStatusRequest::getIdList() const {
return idList_;
}
void UpdateNacUserCertStatusRequest::setIdList(const std::vector<UpdateNacUserCertStatusRequest::IdList> &idList) {
idList_ = idList;
for(int dep1 = 0; dep1 != idList.size(); dep1++) {
setBodyParameter(std::string("IdList") + "." + std::to_string(dep1 + 1) + ".UserId", idList[dep1].userId);
setBodyParameter(std::string("IdList") + "." + std::to_string(dep1 + 1) + ".DevTag", idList[dep1].devTag);
}
}
std::string UpdateNacUserCertStatusRequest::getStatus() const {
return status_;
}
void UpdateNacUserCertStatusRequest::setStatus(const std::string &status) {
status_ = status;
setBodyParameter(std::string("Status"), status);
}

View File

@@ -0,0 +1,58 @@
/*
* 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/csas/model/UpdateNacUserCertStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Csas;
using namespace AlibabaCloud::Csas::Model;
UpdateNacUserCertStatusResult::UpdateNacUserCertStatusResult() :
ServiceResult()
{}
UpdateNacUserCertStatusResult::UpdateNacUserCertStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateNacUserCertStatusResult::~UpdateNacUserCertStatusResult()
{}
void UpdateNacUserCertStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string UpdateNacUserCertStatusResult::getMessage()const
{
return message_;
}
std::string UpdateNacUserCertStatusResult::getCode()const
{
return code_;
}