Add API ListQuotaReviewTasks.
This commit is contained in:
@@ -2643,6 +2643,42 @@ OpenSearchClient::ListQueryProcessorsOutcomeCallable OpenSearchClient::listQuery
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OpenSearchClient::ListQuotaReviewTasksOutcome OpenSearchClient::listQuotaReviewTasks(const ListQuotaReviewTasksRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListQuotaReviewTasksOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListQuotaReviewTasksOutcome(ListQuotaReviewTasksResult(outcome.result()));
|
||||
else
|
||||
return ListQuotaReviewTasksOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OpenSearchClient::listQuotaReviewTasksAsync(const ListQuotaReviewTasksRequest& request, const ListQuotaReviewTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listQuotaReviewTasks(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OpenSearchClient::ListQuotaReviewTasksOutcomeCallable OpenSearchClient::listQuotaReviewTasksCallable(const ListQuotaReviewTasksRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListQuotaReviewTasksOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listQuotaReviewTasks(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OpenSearchClient::ListRamRolesOutcome OpenSearchClient::listRamRoles(const ListRamRolesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -4155,6 +4191,42 @@ OpenSearchClient::UpdateFetchFieldsOutcomeCallable OpenSearchClient::updateFetch
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OpenSearchClient::UpdateSortScriptOutcome OpenSearchClient::updateSortScript(const UpdateSortScriptRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateSortScriptOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateSortScriptOutcome(UpdateSortScriptResult(outcome.result()));
|
||||
else
|
||||
return UpdateSortScriptOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OpenSearchClient::updateSortScriptAsync(const UpdateSortScriptRequest& request, const UpdateSortScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateSortScript(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OpenSearchClient::UpdateSortScriptOutcomeCallable OpenSearchClient::updateSortScriptCallable(const UpdateSortScriptRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateSortScriptOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateSortScript(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OpenSearchClient::UpdateSummariesOutcome OpenSearchClient::updateSummaries(const UpdateSummariesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
63
opensearch/src/model/ListQuotaReviewTasksRequest.cc
Normal file
63
opensearch/src/model/ListQuotaReviewTasksRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/opensearch/model/ListQuotaReviewTasksRequest.h>
|
||||
|
||||
using AlibabaCloud::OpenSearch::Model::ListQuotaReviewTasksRequest;
|
||||
|
||||
ListQuotaReviewTasksRequest::ListQuotaReviewTasksRequest() :
|
||||
RoaServiceRequest("opensearch", "2017-12-25")
|
||||
{
|
||||
setResourcePath("/v4/openapi/app-groups/[appGroupIdentity]/quota-review-tasks");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListQuotaReviewTasksRequest::~ListQuotaReviewTasksRequest()
|
||||
{}
|
||||
|
||||
int ListQuotaReviewTasksRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListQuotaReviewTasksRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListQuotaReviewTasksRequest::getAppGroupIdentity()const
|
||||
{
|
||||
return appGroupIdentity_;
|
||||
}
|
||||
|
||||
void ListQuotaReviewTasksRequest::setAppGroupIdentity(const std::string& appGroupIdentity)
|
||||
{
|
||||
appGroupIdentity_ = appGroupIdentity;
|
||||
setParameter("AppGroupIdentity", appGroupIdentity);
|
||||
}
|
||||
|
||||
int ListQuotaReviewTasksRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListQuotaReviewTasksRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
101
opensearch/src/model/ListQuotaReviewTasksResult.cc
Normal file
101
opensearch/src/model/ListQuotaReviewTasksResult.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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/opensearch/model/ListQuotaReviewTasksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OpenSearch;
|
||||
using namespace AlibabaCloud::OpenSearch::Model;
|
||||
|
||||
ListQuotaReviewTasksResult::ListQuotaReviewTasksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListQuotaReviewTasksResult::ListQuotaReviewTasksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListQuotaReviewTasksResult::~ListQuotaReviewTasksResult()
|
||||
{}
|
||||
|
||||
void ListQuotaReviewTasksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allresultNode = value["result"]["resultItem"];
|
||||
for (auto valueresultresultItem : allresultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueresultresultItem["id"].isNull())
|
||||
resultObject.id = std::stoi(valueresultresultItem["id"].asString());
|
||||
if(!valueresultresultItem["appGroupId"].isNull())
|
||||
resultObject.appGroupId = std::stoi(valueresultresultItem["appGroupId"].asString());
|
||||
if(!valueresultresultItem["appGroupName"].isNull())
|
||||
resultObject.appGroupName = valueresultresultItem["appGroupName"].asString();
|
||||
if(!valueresultresultItem["appGroupType"].isNull())
|
||||
resultObject.appGroupType = valueresultresultItem["appGroupType"].asString();
|
||||
if(!valueresultresultItem["oldSpec"].isNull())
|
||||
resultObject.oldSpec = valueresultresultItem["oldSpec"].asString();
|
||||
if(!valueresultresultItem["oldComputeResource"].isNull())
|
||||
resultObject.oldComputeResource = std::stoi(valueresultresultItem["oldComputeResource"].asString());
|
||||
if(!valueresultresultItem["oldDocSize"].isNull())
|
||||
resultObject.oldDocSize = std::stoi(valueresultresultItem["oldDocSize"].asString());
|
||||
if(!valueresultresultItem["newSpec"].isNull())
|
||||
resultObject.newSpec = valueresultresultItem["newSpec"].asString();
|
||||
if(!valueresultresultItem["newComputeResource"].isNull())
|
||||
resultObject.newComputeResource = std::stoi(valueresultresultItem["newComputeResource"].asString());
|
||||
if(!valueresultresultItem["newSocSize"].isNull())
|
||||
resultObject.newSocSize = std::stoi(valueresultresultItem["newSocSize"].asString());
|
||||
if(!valueresultresultItem["memo"].isNull())
|
||||
resultObject.memo = valueresultresultItem["memo"].asString();
|
||||
if(!valueresultresultItem["available"].isNull())
|
||||
resultObject.available = valueresultresultItem["available"].asString() == "true";
|
||||
if(!valueresultresultItem["pending"].isNull())
|
||||
resultObject.pending = valueresultresultItem["pending"].asString() == "true";
|
||||
if(!valueresultresultItem["approved"].isNull())
|
||||
resultObject.approved = valueresultresultItem["approved"].asString() == "true";
|
||||
if(!valueresultresultItem["gmtCreate"].isNull())
|
||||
resultObject.gmtCreate = valueresultresultItem["gmtCreate"].asString();
|
||||
if(!valueresultresultItem["gmtModified"].isNull())
|
||||
resultObject.gmtModified = valueresultresultItem["gmtModified"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["totalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["totalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListQuotaReviewTasksResult::ResultItem> ListQuotaReviewTasksResult::getresult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
int ListQuotaReviewTasksResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListQuotaReviewTasksResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
63
opensearch/src/model/UpdateSortScriptRequest.cc
Normal file
63
opensearch/src/model/UpdateSortScriptRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/opensearch/model/UpdateSortScriptRequest.h>
|
||||
|
||||
using AlibabaCloud::OpenSearch::Model::UpdateSortScriptRequest;
|
||||
|
||||
UpdateSortScriptRequest::UpdateSortScriptRequest() :
|
||||
RoaServiceRequest("opensearch", "2017-12-25")
|
||||
{
|
||||
setResourcePath("/v4/openapi/app-groups/[appGroupIdentity]/apps/[appVersionId]/sort-scripts/[scriptName]");
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateSortScriptRequest::~UpdateSortScriptRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateSortScriptRequest::getAppVersionId()const
|
||||
{
|
||||
return appVersionId_;
|
||||
}
|
||||
|
||||
void UpdateSortScriptRequest::setAppVersionId(const std::string& appVersionId)
|
||||
{
|
||||
appVersionId_ = appVersionId;
|
||||
setParameter("AppVersionId", appVersionId);
|
||||
}
|
||||
|
||||
std::string UpdateSortScriptRequest::getScriptName()const
|
||||
{
|
||||
return scriptName_;
|
||||
}
|
||||
|
||||
void UpdateSortScriptRequest::setScriptName(const std::string& scriptName)
|
||||
{
|
||||
scriptName_ = scriptName;
|
||||
setParameter("ScriptName", scriptName);
|
||||
}
|
||||
|
||||
std::string UpdateSortScriptRequest::getAppGroupIdentity()const
|
||||
{
|
||||
return appGroupIdentity_;
|
||||
}
|
||||
|
||||
void UpdateSortScriptRequest::setAppGroupIdentity(const std::string& appGroupIdentity)
|
||||
{
|
||||
appGroupIdentity_ = appGroupIdentity;
|
||||
setParameter("AppGroupIdentity", appGroupIdentity);
|
||||
}
|
||||
|
||||
51
opensearch/src/model/UpdateSortScriptResult.cc
Normal file
51
opensearch/src/model/UpdateSortScriptResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/opensearch/model/UpdateSortScriptResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OpenSearch;
|
||||
using namespace AlibabaCloud::OpenSearch::Model;
|
||||
|
||||
UpdateSortScriptResult::UpdateSortScriptResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateSortScriptResult::UpdateSortScriptResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateSortScriptResult::~UpdateSortScriptResult()
|
||||
{}
|
||||
|
||||
void UpdateSortScriptResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateSortScriptResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user