Explorar o código

Support Sampling for jaeger.

sdk-team %!s(int64=5) %!d(string=hai) anos
pai
achega
b4903d0fd0
Modificáronse 24 ficheiros con 1151 adicións e 5 borrados
  1. 3 0
      CHANGELOG
  2. 18 2
      xtrace/CMakeLists.txt
  3. 32 0
      xtrace/include/alibabacloud/xtrace/XtraceClient.h
  4. 60 0
      xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h
  5. 58 0
      xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h
  6. 51 0
      xtrace/include/alibabacloud/xtrace/model/GetSamplingRequest.h
  7. 51 0
      xtrace/include/alibabacloud/xtrace/model/GetSamplingResult.h
  8. 3 0
      xtrace/include/alibabacloud/xtrace/model/GetTokenRequest.h
  9. 57 0
      xtrace/include/alibabacloud/xtrace/model/GetTraceAnalysisRequest.h
  10. 51 0
      xtrace/include/alibabacloud/xtrace/model/GetTraceAnalysisResult.h
  11. 3 0
      xtrace/include/alibabacloud/xtrace/model/QueryMetricRequest.h
  12. 54 0
      xtrace/include/alibabacloud/xtrace/model/UpdateSamplingRequest.h
  13. 51 0
      xtrace/include/alibabacloud/xtrace/model/UpdateSamplingResult.h
  14. 147 3
      xtrace/src/XtraceClient.cc
  15. 84 0
      xtrace/src/model/CheckServiceLinkedRoleForDeletingRequest.cc
  16. 67 0
      xtrace/src/model/CheckServiceLinkedRoleForDeletingResult.cc
  17. 51 0
      xtrace/src/model/GetSamplingRequest.cc
  18. 51 0
      xtrace/src/model/GetSamplingResult.cc
  19. 11 0
      xtrace/src/model/GetTokenRequest.cc
  20. 73 0
      xtrace/src/model/GetTraceAnalysisRequest.cc
  21. 51 0
      xtrace/src/model/GetTraceAnalysisResult.cc
  22. 11 0
      xtrace/src/model/QueryMetricRequest.cc
  23. 62 0
      xtrace/src/model/UpdateSamplingRequest.cc
  24. 51 0
      xtrace/src/model/UpdateSamplingResult.cc

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2020-10-27 Version: patch
+- Support Sampling for jaeger.
+
 2020-10-27 Version: patch
 - Fix bug.
 

+ 18 - 2
xtrace/CMakeLists.txt

