Add API ListQuotaReviewTasks.

This commit is contained in:
sdk-team
2021-05-17 09:36:55 +00:00
parent be3de6fa81
commit ededc6be9f
13 changed files with 611 additions and 1 deletions

View 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));
}

View 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_;
}

View 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);
}

View 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_;
}