Add GetMultipleTrace api.
This commit is contained in:
@@ -447,6 +447,114 @@ ARMSClient::DeleteRetcodeAppOutcomeCallable ARMSClient::deleteRetcodeAppCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::DeleteTraceAppOutcome ARMSClient::deleteTraceApp(const DeleteTraceAppRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteTraceAppOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteTraceAppOutcome(DeleteTraceAppResult(outcome.result()));
|
||||
else
|
||||
return DeleteTraceAppOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::deleteTraceAppAsync(const DeleteTraceAppRequest& request, const DeleteTraceAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteTraceApp(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::DeleteTraceAppOutcomeCallable ARMSClient::deleteTraceAppCallable(const DeleteTraceAppRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteTraceAppOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteTraceApp(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::DescribeTraceLicenseKeyOutcome ARMSClient::describeTraceLicenseKey(const DescribeTraceLicenseKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeTraceLicenseKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeTraceLicenseKeyOutcome(DescribeTraceLicenseKeyResult(outcome.result()));
|
||||
else
|
||||
return DescribeTraceLicenseKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::describeTraceLicenseKeyAsync(const DescribeTraceLicenseKeyRequest& request, const DescribeTraceLicenseKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeTraceLicenseKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::DescribeTraceLicenseKeyOutcomeCallable ARMSClient::describeTraceLicenseKeyCallable(const DescribeTraceLicenseKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeTraceLicenseKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeTraceLicenseKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::DescribeTraceLocationOutcome ARMSClient::describeTraceLocation(const DescribeTraceLocationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeTraceLocationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeTraceLocationOutcome(DescribeTraceLocationResult(outcome.result()));
|
||||
else
|
||||
return DescribeTraceLocationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::describeTraceLocationAsync(const DescribeTraceLocationRequest& request, const DescribeTraceLocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeTraceLocation(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::DescribeTraceLocationOutcomeCallable ARMSClient::describeTraceLocationCallable(const DescribeTraceLocationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeTraceLocationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeTraceLocation(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::GetConsistencySnapshotOutcome ARMSClient::getConsistencySnapshot(const GetConsistencySnapshotRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -483,6 +591,42 @@ ARMSClient::GetConsistencySnapshotOutcomeCallable ARMSClient::getConsistencySnap
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::GetMultipleTraceOutcome ARMSClient::getMultipleTrace(const GetMultipleTraceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetMultipleTraceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetMultipleTraceOutcome(GetMultipleTraceResult(outcome.result()));
|
||||
else
|
||||
return GetMultipleTraceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::getMultipleTraceAsync(const GetMultipleTraceRequest& request, const GetMultipleTraceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getMultipleTrace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::GetMultipleTraceOutcomeCallable ARMSClient::getMultipleTraceCallable(const GetMultipleTraceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetMultipleTraceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getMultipleTrace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::GetPrometheusApiTokenOutcome ARMSClient::getPrometheusApiToken(const GetPrometheusApiTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -555,6 +699,42 @@ ARMSClient::GetRetcodeShareUrlOutcomeCallable ARMSClient::getRetcodeShareUrlCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::GetStackOutcome ARMSClient::getStack(const GetStackRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetStackOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetStackOutcome(GetStackResult(outcome.result()));
|
||||
else
|
||||
return GetStackOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::getStackAsync(const GetStackRequest& request, const GetStackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getStack(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::GetStackOutcomeCallable ARMSClient::getStackCallable(const GetStackRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetStackOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getStack(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::GetTraceOutcome ARMSClient::getTrace(const GetTraceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1239,6 +1419,42 @@ ARMSClient::SearchTracesOutcomeCallable ARMSClient::searchTracesCallable(const S
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::SearchTracesByPageOutcome ARMSClient::searchTracesByPage(const SearchTracesByPageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SearchTracesByPageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SearchTracesByPageOutcome(SearchTracesByPageResult(outcome.result()));
|
||||
else
|
||||
return SearchTracesByPageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::searchTracesByPageAsync(const SearchTracesByPageRequest& request, const SearchTracesByPageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, searchTracesByPage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::SearchTracesByPageOutcomeCallable ARMSClient::searchTracesByPageCallable(const SearchTracesByPageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SearchTracesByPageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->searchTracesByPage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::SetRetcodeShareStatusOutcome ARMSClient::setRetcodeShareStatus(const SetRetcodeShareStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
62
arms/src/model/DeleteTraceAppRequest.cc
Normal file
62
arms/src/model/DeleteTraceAppRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/arms/model/DeleteTraceAppRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::DeleteTraceAppRequest;
|
||||
|
||||
DeleteTraceAppRequest::DeleteTraceAppRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "DeleteTraceApp")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteTraceAppRequest::~DeleteTraceAppRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteTraceAppRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteTraceAppRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DeleteTraceAppRequest::getAppId()const
|
||||
{
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void DeleteTraceAppRequest::setAppId(const std::string& appId)
|
||||
{
|
||||
appId_ = appId;
|
||||
setParameter("AppId", appId);
|
||||
}
|
||||
|
||||
std::string DeleteTraceAppRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void DeleteTraceAppRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
51
arms/src/model/DeleteTraceAppResult.cc
Normal file
51
arms/src/model/DeleteTraceAppResult.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/arms/model/DeleteTraceAppResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
DeleteTraceAppResult::DeleteTraceAppResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteTraceAppResult::DeleteTraceAppResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteTraceAppResult::~DeleteTraceAppResult()
|
||||
{}
|
||||
|
||||
void DeleteTraceAppResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteTraceAppResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
40
arms/src/model/DescribeTraceLicenseKeyRequest.cc
Normal file
40
arms/src/model/DescribeTraceLicenseKeyRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/arms/model/DescribeTraceLicenseKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::DescribeTraceLicenseKeyRequest;
|
||||
|
||||
DescribeTraceLicenseKeyRequest::DescribeTraceLicenseKeyRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "DescribeTraceLicenseKey")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeTraceLicenseKeyRequest::~DescribeTraceLicenseKeyRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeTraceLicenseKeyRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeTraceLicenseKeyRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
51
arms/src/model/DescribeTraceLicenseKeyResult.cc
Normal file
51
arms/src/model/DescribeTraceLicenseKeyResult.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/arms/model/DescribeTraceLicenseKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
DescribeTraceLicenseKeyResult::DescribeTraceLicenseKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeTraceLicenseKeyResult::DescribeTraceLicenseKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeTraceLicenseKeyResult::~DescribeTraceLicenseKeyResult()
|
||||
{}
|
||||
|
||||
void DescribeTraceLicenseKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["LicenseKey"].isNull())
|
||||
licenseKey_ = value["LicenseKey"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeTraceLicenseKeyResult::getLicenseKey()const
|
||||
{
|
||||
return licenseKey_;
|
||||
}
|
||||
|
||||
40
arms/src/model/DescribeTraceLocationRequest.cc
Normal file
40
arms/src/model/DescribeTraceLocationRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/arms/model/DescribeTraceLocationRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::DescribeTraceLocationRequest;
|
||||
|
||||
DescribeTraceLocationRequest::DescribeTraceLocationRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "DescribeTraceLocation")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeTraceLocationRequest::~DescribeTraceLocationRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeTraceLocationRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeTraceLocationRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
59
arms/src/model/DescribeTraceLocationResult.cc
Normal file
59
arms/src/model/DescribeTraceLocationResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/arms/model/DescribeTraceLocationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
DescribeTraceLocationResult::DescribeTraceLocationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeTraceLocationResult::DescribeTraceLocationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeTraceLocationResult::~DescribeTraceLocationResult()
|
||||
{}
|
||||
|
||||
void DescribeTraceLocationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRegionConfigsNode = value["RegionConfigs"]["RegionConfig"];
|
||||
for (auto valueRegionConfigsRegionConfig : allRegionConfigsNode)
|
||||
{
|
||||
RegionConfig regionConfigsObject;
|
||||
if(!valueRegionConfigsRegionConfig["RegionNo"].isNull())
|
||||
regionConfigsObject.regionNo = valueRegionConfigsRegionConfig["RegionNo"].asString();
|
||||
if(!valueRegionConfigsRegionConfig["Url"].isNull())
|
||||
regionConfigsObject.url = valueRegionConfigsRegionConfig["Url"].asString();
|
||||
regionConfigs_.push_back(regionConfigsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeTraceLocationResult::RegionConfig> DescribeTraceLocationResult::getRegionConfigs()const
|
||||
{
|
||||
return regionConfigs_;
|
||||
}
|
||||
|
||||
53
arms/src/model/GetMultipleTraceRequest.cc
Normal file
53
arms/src/model/GetMultipleTraceRequest.cc
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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/arms/model/GetMultipleTraceRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::GetMultipleTraceRequest;
|
||||
|
||||
GetMultipleTraceRequest::GetMultipleTraceRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "GetMultipleTrace")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetMultipleTraceRequest::~GetMultipleTraceRequest()
|
||||
{}
|
||||
|
||||
std::vector<std::string> GetMultipleTraceRequest::getTraceIDs()const
|
||||
{
|
||||
return traceIDs_;
|
||||
}
|
||||
|
||||
void GetMultipleTraceRequest::setTraceIDs(const std::vector<std::string>& traceIDs)
|
||||
{
|
||||
traceIDs_ = traceIDs;
|
||||
for(int dep1 = 0; dep1!= traceIDs.size(); dep1++) {
|
||||
setParameter("TraceIDs."+ std::to_string(dep1), traceIDs.at(dep1));
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetMultipleTraceRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetMultipleTraceRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
111
arms/src/model/GetMultipleTraceResult.cc
Normal file
111
arms/src/model/GetMultipleTraceResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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/arms/model/GetMultipleTraceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
GetMultipleTraceResult::GetMultipleTraceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetMultipleTraceResult::GetMultipleTraceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetMultipleTraceResult::~GetMultipleTraceResult()
|
||||
{}
|
||||
|
||||
void GetMultipleTraceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMultiCallChainInfosNode = value["MultiCallChainInfos"]["MultiCallChainInfo"];
|
||||
for (auto valueMultiCallChainInfosMultiCallChainInfo : allMultiCallChainInfosNode)
|
||||
{
|
||||
MultiCallChainInfo multiCallChainInfosObject;
|
||||
if(!valueMultiCallChainInfosMultiCallChainInfo["TraceID"].isNull())
|
||||
multiCallChainInfosObject.traceID = valueMultiCallChainInfosMultiCallChainInfo["TraceID"].asString();
|
||||
auto allSpansNode = allMultiCallChainInfosNode["Spans"]["Span"];
|
||||
for (auto allMultiCallChainInfosNodeSpansSpan : allSpansNode)
|
||||
{
|
||||
MultiCallChainInfo::Span spansObject;
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["TraceID"].isNull())
|
||||
spansObject.traceID = allMultiCallChainInfosNodeSpansSpan["TraceID"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["OperationName"].isNull())
|
||||
spansObject.operationName = allMultiCallChainInfosNodeSpansSpan["OperationName"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["Duration"].isNull())
|
||||
spansObject.duration = std::stol(allMultiCallChainInfosNodeSpansSpan["Duration"].asString());
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["ServiceName"].isNull())
|
||||
spansObject.serviceName = allMultiCallChainInfosNodeSpansSpan["ServiceName"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["ServiceIp"].isNull())
|
||||
spansObject.serviceIp = allMultiCallChainInfosNodeSpansSpan["ServiceIp"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["Timestamp"].isNull())
|
||||
spansObject.timestamp = std::stol(allMultiCallChainInfosNodeSpansSpan["Timestamp"].asString());
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["RpcId"].isNull())
|
||||
spansObject.rpcId = allMultiCallChainInfosNodeSpansSpan["RpcId"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["ResultCode"].isNull())
|
||||
spansObject.resultCode = allMultiCallChainInfosNodeSpansSpan["ResultCode"].asString();
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["HaveStack"].isNull())
|
||||
spansObject.haveStack = allMultiCallChainInfosNodeSpansSpan["HaveStack"].asString() == "true";
|
||||
if(!allMultiCallChainInfosNodeSpansSpan["RpcType"].isNull())
|
||||
spansObject.rpcType = std::stoi(allMultiCallChainInfosNodeSpansSpan["RpcType"].asString());
|
||||
auto allTagEntryListNode = allSpansNode["TagEntryList"]["TagEntry"];
|
||||
for (auto allSpansNodeTagEntryListTagEntry : allTagEntryListNode)
|
||||
{
|
||||
MultiCallChainInfo::Span::TagEntry tagEntryListObject;
|
||||
if(!allSpansNodeTagEntryListTagEntry["Key"].isNull())
|
||||
tagEntryListObject.key = allSpansNodeTagEntryListTagEntry["Key"].asString();
|
||||
if(!allSpansNodeTagEntryListTagEntry["Value"].isNull())
|
||||
tagEntryListObject.value = allSpansNodeTagEntryListTagEntry["Value"].asString();
|
||||
spansObject.tagEntryList.push_back(tagEntryListObject);
|
||||
}
|
||||
auto allLogEventListNode = allSpansNode["LogEventList"]["LogEvent"];
|
||||
for (auto allSpansNodeLogEventListLogEvent : allLogEventListNode)
|
||||
{
|
||||
MultiCallChainInfo::Span::LogEvent logEventListObject;
|
||||
if(!allSpansNodeLogEventListLogEvent["Timestamp"].isNull())
|
||||
logEventListObject.timestamp = std::stol(allSpansNodeLogEventListLogEvent["Timestamp"].asString());
|
||||
auto allTagEntryList1Node = allLogEventListNode["TagEntryList"]["TagEntry"];
|
||||
for (auto allLogEventListNodeTagEntryListTagEntry : allTagEntryList1Node)
|
||||
{
|
||||
MultiCallChainInfo::Span::LogEvent::TagEntry2 tagEntryList1Object;
|
||||
if(!allLogEventListNodeTagEntryListTagEntry["Key"].isNull())
|
||||
tagEntryList1Object.key = allLogEventListNodeTagEntryListTagEntry["Key"].asString();
|
||||
if(!allLogEventListNodeTagEntryListTagEntry["Value"].isNull())
|
||||
tagEntryList1Object.value = allLogEventListNodeTagEntryListTagEntry["Value"].asString();
|
||||
logEventListObject.tagEntryList1.push_back(tagEntryList1Object);
|
||||
}
|
||||
spansObject.logEventList.push_back(logEventListObject);
|
||||
}
|
||||
multiCallChainInfosObject.spans.push_back(spansObject);
|
||||
}
|
||||
multiCallChainInfos_.push_back(multiCallChainInfosObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetMultipleTraceResult::MultiCallChainInfo> GetMultipleTraceResult::getMultiCallChainInfos()const
|
||||
{
|
||||
return multiCallChainInfos_;
|
||||
}
|
||||
|
||||
62
arms/src/model/GetStackRequest.cc
Normal file
62
arms/src/model/GetStackRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/arms/model/GetStackRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::GetStackRequest;
|
||||
|
||||
GetStackRequest::GetStackRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "GetStack")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetStackRequest::~GetStackRequest()
|
||||
{}
|
||||
|
||||
std::string GetStackRequest::getTraceID()const
|
||||
{
|
||||
return traceID_;
|
||||
}
|
||||
|
||||
void GetStackRequest::setTraceID(const std::string& traceID)
|
||||
{
|
||||
traceID_ = traceID;
|
||||
setParameter("TraceID", traceID);
|
||||
}
|
||||
|
||||
std::string GetStackRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetStackRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string GetStackRequest::getRpcID()const
|
||||
{
|
||||
return rpcID_;
|
||||
}
|
||||
|
||||
void GetStackRequest::setRpcID(const std::string& rpcID)
|
||||
{
|
||||
rpcID_ = rpcID;
|
||||
setParameter("RpcID", rpcID);
|
||||
}
|
||||
|
||||
79
arms/src/model/GetStackResult.cc
Normal file
79
arms/src/model/GetStackResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/arms/model/GetStackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
GetStackResult::GetStackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetStackResult::GetStackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetStackResult::~GetStackResult()
|
||||
{}
|
||||
|
||||
void GetStackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allStackInfoNode = value["StackInfo"]["StackInfoItem"];
|
||||
for (auto valueStackInfoStackInfoItem : allStackInfoNode)
|
||||
{
|
||||
StackInfoItem stackInfoObject;
|
||||
if(!valueStackInfoStackInfoItem["StartTime"].isNull())
|
||||
stackInfoObject.startTime = std::stol(valueStackInfoStackInfoItem["StartTime"].asString());
|
||||
if(!valueStackInfoStackInfoItem["Duration"].isNull())
|
||||
stackInfoObject.duration = std::stol(valueStackInfoStackInfoItem["Duration"].asString());
|
||||
if(!valueStackInfoStackInfoItem["RpcId"].isNull())
|
||||
stackInfoObject.rpcId = valueStackInfoStackInfoItem["RpcId"].asString();
|
||||
if(!valueStackInfoStackInfoItem["ServiceName"].isNull())
|
||||
stackInfoObject.serviceName = valueStackInfoStackInfoItem["ServiceName"].asString();
|
||||
if(!valueStackInfoStackInfoItem["Api"].isNull())
|
||||
stackInfoObject.api = valueStackInfoStackInfoItem["Api"].asString();
|
||||
if(!valueStackInfoStackInfoItem["Exception"].isNull())
|
||||
stackInfoObject.exception = valueStackInfoStackInfoItem["Exception"].asString();
|
||||
if(!valueStackInfoStackInfoItem["Line"].isNull())
|
||||
stackInfoObject.line = valueStackInfoStackInfoItem["Line"].asString();
|
||||
auto allExtInfoNode = allStackInfoNode["ExtInfo"]["ExtInfoItem"];
|
||||
for (auto allStackInfoNodeExtInfoExtInfoItem : allExtInfoNode)
|
||||
{
|
||||
StackInfoItem::ExtInfoItem extInfoObject;
|
||||
if(!allStackInfoNodeExtInfoExtInfoItem["Type"].isNull())
|
||||
extInfoObject.type = allStackInfoNodeExtInfoExtInfoItem["Type"].asString();
|
||||
if(!allStackInfoNodeExtInfoExtInfoItem["Info"].isNull())
|
||||
extInfoObject.info = allStackInfoNodeExtInfoExtInfoItem["Info"].asString();
|
||||
stackInfoObject.extInfo.push_back(extInfoObject);
|
||||
}
|
||||
stackInfo_.push_back(stackInfoObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetStackResult::StackInfoItem> GetStackResult::getStackInfo()const
|
||||
{
|
||||
return stackInfo_;
|
||||
}
|
||||
|
||||
155
arms/src/model/SearchTracesByPageRequest.cc
Normal file
155
arms/src/model/SearchTracesByPageRequest.cc
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* 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/arms/model/SearchTracesByPageRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::SearchTracesByPageRequest;
|
||||
|
||||
SearchTracesByPageRequest::SearchTracesByPageRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "SearchTracesByPage")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SearchTracesByPageRequest::~SearchTracesByPageRequest()
|
||||
{}
|
||||
|
||||
long SearchTracesByPageRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long SearchTracesByPageRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
bool SearchTracesByPageRequest::getReverse()const
|
||||
{
|
||||
return reverse_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setReverse(bool reverse)
|
||||
{
|
||||
reverse_ = reverse;
|
||||
setParameter("Reverse", reverse ? "true" : "false");
|
||||
}
|
||||
|
||||
long SearchTracesByPageRequest::getMinDuration()const
|
||||
{
|
||||
return minDuration_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setMinDuration(long minDuration)
|
||||
{
|
||||
minDuration_ = minDuration;
|
||||
setParameter("MinDuration", std::to_string(minDuration));
|
||||
}
|
||||
|
||||
int SearchTracesByPageRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string SearchTracesByPageRequest::getServiceIp()const
|
||||
{
|
||||
return serviceIp_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setServiceIp(const std::string& serviceIp)
|
||||
{
|
||||
serviceIp_ = serviceIp;
|
||||
setParameter("ServiceIp", serviceIp);
|
||||
}
|
||||
|
||||
std::vector<SearchTracesByPageRequest::ExclusionFilters> SearchTracesByPageRequest::getExclusionFilters()const
|
||||
{
|
||||
return exclusionFilters_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setExclusionFilters(const std::vector<ExclusionFilters>& exclusionFilters)
|
||||
{
|
||||
exclusionFilters_ = exclusionFilters;
|
||||
for(int dep1 = 0; dep1!= exclusionFilters.size(); dep1++) {
|
||||
auto exclusionFiltersObj = exclusionFilters.at(dep1);
|
||||
std::string exclusionFiltersObjStr = "ExclusionFilters." + std::to_string(dep1 + 1);
|
||||
setParameter(exclusionFiltersObjStr + ".Value", exclusionFiltersObj.value);
|
||||
setParameter(exclusionFiltersObjStr + ".Key", exclusionFiltersObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SearchTracesByPageRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string SearchTracesByPageRequest::getOperationName()const
|
||||
{
|
||||
return operationName_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setOperationName(const std::string& operationName)
|
||||
{
|
||||
operationName_ = operationName;
|
||||
setParameter("OperationName", operationName);
|
||||
}
|
||||
|
||||
int SearchTracesByPageRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string SearchTracesByPageRequest::getServiceName()const
|
||||
{
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void SearchTracesByPageRequest::setServiceName(const std::string& serviceName)
|
||||
{
|
||||
serviceName_ = serviceName;
|
||||
setParameter("ServiceName", serviceName);
|
||||
}
|
||||
|
||||
74
arms/src/model/SearchTracesByPageResult.cc
Normal file
74
arms/src/model/SearchTracesByPageResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/arms/model/SearchTracesByPageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
SearchTracesByPageResult::SearchTracesByPageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SearchTracesByPageResult::SearchTracesByPageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SearchTracesByPageResult::~SearchTracesByPageResult()
|
||||
{}
|
||||
|
||||
void SearchTracesByPageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto pageBeanNode = value["PageBean"];
|
||||
if(!pageBeanNode["Total"].isNull())
|
||||
pageBean_.total = std::stoi(pageBeanNode["Total"].asString());
|
||||
if(!pageBeanNode["PageNumber"].isNull())
|
||||
pageBean_.pageNumber = std::stoi(pageBeanNode["PageNumber"].asString());
|
||||
if(!pageBeanNode["PageSize"].isNull())
|
||||
pageBean_.pageSize = std::stoi(pageBeanNode["PageSize"].asString());
|
||||
auto allTraceInfosNode = pageBeanNode["TraceInfos"]["TraceInfo"];
|
||||
for (auto pageBeanNodeTraceInfosTraceInfo : allTraceInfosNode)
|
||||
{
|
||||
PageBean::TraceInfo traceInfoObject;
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["TraceID"].isNull())
|
||||
traceInfoObject.traceID = pageBeanNodeTraceInfosTraceInfo["TraceID"].asString();
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["OperationName"].isNull())
|
||||
traceInfoObject.operationName = pageBeanNodeTraceInfosTraceInfo["OperationName"].asString();
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["ServiceName"].isNull())
|
||||
traceInfoObject.serviceName = pageBeanNodeTraceInfosTraceInfo["ServiceName"].asString();
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["ServiceIp"].isNull())
|
||||
traceInfoObject.serviceIp = pageBeanNodeTraceInfosTraceInfo["ServiceIp"].asString();
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["Duration"].isNull())
|
||||
traceInfoObject.duration = std::stol(pageBeanNodeTraceInfosTraceInfo["Duration"].asString());
|
||||
if(!pageBeanNodeTraceInfosTraceInfo["Timestamp"].isNull())
|
||||
traceInfoObject.timestamp = std::stol(pageBeanNodeTraceInfosTraceInfo["Timestamp"].asString());
|
||||
pageBean_.traceInfos.push_back(traceInfoObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SearchTracesByPageResult::PageBean SearchTracesByPageResult::getPageBean()const
|
||||
{
|
||||
return pageBean_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user