@@ -21,6 +21,10 @@ set(xtrace_public_header
 	include/alibabacloud/xtrace/XtraceExport.h )
 
 set(xtrace_public_header_model 
+	include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h
+	include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h
+	include/alibabacloud/xtrace/model/GetSamplingRequest.h
+	include/alibabacloud/xtrace/model/GetSamplingResult.h
 	include/alibabacloud/xtrace/model/GetTagKeyRequest.h
 	include/alibabacloud/xtrace/model/GetTagKeyResult.h
 	include/alibabacloud/xtrace/model/GetTagValRequest.h
@@ -29,6 +33,8 @@ set(xtrace_public_header_model
 	include/alibabacloud/xtrace/model/GetTokenResult.h
 	include/alibabacloud/xtrace/model/GetTraceRequest.h
 	include/alibabacloud/xtrace/model/GetTraceResult.h
+	include/alibabacloud/xtrace/model/GetTraceAnalysisRequest.h
+	include/alibabacloud/xtrace/model/GetTraceAnalysisResult.h
 	include/alibabacloud/xtrace/model/ListIpOrHostsRequest.h
 	include/alibabacloud/xtrace/model/ListIpOrHostsResult.h
 	include/alibabacloud/xtrace/model/ListServicesRequest.h
@@ -38,10 +44,16 @@ set(xtrace_public_header_model
 	include/alibabacloud/xtrace/model/QueryMetricRequest.h
 	include/alibabacloud/xtrace/model/QueryMetricResult.h
 	include/alibabacloud/xtrace/model/SearchTracesRequest.h
-	include/alibabacloud/xtrace/model/SearchTracesResult.h )
+	include/alibabacloud/xtrace/model/SearchTracesResult.h
+	include/alibabacloud/xtrace/model/UpdateSamplingRequest.h
+	include/alibabacloud/xtrace/model/UpdateSamplingResult.h )
 
 set(xtrace_src 
 	src/XtraceClient.cc
+	src/model/CheckServiceLinkedRoleForDeletingRequest.cc
+	src/model/CheckServiceLinkedRoleForDeletingResult.cc
+	src/model/GetSamplingRequest.cc
+	src/model/GetSamplingResult.cc
 	src/model/GetTagKeyRequest.cc
 	src/model/GetTagKeyResult.cc
 	src/model/GetTagValRequest.cc
@@ -50,6 +62,8 @@ set(xtrace_src
 	src/model/GetTokenResult.cc
 	src/model/GetTraceRequest.cc
 	src/model/GetTraceResult.cc
+	src/model/GetTraceAnalysisRequest.cc
+	src/model/GetTraceAnalysisResult.cc
 	src/model/ListIpOrHostsRequest.cc
 	src/model/ListIpOrHostsResult.cc
 	src/model/ListServicesRequest.cc
@@ -59,7 +73,9 @@ set(xtrace_src
 	src/model/QueryMetricRequest.cc
 	src/model/QueryMetricResult.cc
 	src/model/SearchTracesRequest.cc
-	src/model/SearchTracesResult.cc )
+	src/model/SearchTracesResult.cc
+	src/model/UpdateSamplingRequest.cc
+	src/model/UpdateSamplingResult.cc )
 
 add_library(xtrace ${LIB_TYPE}
 	${xtrace_public_header}

+ 32 - 0
xtrace/include/alibabacloud/xtrace/XtraceClient.h

@@ -22,6 +22,10 @@
 #include <alibabacloud/core/EndpointProvider.h>
 #include <alibabacloud/core/RpcServiceClient.h>
 #include "XtraceExport.h"
+#include "model/CheckServiceLinkedRoleForDeletingRequest.h"
+#include "model/CheckServiceLinkedRoleForDeletingResult.h"
+#include "model/GetSamplingRequest.h"
+#include "model/GetSamplingResult.h"
 #include "model/GetTagKeyRequest.h"
 #include "model/GetTagKeyResult.h"
 #include "model/GetTagValRequest.h"
@@ -30,6 +34,8 @@
 #include "model/GetTokenResult.h"
 #include "model/GetTraceRequest.h"
 #include "model/GetTraceResult.h"
+#include "model/GetTraceAnalysisRequest.h"
+#include "model/GetTraceAnalysisResult.h"
 #include "model/ListIpOrHostsRequest.h"
 #include "model/ListIpOrHostsResult.h"
 #include "model/ListServicesRequest.h"
@@ -40,6 +46,8 @@
 #include "model/QueryMetricResult.h"
 #include "model/SearchTracesRequest.h"
 #include "model/SearchTracesResult.h"
+#include "model/UpdateSamplingRequest.h"
+#include "model/UpdateSamplingResult.h"
 
 
 namespace AlibabaCloud
@@ -49,6 +57,12 @@ namespace AlibabaCloud
 		class ALIBABACLOUD_XTRACE_EXPORT XtraceClient : public RpcServiceClient
 		{
 		public:
+			typedef Outcome<Error, Model::CheckServiceLinkedRoleForDeletingResult> CheckServiceLinkedRoleForDeletingOutcome;
+			typedef std::future<CheckServiceLinkedRoleForDeletingOutcome> CheckServiceLinkedRoleForDeletingOutcomeCallable;
+			typedef std::function<void(const XtraceClient*, const Model::CheckServiceLinkedRoleForDeletingRequest&, const CheckServiceLinkedRoleForDeletingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckServiceLinkedRoleForDeletingAsyncHandler;
+			typedef Outcome<Error, Model::GetSamplingResult> GetSamplingOutcome;
+			typedef std::future<GetSamplingOutcome> GetSamplingOutcomeCallable;
+			typedef std::function<void(const XtraceClient*, const Model::GetSamplingRequest&, const GetSamplingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSamplingAsyncHandler;
 			typedef Outcome<Error, Model::GetTagKeyResult> GetTagKeyOutcome;
 			typedef std::future<GetTagKeyOutcome> GetTagKeyOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::GetTagKeyRequest&, const GetTagKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTagKeyAsyncHandler;
@@ -61,6 +75,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::GetTraceResult> GetTraceOutcome;
 			typedef std::future<GetTraceOutcome> GetTraceOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::GetTraceRequest&, const GetTraceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTraceAsyncHandler;
+			typedef Outcome<Error, Model::GetTraceAnalysisResult> GetTraceAnalysisOutcome;
+			typedef std::future<GetTraceAnalysisOutcome> GetTraceAnalysisOutcomeCallable;
+			typedef std::function<void(const XtraceClient*, const Model::GetTraceAnalysisRequest&, const GetTraceAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTraceAnalysisAsyncHandler;
 			typedef Outcome<Error, Model::ListIpOrHostsResult> ListIpOrHostsOutcome;
 			typedef std::future<ListIpOrHostsOutcome> ListIpOrHostsOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::ListIpOrHostsRequest&, const ListIpOrHostsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListIpOrHostsAsyncHandler;
@@ -76,11 +93,20 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::SearchTracesResult> SearchTracesOutcome;
 			typedef std::future<SearchTracesOutcome> SearchTracesOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::SearchTracesRequest&, const SearchTracesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchTracesAsyncHandler;
+			typedef Outcome<Error, Model::UpdateSamplingResult> UpdateSamplingOutcome;
+			typedef std::future<UpdateSamplingOutcome> UpdateSamplingOutcomeCallable;
+			typedef std::function<void(const XtraceClient*, const Model::UpdateSamplingRequest&, const UpdateSamplingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSamplingAsyncHandler;
 
 			XtraceClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			XtraceClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
 			XtraceClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
 			~XtraceClient();
+			CheckServiceLinkedRoleForDeletingOutcome checkServiceLinkedRoleForDeleting(const Model::CheckServiceLinkedRoleForDeletingRequest &request)const;
+			void checkServiceLinkedRoleForDeletingAsync(const Model::CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			CheckServiceLinkedRoleForDeletingOutcomeCallable checkServiceLinkedRoleForDeletingCallable(const Model::CheckServiceLinkedRoleForDeletingRequest& request) const;
+			GetSamplingOutcome getSampling(const Model::GetSamplingRequest &request)const;
+			void getSamplingAsync(const Model::GetSamplingRequest& request, const GetSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			GetSamplingOutcomeCallable getSamplingCallable(const Model::GetSamplingRequest& request) const;
 			GetTagKeyOutcome getTagKey(const Model::GetTagKeyRequest &request)const;
 			void getTagKeyAsync(const Model::GetTagKeyRequest& request, const GetTagKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			GetTagKeyOutcomeCallable getTagKeyCallable(const Model::GetTagKeyRequest& request) const;
@@ -93,6 +119,9 @@ namespace AlibabaCloud
 			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;
+			GetTraceAnalysisOutcome getTraceAnalysis(const Model::GetTraceAnalysisRequest &request)const;
+			void getTraceAnalysisAsync(const Model::GetTraceAnalysisRequest& request, const GetTraceAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			GetTraceAnalysisOutcomeCallable getTraceAnalysisCallable(const Model::GetTraceAnalysisRequest& request) const;
 			ListIpOrHostsOutcome listIpOrHosts(const Model::ListIpOrHostsRequest &request)const;
 			void listIpOrHostsAsync(const Model::ListIpOrHostsRequest& request, const ListIpOrHostsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ListIpOrHostsOutcomeCallable listIpOrHostsCallable(const Model::ListIpOrHostsRequest& request) const;
@@ -108,6 +137,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;
+			UpdateSamplingOutcome updateSampling(const Model::UpdateSamplingRequest &request)const;
+			void updateSamplingAsync(const Model::UpdateSamplingRequest& request, const UpdateSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			UpdateSamplingOutcomeCallable updateSamplingCallable(const Model::UpdateSamplingRequest& request) const;
 	
 		private:
 			std::shared_ptr<EndpointProvider> endpointProvider_;

+ 60 - 0
xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h

@@ -0,0 +1,60 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
+#define ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT CheckServiceLinkedRoleForDeletingRequest : public RpcServiceRequest
+			{
+
+			public:
+				CheckServiceLinkedRoleForDeletingRequest();
+				~CheckServiceLinkedRoleForDeletingRequest();
+
+				std::string getSPIRegionId()const;
+				void setSPIRegionId(const std::string& sPIRegionId);
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getRoleArn()const;
+				void setRoleArn(const std::string& roleArn);
+				std::string getDeletionTaskId()const;
+				void setDeletionTaskId(const std::string& deletionTaskId);
+				std::string getServiceName()const;
+				void setServiceName(const std::string& serviceName);
+
+            private:
+				std::string sPIRegionId_;
+				std::string regionId_;
+				std::string roleArn_;
+				std::string deletionTaskId_;
+				std::string serviceName_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_

+ 58 - 0
xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h

@@ -0,0 +1,58 @@
+/*
+ * 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_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
+#define ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT CheckServiceLinkedRoleForDeletingResult : public ServiceResult
+			{
+			public:
+				struct RoleUsagesItem
+				{
+					std::string region;
+					std::vector<std::string> resources;
+				};
+
+
+				CheckServiceLinkedRoleForDeletingResult();
+				explicit CheckServiceLinkedRoleForDeletingResult(const std::string &payload);
+				~CheckServiceLinkedRoleForDeletingResult();
+				bool getDeletable()const;
+				std::vector<RoleUsagesItem> getRoleUsages()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				bool deletable_;
+				std::vector<RoleUsagesItem> roleUsages_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_

+ 51 - 0
xtrace/include/alibabacloud/xtrace/model/GetSamplingRequest.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_XTRACE_MODEL_GETSAMPLINGREQUEST_H_
+#define ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT GetSamplingRequest : public RpcServiceRequest
+			{
+
+			public:
+				GetSamplingRequest();
+				~GetSamplingRequest();
+
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getProxyUserId()const;
+				void setProxyUserId(const std::string& proxyUserId);
+
+            private:
+				std::string regionId_;
+				std::string proxyUserId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGREQUEST_H_

+ 51 - 0
xtrace/include/alibabacloud/xtrace/model/GetSamplingResult.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_XTRACE_MODEL_GETSAMPLINGRESULT_H_
+#define ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT GetSamplingResult : public ServiceResult
+			{
+			public:
+
+
+				GetSamplingResult();
+				explicit GetSamplingResult(const std::string &payload);
+				~GetSamplingResult();
+				std::string getData()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string data_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGRESULT_H_

+ 3 - 0
xtrace/include/alibabacloud/xtrace/model/GetTokenRequest.h

@@ -39,10 +39,13 @@ namespace AlibabaCloud
 				void setRegionId(const std::string& regionId);
 				std::string getAppType()const;
 				void setAppType(const std::string& appType);
+				std::string getProxyUserId()const;
+				void setProxyUserId(const std::string& proxyUserId);
 
             private:
 				std::string regionId_;
 				std::string appType_;
+				std::string proxyUserId_;
 
 			};
 		}

+ 57 - 0
xtrace/include/alibabacloud/xtrace/model/GetTraceAnalysisRequest.h

@@ -0,0 +1,57 @@
+/*
+ * 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_XTRACE_MODEL_GETTRACEANALYSISREQUEST_H_
+#define ALIBABACLOUD_XTRACE_MODEL_GETTRACEANALYSISREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT GetTraceAnalysisRequest : public RpcServiceRequest
+			{
+
+			public:
+				GetTraceAnalysisRequest();
+				~GetTraceAnalysisRequest();
+
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getQuery()const;
+				void setQuery(const std::string& query);
+				std::string getApi()const;
+				void setApi(const std::string& api);
+				std::string getProxyUserId()const;
+				void setProxyUserId(const std::string& proxyUserId);
+
+            private:
+				std::string regionId_;
+				std::string query_;
+				std::string api_;
+				std::string proxyUserId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTRACEANALYSISREQUEST_H_

+ 51 - 0
xtrace/include/alibabacloud/xtrace/model/GetTraceAnalysisResult.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_XTRACE_MODEL_GETTRACEANALYSISRESULT_H_
+#define ALIBABACLOUD_XTRACE_MODEL_GETTRACEANALYSISRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT GetTraceAnalysisResult : public ServiceResult
+			{
+			public:
+
+
+				GetTraceAnalysisResult();
+				explicit GetTraceAnalysisResult(const std::string &payload);
+				~GetTraceAnalysisResult();
+				std::string getData()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string data_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTRACEANALYSISRESULT_H_

+ 3 - 0
xtrace/include/alibabacloud/xtrace/model/QueryMetricRequest.h

@@ -49,6 +49,8 @@ namespace AlibabaCloud
 				void setStartTime(long startTime);
 				std::vector<Filters> getFilters()const;
 				void setFilters(const std::vector<Filters>& filters);
+				std::string getProxyUserId()const;
+				void setProxyUserId(const std::string& proxyUserId);
 				std::vector<std::string> getMeasures()const;
 				void setMeasures(const std::vector<std::string>& measures);
 				int getIntervalInSec()const;
@@ -67,6 +69,7 @@ namespace AlibabaCloud
 				std::string orderBy_;
 				long startTime_;
 				std::vector<Filters> filters_;
+				std::string proxyUserId_;
 				std::vector<std::string> measures_;
 				int intervalInSec_;
 				std::string metric_;

+ 54 - 0
xtrace/include/alibabacloud/xtrace/model/UpdateSamplingRequest.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_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_
+#define ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT UpdateSamplingRequest : public RpcServiceRequest
+			{
+
+			public:
+				UpdateSamplingRequest();
+				~UpdateSamplingRequest();
+
+				std::string getRegionId()const;
+				void setRegionId(const std::string& regionId);
+				std::string getSampling()const;
+				void setSampling(const std::string& sampling);
+				std::string getProxyUserId()const;
+				void setProxyUserId(const std::string& proxyUserId);
+
+            private:
+				std::string regionId_;
+				std::string sampling_;
+				std::string proxyUserId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_

+ 51 - 0
xtrace/include/alibabacloud/xtrace/model/UpdateSamplingResult.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_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_
+#define ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/xtrace/XtraceExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Xtrace
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_XTRACE_EXPORT UpdateSamplingResult : public ServiceResult
+			{
+			public:
+
+
+				UpdateSamplingResult();
+				explicit UpdateSamplingResult(const std::string &payload);
+				~UpdateSamplingResult();
+				std::string getData()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string data_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_

+ 147 - 3
xtrace/src/XtraceClient.cc

@@ -31,26 +31,98 @@ XtraceClient::XtraceClient(const Credentials &credentials, const ClientConfigura
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "xtrace");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 XtraceClient::XtraceClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "xtrace");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 XtraceClient::XtraceClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "xtrace");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 XtraceClient::~XtraceClient()
 {}
 
+XtraceClient::CheckServiceLinkedRoleForDeletingOutcome XtraceClient::checkServiceLinkedRoleForDeleting(const CheckServiceLinkedRoleForDeletingRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return CheckServiceLinkedRoleForDeletingOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return CheckServiceLinkedRoleForDeletingOutcome(CheckServiceLinkedRoleForDeletingResult(outcome.result()));
+	else
+		return CheckServiceLinkedRoleForDeletingOutcome(outcome.error());
+}
+
+void XtraceClient::checkServiceLinkedRoleForDeletingAsync(const CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, checkServiceLinkedRoleForDeleting(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+XtraceClient::CheckServiceLinkedRoleForDeletingOutcomeCallable XtraceClient::checkServiceLinkedRoleForDeletingCallable(const CheckServiceLinkedRoleForDeletingRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<CheckServiceLinkedRoleForDeletingOutcome()>>(
+			[this, request]()
+			{
+			return this->checkServiceLinkedRoleForDeleting(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
+XtraceClient::GetSamplingOutcome XtraceClient::getSampling(const GetSamplingRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return GetSamplingOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return GetSamplingOutcome(GetSamplingResult(outcome.result()));
+	else
+		return GetSamplingOutcome(outcome.error());
+}
+
+void XtraceClient::getSamplingAsync(const GetSamplingRequest& request, const GetSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, getSampling(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+XtraceClient::GetSamplingOutcomeCallable XtraceClient::getSamplingCallable(const GetSamplingRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<GetSamplingOutcome()>>(
+			[this, request]()
+			{
+			return this->getSampling(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 XtraceClient::GetTagKeyOutcome XtraceClient::getTagKey(const GetTagKeyRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -195,6 +267,42 @@ XtraceClient::GetTraceOutcomeCallable XtraceClient::getTraceCallable(const GetTr
 	return task->get_future();
 }
 
+XtraceClient::GetTraceAnalysisOutcome XtraceClient::getTraceAnalysis(const GetTraceAnalysisRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return GetTraceAnalysisOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return GetTraceAnalysisOutcome(GetTraceAnalysisResult(outcome.result()));
+	else
+		return GetTraceAnalysisOutcome(outcome.error());
+}
+
+void XtraceClient::getTraceAnalysisAsync(const GetTraceAnalysisRequest& request, const GetTraceAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, getTraceAnalysis(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+XtraceClient::GetTraceAnalysisOutcomeCallable XtraceClient::getTraceAnalysisCallable(const GetTraceAnalysisRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<GetTraceAnalysisOutcome()>>(
+			[this, request]()
+			{
+			return this->getTraceAnalysis(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 XtraceClient::ListIpOrHostsOutcome XtraceClient::listIpOrHosts(const ListIpOrHostsRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -375,3 +483,39 @@ XtraceClient::SearchTracesOutcomeCallable XtraceClient::searchTracesCallable(con
 	return task->get_future();
 }
 
+XtraceClient::UpdateSamplingOutcome XtraceClient::updateSampling(const UpdateSamplingRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return UpdateSamplingOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return UpdateSamplingOutcome(UpdateSamplingResult(outcome.result()));
+	else
+		return UpdateSamplingOutcome(outcome.error());
+}
+
+void XtraceClient::updateSamplingAsync(const UpdateSamplingRequest& request, const UpdateSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, updateSampling(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+XtraceClient::UpdateSamplingOutcomeCallable XtraceClient::updateSamplingCallable(const UpdateSamplingRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<UpdateSamplingOutcome()>>(
+			[this, request]()
+			{
+			return this->updateSampling(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+

+ 84 - 0
xtrace/src/model/CheckServiceLinkedRoleForDeletingRequest.cc

@@ -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.
+ */
+
+#include <alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h>
+
+using AlibabaCloud::Xtrace::Model::CheckServiceLinkedRoleForDeletingRequest;
+
+CheckServiceLinkedRoleForDeletingRequest::CheckServiceLinkedRoleForDeletingRequest() :
+	RpcServiceRequest("xtrace", "2019-08-08", "CheckServiceLinkedRoleForDeleting")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+CheckServiceLinkedRoleForDeletingRequest::~CheckServiceLinkedRoleForDeletingRequest()
+{}
+
+std::string CheckServiceLinkedRoleForDeletingRequest::getSPIRegionId()const
+{
+	return sPIRegionId_;
+}
+
+void CheckServiceLinkedRoleForDeletingRequest::setSPIRegionId(const std::string& sPIRegionId)
+{
+	sPIRegionId_ = sPIRegionId;
+	setParameter("SPIRegionId", sPIRegionId);
+}
+
+std::string CheckServiceLinkedRoleForDeletingRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void CheckServiceLinkedRoleForDeletingRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setParameter("RegionId", regionId);
+}
+
+std::string CheckServiceLinkedRoleForDeletingRequest::getRoleArn()const
+{
+	return roleArn_;
+}
+
+void CheckServiceLinkedRoleForDeletingRequest::setRoleArn(const std::string& roleArn)
+{
+	roleArn_ = roleArn;
+	setParameter("RoleArn", roleArn);
+}
+
+std::string CheckServiceLinkedRoleForDeletingRequest::getDeletionTaskId()const
+{
+	return deletionTaskId_;
+}
+
+void CheckServiceLinkedRoleForDeletingRequest::setDeletionTaskId(const std::string& deletionTaskId)
+{
+	deletionTaskId_ = deletionTaskId;
+	setParameter("DeletionTaskId", deletionTaskId);
+}
+
+std::string CheckServiceLinkedRoleForDeletingRequest::getServiceName()const
+{
+	return serviceName_;
+}
+
+void CheckServiceLinkedRoleForDeletingRequest::setServiceName(const std::string& serviceName)
+{
+	serviceName_ = serviceName;
+	setParameter("ServiceName", serviceName);
+}
+

+ 67 - 0
xtrace/src/model/CheckServiceLinkedRoleForDeletingResult.cc

@@ -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.
+ */
+
+#include <alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Xtrace;
+using namespace AlibabaCloud::Xtrace::Model;
+
+CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult() :
+	ServiceResult()
+{}
+
+CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+CheckServiceLinkedRoleForDeletingResult::~CheckServiceLinkedRoleForDeletingResult()
+{}
+
+void CheckServiceLinkedRoleForDeletingResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	auto allRoleUsagesNode = value["RoleUsages"]["RoleUsagesItem"];
+	for (auto valueRoleUsagesRoleUsagesItem : allRoleUsagesNode)
+	{
+		RoleUsagesItem roleUsagesObject;
+		if(!valueRoleUsagesRoleUsagesItem["Region"].isNull())
+			roleUsagesObject.region = valueRoleUsagesRoleUsagesItem["Region"].asString();
+		auto allResources = value["Resources"]["Resources"];
+		for (auto value : allResources)
+			roleUsagesObject.resources.push_back(value.asString());
+		roleUsages_.push_back(roleUsagesObject);
+	}
+	if(!value["Deletable"].isNull())
+		deletable_ = value["Deletable"].asString() == "true";
+
+}
+
+bool CheckServiceLinkedRoleForDeletingResult::getDeletable()const
+{
+	return deletable_;
+}
+
+std::vector<CheckServiceLinkedRoleForDeletingResult::RoleUsagesItem> CheckServiceLinkedRoleForDeletingResult::getRoleUsages()const
+{
+	return roleUsages_;
+}
+

+ 51 - 0
xtrace/src/model/GetSamplingRequest.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 <alibabacloud/xtrace/model/GetSamplingRequest.h>
+
+using AlibabaCloud::Xtrace::Model::GetSamplingRequest;
+
+GetSamplingRequest::GetSamplingRequest() :
+	RpcServiceRequest("xtrace", "2019-08-08", "GetSampling")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+GetSamplingRequest::~GetSamplingRequest()
+{}
+
+std::string GetSamplingRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void GetSamplingRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setParameter("RegionId", regionId);
+}
+
+std::string GetSamplingRequest::getProxyUserId()const
+{
+	return proxyUserId_;
+}
+
+void GetSamplingRequest::setProxyUserId(const std::string& proxyUserId)
+{
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
+}
+

+ 51 - 0
xtrace/src/model/GetSamplingResult.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 <alibabacloud/xtrace/model/GetSamplingResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Xtrace;
+using namespace AlibabaCloud::Xtrace::Model;
+
+GetSamplingResult::GetSamplingResult() :
+	ServiceResult()
+{}
+
+GetSamplingResult::GetSamplingResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+GetSamplingResult::~GetSamplingResult()
+{}
+
+void GetSamplingResult::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 GetSamplingResult::getData()const
+{
+	return data_;
+}
+

+ 11 - 0
xtrace/src/model/GetTokenRequest.cc

@@ -49,3 +49,14 @@ void GetTokenRequest::setAppType(const std::string& appType)
 	setParameter("AppType", appType);
 }
 
+std::string GetTokenRequest::getProxyUserId()const
+{
+	return proxyUserId_;
+}
+
+void GetTokenRequest::setProxyUserId(const std::string& proxyUserId)
+{
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
+}
+

+ 73 - 0
xtrace/src/model/GetTraceAnalysisRequest.cc

@@ -0,0 +1,73 @@
+/*
+ * 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/xtrace/model/GetTraceAnalysisRequest.h>
+
+using AlibabaCloud::Xtrace::Model::GetTraceAnalysisRequest;
+
+GetTraceAnalysisRequest::GetTraceAnalysisRequest() :
+	RpcServiceRequest("xtrace", "2019-08-08", "GetTraceAnalysis")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+GetTraceAnalysisRequest::~GetTraceAnalysisRequest()
+{}
+
+std::string GetTraceAnalysisRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void GetTraceAnalysisRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setParameter("RegionId", regionId);
+}
+
+std::string GetTraceAnalysisRequest::getQuery()const
+{
+	return query_;
+}
+
+void GetTraceAnalysisRequest::setQuery(const std::string& query)
+{
+	query_ = query;
+	setParameter("Query", query);
+}
+
+std::string GetTraceAnalysisRequest::getApi()const
+{
+	return api_;
+}
+
+void GetTraceAnalysisRequest::setApi(const std::string& api)
+{
+	api_ = api;
+	setParameter("Api", api);
+}
+
+std::string GetTraceAnalysisRequest::getProxyUserId()const
+{
+	return proxyUserId_;
+}
+
+void GetTraceAnalysisRequest::setProxyUserId(const std::string& proxyUserId)
+{
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
+}
+

+ 51 - 0
xtrace/src/model/GetTraceAnalysisResult.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 <alibabacloud/xtrace/model/GetTraceAnalysisResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Xtrace;
+using namespace AlibabaCloud::Xtrace::Model;
+
+GetTraceAnalysisResult::GetTraceAnalysisResult() :
+	ServiceResult()
+{}
+
+GetTraceAnalysisResult::GetTraceAnalysisResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+GetTraceAnalysisResult::~GetTraceAnalysisResult()
+{}
+
+void GetTraceAnalysisResult::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 GetTraceAnalysisResult::getData()const
+{
+	return data_;
+}
+

+ 11 - 0
xtrace/src/model/QueryMetricRequest.cc

@@ -76,6 +76,17 @@ void QueryMetricRequest::setFilters(const std::vector<Filters>& filters)
 	}
 }
 
+std::string QueryMetricRequest::getProxyUserId()const
+{
+	return proxyUserId_;
+}
+
+void QueryMetricRequest::setProxyUserId(const std::string& proxyUserId)
+{
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
+}
+
 std::vector<std::string> QueryMetricRequest::getMeasures()const
 {
 	return measures_;

+ 62 - 0
xtrace/src/model/UpdateSamplingRequest.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 <alibabacloud/xtrace/model/UpdateSamplingRequest.h>
+
+using AlibabaCloud::Xtrace::Model::UpdateSamplingRequest;
+
+UpdateSamplingRequest::UpdateSamplingRequest() :
+	RpcServiceRequest("xtrace", "2019-08-08", "UpdateSampling")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+UpdateSamplingRequest::~UpdateSamplingRequest()
+{}
+
+std::string UpdateSamplingRequest::getRegionId()const
+{
+	return regionId_;
+}
+
+void UpdateSamplingRequest::setRegionId(const std::string& regionId)
+{
+	regionId_ = regionId;
+	setParameter("RegionId", regionId);
+}
+
+std::string UpdateSamplingRequest::getSampling()const
+{
+	return sampling_;
+}
+
+void UpdateSamplingRequest::setSampling(const std::string& sampling)
+{
+	sampling_ = sampling;
+	setParameter("Sampling", sampling);
+}
+
+std::string UpdateSamplingRequest::getProxyUserId()const
+{
+	return proxyUserId_;
+}
+
+void UpdateSamplingRequest::setProxyUserId(const std::string& proxyUserId)
+{
+	proxyUserId_ = proxyUserId;
+	setParameter("ProxyUserId", proxyUserId);
+}
+

+ 51 - 0
xtrace/src/model/UpdateSamplingResult.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 <alibabacloud/xtrace/model/UpdateSamplingResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Xtrace;
+using namespace AlibabaCloud::Xtrace::Model;
+
+UpdateSamplingResult::UpdateSamplingResult() :
+	ServiceResult()
+{}
+
+UpdateSamplingResult::UpdateSamplingResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+UpdateSamplingResult::~UpdateSamplingResult()
+{}
+
+void UpdateSamplingResult::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 UpdateSamplingResult::getData()const
+{
+	return data_;
+}
+