diff --git a/CHANGELOG b/CHANGELOG index 6022c0bee..3872a588f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-11-16 Version: 1.36.934 +- Update apm interface parameter. + 2021-11-16 Version: 1.36.933 - Generated 2017-12-28 for `ddoscoo`. diff --git a/VERSION b/VERSION index 7cd231d00..a6bee3661 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.933 \ No newline at end of file +1.36.934 \ No newline at end of file diff --git a/elasticsearch/CMakeLists.txt b/elasticsearch/CMakeLists.txt index 3eab088fb..5fba330af 100644 --- a/elasticsearch/CMakeLists.txt +++ b/elasticsearch/CMakeLists.txt @@ -169,6 +169,8 @@ set(elasticsearch_public_header_model include/alibabacloud/elasticsearch/model/ListAllNodeResult.h include/alibabacloud/elasticsearch/model/ListAlternativeSnapshotReposRequest.h include/alibabacloud/elasticsearch/model/ListAlternativeSnapshotReposResult.h + include/alibabacloud/elasticsearch/model/ListApmRequest.h + include/alibabacloud/elasticsearch/model/ListApmResult.h include/alibabacloud/elasticsearch/model/ListAvailableEsInstanceIdsRequest.h include/alibabacloud/elasticsearch/model/ListAvailableEsInstanceIdsResult.h include/alibabacloud/elasticsearch/model/ListCollectorsRequest.h @@ -530,6 +532,8 @@ set(elasticsearch_src src/model/ListAllNodeResult.cc src/model/ListAlternativeSnapshotReposRequest.cc src/model/ListAlternativeSnapshotReposResult.cc + src/model/ListApmRequest.cc + src/model/ListApmResult.cc src/model/ListAvailableEsInstanceIdsRequest.cc src/model/ListAvailableEsInstanceIdsResult.cc src/model/ListCollectorsRequest.cc diff --git a/elasticsearch/include/alibabacloud/elasticsearch/ElasticsearchClient.h b/elasticsearch/include/alibabacloud/elasticsearch/ElasticsearchClient.h index 111854568..65e7f410b 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/ElasticsearchClient.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/ElasticsearchClient.h @@ -170,6 +170,8 @@ #include "model/ListAllNodeResult.h" #include "model/ListAlternativeSnapshotReposRequest.h" #include "model/ListAlternativeSnapshotReposResult.h" +#include "model/ListApmRequest.h" +#include "model/ListApmResult.h" #include "model/ListAvailableEsInstanceIdsRequest.h" #include "model/ListAvailableEsInstanceIdsResult.h" #include "model/ListCollectorsRequest.h" @@ -611,6 +613,9 @@ namespace AlibabaCloud typedef Outcome ListAlternativeSnapshotReposOutcome; typedef std::future ListAlternativeSnapshotReposOutcomeCallable; typedef std::function&)> ListAlternativeSnapshotReposAsyncHandler; + typedef Outcome ListApmOutcome; + typedef std::future ListApmOutcomeCallable; + typedef std::function&)> ListApmAsyncHandler; typedef Outcome ListAvailableEsInstanceIdsOutcome; typedef std::future ListAvailableEsInstanceIdsOutcomeCallable; typedef std::function&)> ListAvailableEsInstanceIdsAsyncHandler; @@ -1153,6 +1158,9 @@ namespace AlibabaCloud ListAlternativeSnapshotReposOutcome listAlternativeSnapshotRepos(const Model::ListAlternativeSnapshotReposRequest &request)const; void listAlternativeSnapshotReposAsync(const Model::ListAlternativeSnapshotReposRequest& request, const ListAlternativeSnapshotReposAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListAlternativeSnapshotReposOutcomeCallable listAlternativeSnapshotReposCallable(const Model::ListAlternativeSnapshotReposRequest& request) const; + ListApmOutcome listApm(const Model::ListApmRequest &request)const; + void listApmAsync(const Model::ListApmRequest& request, const ListApmAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListApmOutcomeCallable listApmCallable(const Model::ListApmRequest& request) const; ListAvailableEsInstanceIdsOutcome listAvailableEsInstanceIds(const Model::ListAvailableEsInstanceIdsRequest &request)const; void listAvailableEsInstanceIdsAsync(const Model::ListAvailableEsInstanceIdsRequest& request, const ListAvailableEsInstanceIdsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListAvailableEsInstanceIdsOutcomeCallable listAvailableEsInstanceIdsCallable(const Model::ListAvailableEsInstanceIdsRequest& request) const; diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/DescribeApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/DescribeApmResult.h index fea959b1f..fa675a085 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/model/DescribeApmResult.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/DescribeApmResult.h @@ -44,10 +44,11 @@ namespace AlibabaCloud std::string resourceSpec; long deployedReplica; long nodeAmount; - long replica; + int replica; std::string vswitchId; std::string ownerId; std::string vpcId; + std::string apmServerDomain; std::string version; std::string paymentType; std::string region; diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmRequest.h b/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmRequest.h new file mode 100644 index 000000000..47ef53505 --- /dev/null +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmRequest.h @@ -0,0 +1,60 @@ +/* + * 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_ELASTICSEARCH_MODEL_LISTAPMREQUEST_H_ +#define ALIBABACLOUD_ELASTICSEARCH_MODEL_LISTAPMREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Elasticsearch + { + namespace Model + { + class ALIBABACLOUD_ELASTICSEARCH_EXPORT ListApmRequest : public RoaServiceRequest + { + + public: + ListApmRequest(); + ~ListApmRequest(); + + std::string getOutput()const; + void setOutput(const std::string& output); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + long getSize()const; + void setSize(long size); + std::string getDescription()const; + void setDescription(const std::string& description); + long getPage()const; + void setPage(long page); + + private: + std::string output_; + std::string instanceId_; + long size_; + std::string description_; + long page_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ELASTICSEARCH_MODEL_LISTAPMREQUEST_H_ \ No newline at end of file diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmResult.h new file mode 100644 index 000000000..8ff8b0394 --- /dev/null +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/ListApmResult.h @@ -0,0 +1,77 @@ +/* + * 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_ELASTICSEARCH_MODEL_LISTAPMRESULT_H_ +#define ALIBABACLOUD_ELASTICSEARCH_MODEL_LISTAPMRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Elasticsearch + { + namespace Model + { + class ALIBABACLOUD_ELASTICSEARCH_EXPORT ListApmResult : public ServiceResult + { + public: + struct Headers + { + long xTotalCount; + }; + struct 返回结果 + { + std::string status; + std::string description; + std::string instanceId; + std::string outputES; + std::string createdAt; + std::string resourceSpec; + long deployedReplica; + long nodeAmount; + long replica; + std::string vswitchId; + std::string ownerId; + std::string vpcId; + std::string version; + std::string paymentType; + std::string region; + std::string outputESUserName; + std::string vsArea; + }; + + + ListApmResult(); + explicit ListApmResult(const std::string &payload); + ~ListApmResult(); + Headers getHeaders()const; + std::vector<返回结果> getResult()const; + + protected: + void parse(const std::string &payload); + private: + Headers headers_; + std::vector<返回结果> result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ELASTICSEARCH_MODEL_LISTAPMRESULT_H_ \ No newline at end of file diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/RemoveApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/RemoveApmResult.h index ce2a5b114..4737c99a0 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/model/RemoveApmResult.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/RemoveApmResult.h @@ -37,12 +37,12 @@ namespace AlibabaCloud RemoveApmResult(); explicit RemoveApmResult(const std::string &payload); ~RemoveApmResult(); - std::string getRequestId()const; + bool getResult()const; protected: void parse(const std::string &payload); private: - std::string requestId_; + bool result_; }; } diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/StartApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/StartApmResult.h index 1a8bcb300..11202f958 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/model/StartApmResult.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/StartApmResult.h @@ -37,12 +37,12 @@ namespace AlibabaCloud StartApmResult(); explicit StartApmResult(const std::string &payload); ~StartApmResult(); - std::string getRequestId()const; + bool getResult()const; protected: void parse(const std::string &payload); private: - std::string requestId_; + bool result_; }; } diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/StopApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/StopApmResult.h index 67d856427..103dc98e3 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/model/StopApmResult.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/StopApmResult.h @@ -37,12 +37,12 @@ namespace AlibabaCloud StopApmResult(); explicit StopApmResult(const std::string &payload); ~StopApmResult(); - std::string getRequestId()const; + bool getResult()const; protected: void parse(const std::string &payload); private: - std::string requestId_; + bool result_; }; } diff --git a/elasticsearch/include/alibabacloud/elasticsearch/model/UpdateApmResult.h b/elasticsearch/include/alibabacloud/elasticsearch/model/UpdateApmResult.h index fd33fd179..11f1152ce 100644 --- a/elasticsearch/include/alibabacloud/elasticsearch/model/UpdateApmResult.h +++ b/elasticsearch/include/alibabacloud/elasticsearch/model/UpdateApmResult.h @@ -37,12 +37,12 @@ namespace AlibabaCloud UpdateApmResult(); explicit UpdateApmResult(const std::string &payload); ~UpdateApmResult(); - std::string getRequestId()const; + bool getResult()const; protected: void parse(const std::string &payload); private: - std::string requestId_; + bool result_; }; } diff --git a/elasticsearch/src/ElasticsearchClient.cc b/elasticsearch/src/ElasticsearchClient.cc index c411122de..01a4debef 100644 --- a/elasticsearch/src/ElasticsearchClient.cc +++ b/elasticsearch/src/ElasticsearchClient.cc @@ -2715,6 +2715,42 @@ ElasticsearchClient::ListAlternativeSnapshotReposOutcomeCallable ElasticsearchCl return task->get_future(); } +ElasticsearchClient::ListApmOutcome ElasticsearchClient::listApm(const ListApmRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListApmOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListApmOutcome(ListApmResult(outcome.result())); + else + return ListApmOutcome(outcome.error()); +} + +void ElasticsearchClient::listApmAsync(const ListApmRequest& request, const ListApmAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listApm(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ElasticsearchClient::ListApmOutcomeCallable ElasticsearchClient::listApmCallable(const ListApmRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listApm(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ElasticsearchClient::ListAvailableEsInstanceIdsOutcome ElasticsearchClient::listAvailableEsInstanceIds(const ListAvailableEsInstanceIdsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/elasticsearch/src/model/DescribeApmResult.cc b/elasticsearch/src/model/DescribeApmResult.cc index 61cca2eb7..78db6c5ef 100644 --- a/elasticsearch/src/model/DescribeApmResult.cc +++ b/elasticsearch/src/model/DescribeApmResult.cc @@ -40,44 +40,46 @@ void DescribeApmResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto resultNode = value["Result"]; - if(!resultNode["CreatedAt"].isNull()) - result_.createdAt = resultNode["CreatedAt"].asString(); - if(!resultNode["DeployedReplica"].isNull()) - result_.deployedReplica = std::stol(resultNode["DeployedReplica"].asString()); - if(!resultNode["Description"].isNull()) - result_.description = resultNode["Description"].asString(); - if(!resultNode["EndTime"].isNull()) - result_.endTime = std::stol(resultNode["EndTime"].asString()); - if(!resultNode["InstanceId"].isNull()) - result_.instanceId = resultNode["InstanceId"].asString(); - if(!resultNode["NodeAmount"].isNull()) - result_.nodeAmount = std::stol(resultNode["NodeAmount"].asString()); - if(!resultNode["OutputES"].isNull()) - result_.outputES = resultNode["OutputES"].asString(); - if(!resultNode["OutputESUserName"].isNull()) - result_.outputESUserName = resultNode["OutputESUserName"].asString(); - if(!resultNode["OutputEsDescription"].isNull()) - result_.outputEsDescription = resultNode["OutputEsDescription"].asString(); - if(!resultNode["OwnerId"].isNull()) - result_.ownerId = resultNode["OwnerId"].asString(); - if(!resultNode["PaymentType"].isNull()) - result_.paymentType = resultNode["PaymentType"].asString(); - if(!resultNode["Region"].isNull()) - result_.region = resultNode["Region"].asString(); - if(!resultNode["Replica"].isNull()) - result_.replica = std::stol(resultNode["Replica"].asString()); - if(!resultNode["ResourceSpec"].isNull()) - result_.resourceSpec = resultNode["ResourceSpec"].asString(); - if(!resultNode["Status"].isNull()) - result_.status = resultNode["Status"].asString(); - if(!resultNode["Version"].isNull()) - result_.version = resultNode["Version"].asString(); - if(!resultNode["VpcId"].isNull()) - result_.vpcId = resultNode["VpcId"].asString(); - if(!resultNode["VsArea"].isNull()) - result_.vsArea = resultNode["VsArea"].asString(); - if(!resultNode["VswitchId"].isNull()) - result_.vswitchId = resultNode["VswitchId"].asString(); + if(!resultNode["apmServerDomain"].isNull()) + result_.apmServerDomain = resultNode["apmServerDomain"].asString(); + if(!resultNode["createdAt"].isNull()) + result_.createdAt = resultNode["createdAt"].asString(); + if(!resultNode["deployedReplica"].isNull()) + result_.deployedReplica = std::stol(resultNode["deployedReplica"].asString()); + if(!resultNode["description"].isNull()) + result_.description = resultNode["description"].asString(); + if(!resultNode["endTime"].isNull()) + result_.endTime = std::stol(resultNode["endTime"].asString()); + if(!resultNode["instanceId"].isNull()) + result_.instanceId = resultNode["instanceId"].asString(); + if(!resultNode["nodeAmount"].isNull()) + result_.nodeAmount = std::stol(resultNode["nodeAmount"].asString()); + if(!resultNode["outputES"].isNull()) + result_.outputES = resultNode["outputES"].asString(); + if(!resultNode["outputESUserName"].isNull()) + result_.outputESUserName = resultNode["outputESUserName"].asString(); + if(!resultNode["outputEsDescription"].isNull()) + result_.outputEsDescription = resultNode["outputEsDescription"].asString(); + if(!resultNode["ownerId"].isNull()) + result_.ownerId = resultNode["ownerId"].asString(); + if(!resultNode["paymentType"].isNull()) + result_.paymentType = resultNode["paymentType"].asString(); + if(!resultNode["region"].isNull()) + result_.region = resultNode["region"].asString(); + if(!resultNode["replica"].isNull()) + result_.replica = std::stoi(resultNode["replica"].asString()); + if(!resultNode["resourceSpec"].isNull()) + result_.resourceSpec = resultNode["resourceSpec"].asString(); + if(!resultNode["status"].isNull()) + result_.status = resultNode["status"].asString(); + if(!resultNode["version"].isNull()) + result_.version = resultNode["version"].asString(); + if(!resultNode["vpcId"].isNull()) + result_.vpcId = resultNode["vpcId"].asString(); + if(!resultNode["vsArea"].isNull()) + result_.vsArea = resultNode["vsArea"].asString(); + if(!resultNode["vswitchId"].isNull()) + result_.vswitchId = resultNode["vswitchId"].asString(); } diff --git a/elasticsearch/src/model/ListApmRequest.cc b/elasticsearch/src/model/ListApmRequest.cc new file mode 100644 index 000000000..22c5d6b42 --- /dev/null +++ b/elasticsearch/src/model/ListApmRequest.cc @@ -0,0 +1,85 @@ +/* + * 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::Elasticsearch::Model::ListApmRequest; + +ListApmRequest::ListApmRequest() : + RoaServiceRequest("elasticsearch", "2017-06-13") +{ + setResourcePath("/openapi/apm"); + setMethod(HttpRequest::Method::Get); +} + +ListApmRequest::~ListApmRequest() +{} + +std::string ListApmRequest::getOutput()const +{ + return output_; +} + +void ListApmRequest::setOutput(const std::string& output) +{ + output_ = output; + setParameter("Output", output); +} + +std::string ListApmRequest::getInstanceId()const +{ + return instanceId_; +} + +void ListApmRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setParameter("InstanceId", instanceId); +} + +long ListApmRequest::getSize()const +{ + return size_; +} + +void ListApmRequest::setSize(long size) +{ + size_ = size; + setParameter("Size", std::to_string(size)); +} + +std::string ListApmRequest::getDescription()const +{ + return description_; +} + +void ListApmRequest::setDescription(const std::string& description) +{ + description_ = description; + setParameter("Description", description); +} + +long ListApmRequest::getPage()const +{ + return page_; +} + +void ListApmRequest::setPage(long page) +{ + page_ = page; + setParameter("Page", std::to_string(page)); +} + diff --git a/elasticsearch/src/model/ListApmResult.cc b/elasticsearch/src/model/ListApmResult.cc new file mode 100644 index 000000000..51dea9879 --- /dev/null +++ b/elasticsearch/src/model/ListApmResult.cc @@ -0,0 +1,97 @@ +/* + * 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::Elasticsearch; +using namespace AlibabaCloud::Elasticsearch::Model; + +ListApmResult::ListApmResult() : + ServiceResult() +{} + +ListApmResult::ListApmResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListApmResult::~ListApmResult() +{} + +void ListApmResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResultNode = value["Result"]["返回结果"]; + for (auto valueResult返回结果 : allResultNode) + { + 返回结果 resultObject; + if(!valueResult返回结果["createdAt"].isNull()) + resultObject.createdAt = valueResult返回结果["createdAt"].asString(); + if(!valueResult返回结果["deployedReplica"].isNull()) + resultObject.deployedReplica = std::stol(valueResult返回结果["deployedReplica"].asString()); + if(!valueResult返回结果["description"].isNull()) + resultObject.description = valueResult返回结果["description"].asString(); + if(!valueResult返回结果["instanceId"].isNull()) + resultObject.instanceId = valueResult返回结果["instanceId"].asString(); + if(!valueResult返回结果["nodeAmount"].isNull()) + resultObject.nodeAmount = std::stol(valueResult返回结果["nodeAmount"].asString()); + if(!valueResult返回结果["outputES"].isNull()) + resultObject.outputES = valueResult返回结果["outputES"].asString(); + if(!valueResult返回结果["outputESUserName"].isNull()) + resultObject.outputESUserName = valueResult返回结果["outputESUserName"].asString(); + if(!valueResult返回结果["ownerId"].isNull()) + resultObject.ownerId = valueResult返回结果["ownerId"].asString(); + if(!valueResult返回结果["paymentType"].isNull()) + resultObject.paymentType = valueResult返回结果["paymentType"].asString(); + if(!valueResult返回结果["region"].isNull()) + resultObject.region = valueResult返回结果["region"].asString(); + if(!valueResult返回结果["replica"].isNull()) + resultObject.replica = std::stol(valueResult返回结果["replica"].asString()); + if(!valueResult返回结果["resourceSpec"].isNull()) + resultObject.resourceSpec = valueResult返回结果["resourceSpec"].asString(); + if(!valueResult返回结果["status"].isNull()) + resultObject.status = valueResult返回结果["status"].asString(); + if(!valueResult返回结果["version"].isNull()) + resultObject.version = valueResult返回结果["version"].asString(); + if(!valueResult返回结果["vpcId"].isNull()) + resultObject.vpcId = valueResult返回结果["vpcId"].asString(); + if(!valueResult返回结果["vsArea"].isNull()) + resultObject.vsArea = valueResult返回结果["vsArea"].asString(); + if(!valueResult返回结果["vswitchId"].isNull()) + resultObject.vswitchId = valueResult返回结果["vswitchId"].asString(); + result_.push_back(resultObject); + } + auto headersNode = value["Headers"]; + if(!headersNode["X-Total-Count"].isNull()) + headers_.xTotalCount = std::stol(headersNode["X-Total-Count"].asString()); + +} + +ListApmResult::Headers ListApmResult::getHeaders()const +{ + return headers_; +} + +std::vector ListApmResult::getResult()const +{ + return result_; +} + diff --git a/elasticsearch/src/model/RemoveApmResult.cc b/elasticsearch/src/model/RemoveApmResult.cc index 989e94f59..ef8d1e2a2 100644 --- a/elasticsearch/src/model/RemoveApmResult.cc +++ b/elasticsearch/src/model/RemoveApmResult.cc @@ -39,13 +39,13 @@ void RemoveApmResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["requestId"].isNull()) - requestId_ = value["requestId"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; } -std::string RemoveApmResult::getRequestId()const +bool RemoveApmResult::getResult()const { - return requestId_; + return result_; } diff --git a/elasticsearch/src/model/StartApmResult.cc b/elasticsearch/src/model/StartApmResult.cc index fbf3ba358..7154ab3fc 100644 --- a/elasticsearch/src/model/StartApmResult.cc +++ b/elasticsearch/src/model/StartApmResult.cc @@ -39,13 +39,13 @@ void StartApmResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["requestId"].isNull()) - requestId_ = value["requestId"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; } -std::string StartApmResult::getRequestId()const +bool StartApmResult::getResult()const { - return requestId_; + return result_; } diff --git a/elasticsearch/src/model/StopApmResult.cc b/elasticsearch/src/model/StopApmResult.cc index 40db116e1..ac16dfdb6 100644 --- a/elasticsearch/src/model/StopApmResult.cc +++ b/elasticsearch/src/model/StopApmResult.cc @@ -39,13 +39,13 @@ void StopApmResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["requestId"].isNull()) - requestId_ = value["requestId"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; } -std::string StopApmResult::getRequestId()const +bool StopApmResult::getResult()const { - return requestId_; + return result_; } diff --git a/elasticsearch/src/model/UpdateApmResult.cc b/elasticsearch/src/model/UpdateApmResult.cc index ba2b9ac30..f573fa3ef 100644 --- a/elasticsearch/src/model/UpdateApmResult.cc +++ b/elasticsearch/src/model/UpdateApmResult.cc @@ -39,13 +39,13 @@ void UpdateApmResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["requestId"].isNull()) - requestId_ = value["requestId"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; } -std::string UpdateApmResult::getRequestId()const +bool UpdateApmResult::getResult()const { - return requestId_; + return result_; }