diff --git a/CHANGELOG b/CHANGELOG index e58d3e55c..4be0a6e96 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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. diff --git a/VERSION b/VERSION index 89924db7b..acb268caa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.469 \ No newline at end of file +1.36.470 \ No newline at end of file diff --git a/arms/CMakeLists.txt b/arms/CMakeLists.txt index c858c3c87..b34921c40 100644 --- a/arms/CMakeLists.txt +++ b/arms/CMakeLists.txt @@ -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 diff --git a/arms/include/alibabacloud/arms/ARMSClient.h b/arms/include/alibabacloud/arms/ARMSClient.h index 0d8eaed4d..1c1b98daa 100644 --- a/arms/include/alibabacloud/arms/ARMSClient.h +++ b/arms/include/alibabacloud/arms/ARMSClient.h @@ -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 DeleteRetcodeAppOutcome; typedef std::future DeleteRetcodeAppOutcomeCallable; typedef std::function&)> DeleteRetcodeAppAsyncHandler; + typedef Outcome DeleteTraceAppOutcome; + typedef std::future DeleteTraceAppOutcomeCallable; + typedef std::function&)> DeleteTraceAppAsyncHandler; + typedef Outcome DescribeTraceLicenseKeyOutcome; + typedef std::future DescribeTraceLicenseKeyOutcomeCallable; + typedef std::function&)> DescribeTraceLicenseKeyAsyncHandler; + typedef Outcome DescribeTraceLocationOutcome; + typedef std::future DescribeTraceLocationOutcomeCallable; + typedef std::function&)> DescribeTraceLocationAsyncHandler; typedef Outcome GetConsistencySnapshotOutcome; typedef std::future GetConsistencySnapshotOutcomeCallable; typedef std::function&)> GetConsistencySnapshotAsyncHandler; + typedef Outcome GetMultipleTraceOutcome; + typedef std::future GetMultipleTraceOutcomeCallable; + typedef std::function&)> GetMultipleTraceAsyncHandler; typedef Outcome GetPrometheusApiTokenOutcome; typedef std::future GetPrometheusApiTokenOutcomeCallable; typedef std::function&)> GetPrometheusApiTokenAsyncHandler; typedef Outcome GetRetcodeShareUrlOutcome; typedef std::future GetRetcodeShareUrlOutcomeCallable; typedef std::function&)> GetRetcodeShareUrlAsyncHandler; + typedef Outcome GetStackOutcome; + typedef std::future GetStackOutcomeCallable; + typedef std::function&)> GetStackAsyncHandler; typedef Outcome GetTraceOutcome; typedef std::future GetTraceOutcomeCallable; typedef std::function&)> GetTraceAsyncHandler; @@ -208,6 +235,9 @@ namespace AlibabaCloud typedef Outcome SearchTracesOutcome; typedef std::future SearchTracesOutcomeCallable; typedef std::function&)> SearchTracesAsyncHandler; + typedef Outcome SearchTracesByPageOutcome; + typedef std::future SearchTracesByPageOutcomeCallable; + typedef std::function&)> SearchTracesByPageAsyncHandler; typedef Outcome SetRetcodeShareStatusOutcome; typedef std::future SetRetcodeShareStatusOutcomeCallable; typedef std::function&)> 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& 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& 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& 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& 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& 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& 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& 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& 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& 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& 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& 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& 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& context = nullptr) const; SetRetcodeShareStatusOutcomeCallable setRetcodeShareStatusCallable(const Model::SetRetcodeShareStatusRequest& request) const; diff --git a/arms/include/alibabacloud/arms/model/DeleteTraceAppRequest.h b/arms/include/alibabacloud/arms/model/DeleteTraceAppRequest.h new file mode 100644 index 000000000..957357e77 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DeleteTraceAppRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DeleteTraceAppResult.h b/arms/include/alibabacloud/arms/model/DeleteTraceAppResult.h new file mode 100644 index 000000000..5f0ba6629 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DeleteTraceAppResult.h @@ -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 +#include +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyRequest.h b/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyRequest.h new file mode 100644 index 000000000..e5d062267 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyResult.h b/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyResult.h new file mode 100644 index 000000000..35ce40d13 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeTraceLicenseKeyResult.h @@ -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 +#include +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DescribeTraceLocationRequest.h b/arms/include/alibabacloud/arms/model/DescribeTraceLocationRequest.h new file mode 100644 index 000000000..5453b00d8 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeTraceLocationRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DescribeTraceLocationResult.h b/arms/include/alibabacloud/arms/model/DescribeTraceLocationResult.h new file mode 100644 index 000000000..9f332cdac --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeTraceLocationResult.h @@ -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 +#include +#include +#include +#include + +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 getRegionConfigs()const; + + protected: + void parse(const std::string &payload); + private: + std::vector regionConfigs_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBETRACELOCATIONRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetMultipleTraceRequest.h b/arms/include/alibabacloud/arms/model/GetMultipleTraceRequest.h new file mode 100644 index 000000000..9da2b8ebf --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetMultipleTraceRequest.h @@ -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 +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT GetMultipleTraceRequest : public RpcServiceRequest + { + + public: + GetMultipleTraceRequest(); + ~GetMultipleTraceRequest(); + + std::vector getTraceIDs()const; + void setTraceIDs(const std::vector& traceIDs); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::vector traceIDs_; + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACEREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetMultipleTraceResult.h b/arms/include/alibabacloud/arms/model/GetMultipleTraceResult.h new file mode 100644 index 000000000..16c8c739b --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetMultipleTraceResult.h @@ -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 +#include +#include +#include +#include + +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 tagEntryList1; + long timestamp; + }; + bool haveStack; + std::string serviceIp; + std::vector logEventList; + std::string operationName; + std::string serviceName; + std::string rpcId; + int rpcType; + std::string traceID; + long duration; + std::vector tagEntryList; + long timestamp; + std::string resultCode; + }; + std::string traceID; + std::vector spans; + }; + + + GetMultipleTraceResult(); + explicit GetMultipleTraceResult(const std::string &payload); + ~GetMultipleTraceResult(); + std::vector getMultiCallChainInfos()const; + + protected: + void parse(const std::string &payload); + private: + std::vector multiCallChainInfos_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_GETMULTIPLETRACERESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetStackRequest.h b/arms/include/alibabacloud/arms/model/GetStackRequest.h new file mode 100644 index 000000000..908287194 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetStackRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetStackResult.h b/arms/include/alibabacloud/arms/model/GetStackResult.h new file mode 100644 index 000000000..2b1a6c0ee --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetStackResult.h @@ -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 +#include +#include +#include +#include + +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 extInfo; + std::string rpcId; + long startTime; + long duration; + std::string api; + std::string exception; + }; + + + GetStackResult(); + explicit GetStackResult(const std::string &payload); + ~GetStackResult(); + std::vector getStackInfo()const; + + protected: + void parse(const std::string &payload); + private: + std::vector stackInfo_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_GETSTACKRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SearchTracesByPageRequest.h b/arms/include/alibabacloud/arms/model/SearchTracesByPageRequest.h new file mode 100644 index 000000000..e7cb5ed3d --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SearchTracesByPageRequest.h @@ -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 +#include +#include +#include + +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 getExclusionFilters()const; + void setExclusionFilters(const std::vector& 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_; + std::string regionId_; + std::string operationName_; + int pageSize_; + std::string serviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_SEARCHTRACESBYPAGEREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SearchTracesByPageResult.h b/arms/include/alibabacloud/arms/model/SearchTracesByPageResult.h new file mode 100644 index 000000000..8bec8def1 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SearchTracesByPageResult.h @@ -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 +#include +#include +#include +#include + +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 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_ \ No newline at end of file diff --git a/arms/src/ARMSClient.cc b/arms/src/ARMSClient.cc index 44b417897..28d713afe 100644 --- a/arms/src/ARMSClient.cc +++ b/arms/src/ARMSClient.cc @@ -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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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& 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>( + [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(); diff --git a/arms/src/model/DeleteTraceAppRequest.cc b/arms/src/model/DeleteTraceAppRequest.cc new file mode 100644 index 000000000..69ce93580 --- /dev/null +++ b/arms/src/model/DeleteTraceAppRequest.cc @@ -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 + +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); +} + diff --git a/arms/src/model/DeleteTraceAppResult.cc b/arms/src/model/DeleteTraceAppResult.cc new file mode 100644 index 000000000..db87d5534 --- /dev/null +++ b/arms/src/model/DeleteTraceAppResult.cc @@ -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 +#include + +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_; +} + diff --git a/arms/src/model/DescribeTraceLicenseKeyRequest.cc b/arms/src/model/DescribeTraceLicenseKeyRequest.cc new file mode 100644 index 000000000..c65d1621d --- /dev/null +++ b/arms/src/model/DescribeTraceLicenseKeyRequest.cc @@ -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 + +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); +} + diff --git a/arms/src/model/DescribeTraceLicenseKeyResult.cc b/arms/src/model/DescribeTraceLicenseKeyResult.cc new file mode 100644 index 000000000..423c598d4 --- /dev/null +++ b/arms/src/model/DescribeTraceLicenseKeyResult.cc @@ -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 +#include + +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_; +} + diff --git a/arms/src/model/DescribeTraceLocationRequest.cc b/arms/src/model/DescribeTraceLocationRequest.cc new file mode 100644 index 000000000..77f6660bd --- /dev/null +++ b/arms/src/model/DescribeTraceLocationRequest.cc @@ -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 + +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); +} + diff --git a/arms/src/model/DescribeTraceLocationResult.cc b/arms/src/model/DescribeTraceLocationResult.cc new file mode 100644 index 000000000..8cc41a5a0 --- /dev/null +++ b/arms/src/model/DescribeTraceLocationResult.cc @@ -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 +#include + +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::getRegionConfigs()const +{ + return regionConfigs_; +} + diff --git a/arms/src/model/GetMultipleTraceRequest.cc b/arms/src/model/GetMultipleTraceRequest.cc new file mode 100644 index 000000000..2f03aaaa1 --- /dev/null +++ b/arms/src/model/GetMultipleTraceRequest.cc @@ -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 + +using AlibabaCloud::ARMS::Model::GetMultipleTraceRequest; + +GetMultipleTraceRequest::GetMultipleTraceRequest() : + RpcServiceRequest("arms", "2019-08-08", "GetMultipleTrace") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMultipleTraceRequest::~GetMultipleTraceRequest() +{} + +std::vector GetMultipleTraceRequest::getTraceIDs()const +{ + return traceIDs_; +} + +void GetMultipleTraceRequest::setTraceIDs(const std::vector& 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); +} + diff --git a/arms/src/model/GetMultipleTraceResult.cc b/arms/src/model/GetMultipleTraceResult.cc new file mode 100644 index 000000000..6a5c981c1 --- /dev/null +++ b/arms/src/model/GetMultipleTraceResult.cc @@ -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 +#include + +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::getMultiCallChainInfos()const +{ + return multiCallChainInfos_; +} + diff --git a/arms/src/model/GetStackRequest.cc b/arms/src/model/GetStackRequest.cc new file mode 100644 index 000000000..14a89d7c4 --- /dev/null +++ b/arms/src/model/GetStackRequest.cc @@ -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 + +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); +} + diff --git a/arms/src/model/GetStackResult.cc b/arms/src/model/GetStackResult.cc new file mode 100644 index 000000000..48f281e28 --- /dev/null +++ b/arms/src/model/GetStackResult.cc @@ -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 +#include + +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::getStackInfo()const +{ + return stackInfo_; +} + diff --git a/arms/src/model/SearchTracesByPageRequest.cc b/arms/src/model/SearchTracesByPageRequest.cc new file mode 100644 index 000000000..d7765eacb --- /dev/null +++ b/arms/src/model/SearchTracesByPageRequest.cc @@ -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 + +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::getExclusionFilters()const +{ + return exclusionFilters_; +} + +void SearchTracesByPageRequest::setExclusionFilters(const std::vector& 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); +} + diff --git a/arms/src/model/SearchTracesByPageResult.cc b/arms/src/model/SearchTracesByPageResult.cc new file mode 100644 index 000000000..b786aacfa --- /dev/null +++ b/arms/src/model/SearchTracesByPageResult.cc @@ -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 +#include + +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_; +} +