Add GetMultipleTrace api.

This commit is contained in:
sdk-team
2020-06-22 12:15:04 +08:00
parent e32ce45b9d
commit fbf5bf0457
29 changed files with 1848 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2020-06-22 Version: 1.36.470
- Add GetMultipleTrace api.
- Add SearchTracesByPage api.
- Add GetStack api.
2020-06-21 Version: 1.36.469
- Add persons API.

View File

@@ -1 +1 @@
1.36.469
1.36.470

View File

@@ -43,12 +43,22 @@ set(arms_public_header_model
include/alibabacloud/arms/model/DeleteAlertRulesResult.h
include/alibabacloud/arms/model/DeleteRetcodeAppRequest.h
include/alibabacloud/arms/model/DeleteRetcodeAppResult.h
include/alibabacloud/arms/model/DeleteTraceAppRequest.h
include/alibabacloud/arms/model/DeleteTraceAppResult.h
include/alibabacloud/arms/model/DescribeTraceLicenseKeyRequest.h
include/alibabacloud/arms/model/DescribeTraceLicenseKeyResult.h
include/alibabacloud/arms/model/DescribeTraceLocationRequest.h
include/alibabacloud/arms/model/DescribeTraceLocationResult.h
include/alibabacloud/arms/model/GetConsistencySnapshotRequest.h
include/alibabacloud/arms/model/GetConsistencySnapshotResult.h
include/alibabacloud/arms/model/GetMultipleTraceRequest.h
include/alibabacloud/arms/model/GetMultipleTraceResult.h
include/alibabacloud/arms/model/GetPrometheusApiTokenRequest.h
include/alibabacloud/arms/model/GetPrometheusApiTokenResult.h
include/alibabacloud/arms/model/GetRetcodeShareUrlRequest.h
include/alibabacloud/arms/model/GetRetcodeShareUrlResult.h
include/alibabacloud/arms/model/GetStackRequest.h
include/alibabacloud/arms/model/GetStackResult.h
include/alibabacloud/arms/model/GetTraceRequest.h
include/alibabacloud/arms/model/GetTraceResult.h
include/alibabacloud/arms/model/ImportAppAlertRulesRequest.h
@@ -87,6 +97,8 @@ set(arms_public_header_model
include/alibabacloud/arms/model/SearchTraceAppByPageResult.h
include/alibabacloud/arms/model/SearchTracesRequest.h
include/alibabacloud/arms/model/SearchTracesResult.h
include/alibabacloud/arms/model/SearchTracesByPageRequest.h
include/alibabacloud/arms/model/SearchTracesByPageResult.h
include/alibabacloud/arms/model/SetRetcodeShareStatusRequest.h
include/alibabacloud/arms/model/SetRetcodeShareStatusResult.h
include/alibabacloud/arms/model/StartAlertRequest.h
@@ -124,12 +136,22 @@ set(arms_src
src/model/DeleteAlertRulesResult.cc
src/model/DeleteRetcodeAppRequest.cc
src/model/DeleteRetcodeAppResult.cc
src/model/DeleteTraceAppRequest.cc
src/model/DeleteTraceAppResult.cc
src/model/DescribeTraceLicenseKeyRequest.cc
src/model/DescribeTraceLicenseKeyResult.cc
src/model/DescribeTraceLocationRequest.cc
src/model/DescribeTraceLocationResult.cc
src/model/GetConsistencySnapshotRequest.cc
src/model/GetConsistencySnapshotResult.cc
src/model/GetMultipleTraceRequest.cc
src/model/GetMultipleTraceResult.cc
src/model/GetPrometheusApiTokenRequest.cc
src/model/GetPrometheusApiTokenResult.cc
src/model/GetRetcodeShareUrlRequest.cc
src/model/GetRetcodeShareUrlResult.cc
src/model/GetStackRequest.cc
src/model/GetStackResult.cc
src/model/GetTraceRequest.cc
src/model/GetTraceResult.cc
src/model/ImportAppAlertRulesRequest.cc
@@ -168,6 +190,8 @@ set(arms_src
src/model/SearchTraceAppByPageResult.cc
src/model/SearchTracesRequest.cc
src/model/SearchTracesResult.cc
src/model/SearchTracesByPageRequest.cc
src/model/SearchTracesByPageResult.cc
src/model/SetRetcodeShareStatusRequest.cc
src/model/SetRetcodeShareStatusResult.cc
src/model/StartAlertRequest.cc

View File

@@ -44,12 +44,22 @@
#include "model/DeleteAlertRulesResult.h"
#include "model/DeleteRetcodeAppRequest.h"
#include "model/DeleteRetcodeAppResult.h"
#include "model/DeleteTraceAppRequest.h"
#include "model/DeleteTraceAppResult.h"
#include "model/DescribeTraceLicenseKeyRequest.h"
#include "model/DescribeTraceLicenseKeyResult.h"
#include "model/DescribeTraceLocationRequest.h"
#include "model/DescribeTraceLocationResult.h"
#include "model/GetConsistencySnapshotRequest.h"
#include "model/GetConsistencySnapshotResult.h"
#include "model/GetMultipleTraceRequest.h"
#include "model/GetMultipleTraceResult.h"
#include "model/GetPrometheusApiTokenRequest.h"
#include "model/GetPrometheusApiTokenResult.h"
#include "model/GetRetcodeShareUrlRequest.h"
#include "model/GetRetcodeShareUrlResult.h"
#include "model/GetStackRequest.h"
#include "model/GetStackResult.h"
#include "model/GetTraceRequest.h"
#include "model/GetTraceResult.h"
#include "model/ImportAppAlertRulesRequest.h"
@@ -88,6 +98,8 @@
#include "model/SearchTraceAppByPageResult.h"
#include "model/SearchTracesRequest.h"
#include "model/SearchTracesResult.h"
#include "model/SearchTracesByPageRequest.h"
#include "model/SearchTracesByPageResult.h"
#include "model/SetRetcodeShareStatusRequest.h"
#include "model/SetRetcodeShareStatusResult.h"
#include "model/StartAlertRequest.h"
@@ -142,15 +154,30 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DeleteRetcodeAppResult> DeleteRetcodeAppOutcome;
typedef std::future<DeleteRetcodeAppOutcome> DeleteRetcodeAppOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::DeleteRetcodeAppRequest&, const DeleteRetcodeAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteRetcodeAppAsyncHandler;
typedef Outcome<Error, Model::DeleteTraceAppResult> DeleteTraceAppOutcome;
typedef std::future<DeleteTraceAppOutcome> DeleteTraceAppOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::DeleteTraceAppRequest&, const DeleteTraceAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteTraceAppAsyncHandler;
typedef Outcome<Error, Model::DescribeTraceLicenseKeyResult> DescribeTraceLicenseKeyOutcome;
typedef std::future<DescribeTraceLicenseKeyOutcome> DescribeTraceLicenseKeyOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::DescribeTraceLicenseKeyRequest&, const DescribeTraceLicenseKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeTraceLicenseKeyAsyncHandler;
typedef Outcome<Error, Model::DescribeTraceLocationResult> DescribeTraceLocationOutcome;
typedef std::future<DescribeTraceLocationOutcome> DescribeTraceLocationOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::DescribeTraceLocationRequest&, const DescribeTraceLocationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeTraceLocationAsyncHandler;
typedef Outcome<Error, Model::GetConsistencySnapshotResult> GetConsistencySnapshotOutcome;
typedef std::future<GetConsistencySnapshotOutcome> GetConsistencySnapshotOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetConsistencySnapshotRequest&, const GetConsistencySnapshotOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetConsistencySnapshotAsyncHandler;
typedef Outcome<Error, Model::GetMultipleTraceResult> GetMultipleTraceOutcome;
typedef std::future<GetMultipleTraceOutcome> GetMultipleTraceOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetMultipleTraceRequest&, const GetMultipleTraceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMultipleTraceAsyncHandler;
typedef Outcome<Error, Model::GetPrometheusApiTokenResult> GetPrometheusApiTokenOutcome;
typedef std::future<GetPrometheusApiTokenOutcome> GetPrometheusApiTokenOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetPrometheusApiTokenRequest&, const GetPrometheusApiTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPrometheusApiTokenAsyncHandler;
typedef Outcome<Error, Model::GetRetcodeShareUrlResult> GetRetcodeShareUrlOutcome;
typedef std::future<GetRetcodeShareUrlOutcome> GetRetcodeShareUrlOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetRetcodeShareUrlRequest&, const GetRetcodeShareUrlOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetRetcodeShareUrlAsyncHandler;
typedef Outcome<Error, Model::GetStackResult> GetStackOutcome;
typedef std::future<GetStackOutcome> GetStackOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetStackRequest&, const GetStackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetStackAsyncHandler;
typedef Outcome<Error, Model::GetTraceResult> GetTraceOutcome;
typedef std::future<GetTraceOutcome> GetTraceOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::GetTraceRequest&, const GetTraceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTraceAsyncHandler;
@@ -208,6 +235,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SearchTracesResult> SearchTracesOutcome;
typedef std::future<SearchTracesOutcome> SearchTracesOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::SearchTracesRequest&, const SearchTracesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchTracesAsyncHandler;
typedef Outcome<Error, Model::SearchTracesByPageResult> SearchTracesByPageOutcome;
typedef std::future<SearchTracesByPageOutcome> SearchTracesByPageOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::SearchTracesByPageRequest&, const SearchTracesByPageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchTracesByPageAsyncHandler;
typedef Outcome<Error, Model::SetRetcodeShareStatusResult> SetRetcodeShareStatusOutcome;
typedef std::future<SetRetcodeShareStatusOutcome> SetRetcodeShareStatusOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::SetRetcodeShareStatusRequest&, const SetRetcodeShareStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetRetcodeShareStatusAsyncHandler;
@@ -264,15 +294,30 @@ namespace AlibabaCloud
DeleteRetcodeAppOutcome deleteRetcodeApp(const Model::DeleteRetcodeAppRequest &request)const;
void deleteRetcodeAppAsync(const Model::DeleteRetcodeAppRequest& request, const DeleteRetcodeAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteRetcodeAppOutcomeCallable deleteRetcodeAppCallable(const Model::DeleteRetcodeAppRequest& request) const;
DeleteTraceAppOutcome deleteTraceApp(const Model::DeleteTraceAppRequest &request)const;
void deleteTraceAppAsync(const Model::DeleteTraceAppRequest& request, const DeleteTraceAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteTraceAppOutcomeCallable deleteTraceAppCallable(const Model::DeleteTraceAppRequest& request) const;
DescribeTraceLicenseKeyOutcome describeTraceLicenseKey(const Model::DescribeTraceLicenseKeyRequest &request)const;
void describeTraceLicenseKeyAsync(const Model::DescribeTraceLicenseKeyRequest& request, const DescribeTraceLicenseKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeTraceLicenseKeyOutcomeCallable describeTraceLicenseKeyCallable(const Model::DescribeTraceLicenseKeyRequest& request) const;
DescribeTraceLocationOutcome describeTraceLocation(const Model::DescribeTraceLocationRequest &request)const;
void describeTraceLocationAsync(const Model::DescribeTraceLocationRequest& request, const DescribeTraceLocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeTraceLocationOutcomeCallable describeTraceLocationCallable(const Model::DescribeTraceLocationRequest& request) const;
GetConsistencySnapshotOutcome getConsistencySnapshot(const Model::GetConsistencySnapshotRequest &request)const;
void getConsistencySnapshotAsync(const Model::GetConsistencySnapshotRequest& request, const GetConsistencySnapshotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetConsistencySnapshotOutcomeCallable getConsistencySnapshotCallable(const Model::GetConsistencySnapshotRequest& request) const;
GetMultipleTraceOutcome getMultipleTrace(const Model::GetMultipleTraceRequest &request)const;
void getMultipleTraceAsync(const Model::GetMultipleTraceRequest& request, const GetMultipleTraceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetMultipleTraceOutcomeCallable getMultipleTraceCallable(const Model::GetMultipleTraceRequest& request) const;
GetPrometheusApiTokenOutcome getPrometheusApiToken(const Model::GetPrometheusApiTokenRequest &request)const;
void getPrometheusApiTokenAsync(const Model::GetPrometheusApiTokenRequest& request, const GetPrometheusApiTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPrometheusApiTokenOutcomeCallable getPrometheusApiTokenCallable(const Model::GetPrometheusApiTokenRequest& request) const;
GetRetcodeShareUrlOutcome getRetcodeShareUrl(const Model::GetRetcodeShareUrlRequest &request)const;
void getRetcodeShareUrlAsync(const Model::GetRetcodeShareUrlRequest& request, const GetRetcodeShareUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetRetcodeShareUrlOutcomeCallable getRetcodeShareUrlCallable(const Model::GetRetcodeShareUrlRequest& request) const;
GetStackOutcome getStack(const Model::GetStackRequest &request)const;
void getStackAsync(const Model::GetStackRequest& request, const GetStackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetStackOutcomeCallable getStackCallable(const Model::GetStackRequest& request) const;
GetTraceOutcome getTrace(const Model::GetTraceRequest &request)const;
void getTraceAsync(const Model::GetTraceRequest& request, const GetTraceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetTraceOutcomeCallable getTraceCallable(const Model::GetTraceRequest& request) const;
@@ -330,6 +375,9 @@ namespace AlibabaCloud
SearchTracesOutcome searchTraces(const Model::SearchTracesRequest &request)const;
void searchTracesAsync(const Model::SearchTracesRequest& request, const SearchTracesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SearchTracesOutcomeCallable searchTracesCallable(const Model::SearchTracesRequest& request) const;
SearchTracesByPageOutcome searchTracesByPage(const Model::SearchTracesByPageRequest &request)const;
void searchTracesByPageAsync(const Model::SearchTracesByPageRequest& request, const SearchTracesByPageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SearchTracesByPageOutcomeCallable searchTracesByPageCallable(const Model::SearchTracesByPageRequest& request) const;
SetRetcodeShareStatusOutcome setRetcodeShareStatus(const Model::SetRetcodeShareStatusRequest &request)const;
void setRetcodeShareStatusAsync(const Model::SetRetcodeShareStatusRequest& request, const SetRetcodeShareStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SetRetcodeShareStatusOutcomeCallable setRetcodeShareStatusCallable(const Model::SetRetcodeShareStatusRequest& request) const;

View File

@@ -0,0 +1,54 @@
/*
* 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_ARMS_MODEL_DELETETRACEAPPREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_DELETETRACEAPPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DeleteTraceAppRequest : public RpcServiceRequest
{
public:
DeleteTraceAppRequest();
~DeleteTraceAppRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAppId()const;
void setAppId(const std::string& appId);
std::string getType()const;
void setType(const std::string& type);
private:
std::string regionId_;
std::string appId_;
std::string type_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DELETETRACEAPPREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_DELETETRACEAPPRESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_DELETETRACEAPPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DeleteTraceAppResult : public ServiceResult
{
public:
DeleteTraceAppResult();
explicit DeleteTraceAppResult(const std::string &payload);
~DeleteTraceAppResult();
std::string getData()const;
protected:
void parse(const std::string &payload);
private:
std::string data_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DELETETRACEAPPRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DescribeTraceLicenseKeyRequest : public RpcServiceRequest
{
public:
DescribeTraceLicenseKeyRequest();
~DescribeTraceLicenseKeyRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
private:
std::string regionId_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYRESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DescribeTraceLicenseKeyResult : public ServiceResult
{
public:
DescribeTraceLicenseKeyResult();
explicit DescribeTraceLicenseKeyResult(const std::string &payload);
~DescribeTraceLicenseKeyResult();
std::string getLicenseKey()const;
protected:
void parse(const std::string &payload);
private:
std::string licenseKey_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELICENSEKEYRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DescribeTraceLocationRequest : public RpcServiceRequest
{
public:
DescribeTraceLocationRequest();
~DescribeTraceLocationRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
private:
std::string regionId_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONREQUEST_H_

View File

@@ -0,0 +1,56 @@
/*
* 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_ARMS_MODEL_DESCRIBETRACELOCATIONRESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT DescribeTraceLocationResult : public ServiceResult
{
public:
struct RegionConfig
{
std::string regionNo;
std::string url;
};
DescribeTraceLocationResult();
explicit DescribeTraceLocationResult(const std::string &payload);
~DescribeTraceLocationResult();
std::vector<RegionConfig> getRegionConfigs()const;
protected:
void parse(const std::string &payload);
private:
std::vector<RegionConfig> regionConfigs_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONRESULT_H_

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.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACEREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT GetMultipleTraceRequest : public RpcServiceRequest
{
public:
GetMultipleTraceRequest();
~GetMultipleTraceRequest();
std::vector<std::string> getTraceIDs()const;
void setTraceIDs(const std::vector<std::string>& traceIDs);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
private:
std::vector<std::string> traceIDs_;
std::string regionId_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACEREQUEST_H_

View File

@@ -0,0 +1,86 @@
/*
* 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_ARMS_MODEL_GETMULTIPLETRACERESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT GetMultipleTraceResult : public ServiceResult
{
public:
struct MultiCallChainInfo
{
struct Span
{
struct TagEntry
{
std::string value;
std::string key;
};
struct LogEvent
{
struct TagEntry2
{
std::string value;
std::string key;
};
std::vector<LogEvent::TagEntry2> tagEntryList1;
long timestamp;
};
bool haveStack;
std::string serviceIp;
std::vector<Span::LogEvent> logEventList;
std::string operationName;
std::string serviceName;
std::string rpcId;
int rpcType;
std::string traceID;
long duration;
std::vector<Span::TagEntry> tagEntryList;
long timestamp;
std::string resultCode;
};
std::string traceID;
std::vector<MultiCallChainInfo::Span> spans;
};
GetMultipleTraceResult();
explicit GetMultipleTraceResult(const std::string &payload);
~GetMultipleTraceResult();
std::vector<MultiCallChainInfo> getMultiCallChainInfos()const;
protected:
void parse(const std::string &payload);
private:
std::vector<MultiCallChainInfo> multiCallChainInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACERESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* 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_ARMS_MODEL_GETSTACKREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_GETSTACKREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT GetStackRequest : public RpcServiceRequest
{
public:
GetStackRequest();
~GetStackRequest();
std::string getTraceID()const;
void setTraceID(const std::string& traceID);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getRpcID()const;
void setRpcID(const std::string& rpcID);
private:
std::string traceID_;
std::string regionId_;
std::string rpcID_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_GETSTACKREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_ARMS_MODEL_GETSTACKRESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_GETSTACKRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT GetStackResult : public ServiceResult
{
public:
struct StackInfoItem
{
struct ExtInfoItem
{
std::string type;
std::string info;
};
std::string line;
std::string serviceName;
std::vector<StackInfoItem::ExtInfoItem> extInfo;
std::string rpcId;
long startTime;
long duration;
std::string api;
std::string exception;
};
GetStackResult();
explicit GetStackResult(const std::string &payload);
~GetStackResult();
std::vector<StackInfoItem> getStackInfo()const;
protected:
void parse(const std::string &payload);
private:
std::vector<StackInfoItem> stackInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_GETSTACKRESULT_H_

View File

@@ -0,0 +1,84 @@
/*
* 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_ARMS_MODEL_SEARCHTRACESBYPAGEREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_SEARCHTRACESBYPAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT SearchTracesByPageRequest : public RpcServiceRequest
{
public:
struct ExclusionFilters
{
std::string value;
std::string key;
};
public:
SearchTracesByPageRequest();
~SearchTracesByPageRequest();
long getEndTime()const;
void setEndTime(long endTime);
long getStartTime()const;
void setStartTime(long startTime);
bool getReverse()const;
void setReverse(bool reverse);
long getMinDuration()const;
void setMinDuration(long minDuration);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getServiceIp()const;
void setServiceIp(const std::string& serviceIp);
std::vector<ExclusionFilters> getExclusionFilters()const;
void setExclusionFilters(const std::vector<ExclusionFilters>& exclusionFilters);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getOperationName()const;
void setOperationName(const std::string& operationName);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
private:
long endTime_;
long startTime_;
bool reverse_;
long minDuration_;
int pageNumber_;
std::string serviceIp_;
std::vector<ExclusionFilters> exclusionFilters_;
std::string regionId_;
std::string operationName_;
int pageSize_;
std::string serviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_SEARCHTRACESBYPAGEREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_ARMS_MODEL_SEARCHTRACESBYPAGERESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_SEARCHTRACESBYPAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT SearchTracesByPageResult : public ServiceResult
{
public:
struct PageBean
{
struct TraceInfo
{
std::string serviceIp;
std::string operationName;
std::string serviceName;
std::string traceID;
long duration;
long timestamp;
};
int pageSize;
int pageNumber;
int total;
std::vector<TraceInfo> traceInfos;
};
SearchTracesByPageResult();
explicit SearchTracesByPageResult(const std::string &payload);
~SearchTracesByPageResult();
PageBean getPageBean()const;
protected:
void parse(const std::string &payload);
private:
PageBean pageBean_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_SEARCHTRACESBYPAGERESULT_H_

View File

@@ -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();

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

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

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

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

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

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

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

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

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

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

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

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