Compare commits

..

2 Commits

Author SHA1 Message Date
sdk-team
51b76b4599 Add api for getTrace and searchTracelist. 2019-08-30 11:03:04 +08:00
sdk-team
ff63a49df8 Move StopExecution params to body. 2019-08-29 14:26:47 +08:00
36 changed files with 2178 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2019-08-30 Version 1.36.100
- Add api for getTrace and searchTracelist.
2019-08-29 Version 1.36.99
- Move StopExecution params to body.
2019-08-29 Version 1.36.98
- For publish.

View File

@@ -1 +1 @@
1.36.98
1.36.100

View File

@@ -23,12 +23,22 @@ set(fnf_public_header
set(fnf_public_header_model
include/alibabacloud/fnf/model/UpdateFlowRequest.h
include/alibabacloud/fnf/model/UpdateFlowResult.h
include/alibabacloud/fnf/model/DeleteFlowRequest.h
include/alibabacloud/fnf/model/DeleteFlowResult.h
include/alibabacloud/fnf/model/CreateFlowRequest.h
include/alibabacloud/fnf/model/CreateFlowResult.h
include/alibabacloud/fnf/model/DescribeExecutionRequest.h
include/alibabacloud/fnf/model/DescribeExecutionResult.h
include/alibabacloud/fnf/model/ReportTaskFailedRequest.h
include/alibabacloud/fnf/model/ReportTaskFailedResult.h
include/alibabacloud/fnf/model/DescribeFlowRequest.h
include/alibabacloud/fnf/model/DescribeFlowResult.h
include/alibabacloud/fnf/model/StopExecutionRequest.h
include/alibabacloud/fnf/model/StopExecutionResult.h
include/alibabacloud/fnf/model/StartExecutionRequest.h
include/alibabacloud/fnf/model/StartExecutionResult.h
include/alibabacloud/fnf/model/GetExecutionHistoryRequest.h
include/alibabacloud/fnf/model/GetExecutionHistoryResult.h
include/alibabacloud/fnf/model/ListExecutionsRequest.h
include/alibabacloud/fnf/model/ListExecutionsResult.h
include/alibabacloud/fnf/model/ReportTaskSucceededRequest.h
@@ -40,12 +50,22 @@ set(fnf_src
src/FnfClient.cc
src/model/UpdateFlowRequest.cc
src/model/UpdateFlowResult.cc
src/model/DeleteFlowRequest.cc
src/model/DeleteFlowResult.cc
src/model/CreateFlowRequest.cc
src/model/CreateFlowResult.cc
src/model/DescribeExecutionRequest.cc
src/model/DescribeExecutionResult.cc
src/model/ReportTaskFailedRequest.cc
src/model/ReportTaskFailedResult.cc
src/model/DescribeFlowRequest.cc
src/model/DescribeFlowResult.cc
src/model/StopExecutionRequest.cc
src/model/StopExecutionResult.cc
src/model/StartExecutionRequest.cc
src/model/StartExecutionResult.cc
src/model/GetExecutionHistoryRequest.cc
src/model/GetExecutionHistoryResult.cc
src/model/ListExecutionsRequest.cc
src/model/ListExecutionsResult.cc
src/model/ReportTaskSucceededRequest.cc

View File

@@ -0,0 +1,32 @@
/*
* 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_XTRACEEXPORT_H_
#define ALIBABACLOUD_XTRACE_XTRACEEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_XTRACE_LIBRARY)
# define ALIBABACLOUD_XTRACE_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_XTRACE_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_XTRACE_EXPORT
#endif
#endif // !ALIBABACLOUD_XTRACE_XTRACEEXPORT_H_

View File

@@ -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_GETTAGKEYREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTAGKEYREQUEST_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 GetTagKeyRequest : public RpcServiceRequest
{
public:
GetTagKeyRequest();
~GetTagKeyRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
long getEndTime()const;
void setEndTime(long endTime);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
long getStartTime()const;
void setStartTime(long startTime);
std::string getSpanName()const;
void setSpanName(const std::string& spanName);
private:
std::string regionId_;
long endTime_;
std::string serviceName_;
long startTime_;
std::string spanName_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTAGKEYREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_GETTAGKEYRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTAGKEYRESULT_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 GetTagKeyResult : public ServiceResult
{
public:
GetTagKeyResult();
explicit GetTagKeyResult(const std::string &payload);
~GetTagKeyResult();
std::vector<std::string> getTagKeys()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> tagKeys_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTAGKEYRESULT_H_

View File

@@ -0,0 +1,63 @@
/*
* 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_GETTAGVALREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTAGVALREQUEST_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 GetTagValRequest : public RpcServiceRequest
{
public:
GetTagValRequest();
~GetTagValRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
long getEndTime()const;
void setEndTime(long endTime);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
long getStartTime()const;
void setStartTime(long startTime);
std::string getTagKey()const;
void setTagKey(const std::string& tagKey);
std::string getSpanName()const;
void setSpanName(const std::string& spanName);
private:
std::string regionId_;
long endTime_;
std::string serviceName_;
long startTime_;
std::string tagKey_;
std::string spanName_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTAGVALREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_GETTAGVALRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTAGVALRESULT_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 GetTagValResult : public ServiceResult
{
public:
GetTagValResult();
explicit GetTagValResult(const std::string &payload);
~GetTagValResult();
std::vector<std::string> getTagValues()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> tagValues_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTAGVALRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_GETTOKENREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTOKENREQUEST_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 GetTokenRequest : public RpcServiceRequest
{
public:
GetTokenRequest();
~GetTokenRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAppType()const;
void setAppType(const std::string& appType);
private:
std::string regionId_;
std::string appType_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTOKENREQUEST_H_

View File

@@ -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_GETTOKENRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTOKENRESULT_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 GetTokenResult : public ServiceResult
{
public:
struct Token
{
std::string pid;
std::string domain;
std::string internalDomain;
std::string licenseKey;
};
GetTokenResult();
explicit GetTokenResult(const std::string &payload);
~GetTokenResult();
Token getToken()const;
protected:
void parse(const std::string &payload);
private:
Token token_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTOKENRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_GETTRACEREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTRACEREQUEST_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 GetTraceRequest : public RpcServiceRequest
{
public:
GetTraceRequest();
~GetTraceRequest();
std::string getTraceID()const;
void setTraceID(const std::string& traceID);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAppType()const;
void setAppType(const std::string& appType);
private:
std::string traceID_;
std::string regionId_;
std::string appType_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTRACEREQUEST_H_

View File

@@ -0,0 +1,80 @@
/*
* 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_GETTRACERESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_GETTRACERESULT_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 GetTraceResult : public ServiceResult
{
public:
struct Span
{
struct TagEntry
{
std::string value;
std::string key;
};
struct LogEvent
{
struct TagEntry2
{
std::string value;
std::string key;
};
std::vector<LogEvent::TagEntry2> tagEntryList1;
long timestamp;
};
bool haveStack;
std::string serviceIp;
std::vector<Span::LogEvent> logEventList;
std::string operationName;
std::string serviceName;
std::string rpcId;
std::string traceID;
long duration;
std::vector<Span::TagEntry> tagEntryList;
long timestamp;
std::string resultCode;
};
GetTraceResult();
explicit GetTraceResult(const std::string &payload);
~GetTraceResult();
std::vector<Span> getSpans()const;
protected:
void parse(const std::string &payload);
private:
std::vector<Span> spans_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_GETTRACERESULT_H_

View File

@@ -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_LISTIPORHOSTSREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTIPORHOSTSREQUEST_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 ListIpOrHostsRequest : public RpcServiceRequest
{
public:
ListIpOrHostsRequest();
~ListIpOrHostsRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
long getEndTime()const;
void setEndTime(long endTime);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
long getStartTime()const;
void setStartTime(long startTime);
private:
std::string regionId_;
long endTime_;
std::string serviceName_;
long startTime_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTIPORHOSTSREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_LISTIPORHOSTSRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTIPORHOSTSRESULT_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 ListIpOrHostsResult : public ServiceResult
{
public:
ListIpOrHostsResult();
explicit ListIpOrHostsResult(const std::string &payload);
~ListIpOrHostsResult();
std::vector<std::string> getIpNames()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> ipNames_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTIPORHOSTSRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_LISTSERVICESREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTSERVICESREQUEST_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 ListServicesRequest : public RpcServiceRequest
{
public:
ListServicesRequest();
~ListServicesRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAppType()const;
void setAppType(const std::string& appType);
private:
std::string regionId_;
std::string appType_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTSERVICESREQUEST_H_

View File

@@ -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_LISTSERVICESRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTSERVICESRESULT_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 ListServicesResult : public ServiceResult
{
public:
struct Service
{
std::string serviceName;
std::string pid;
std::string regionId;
};
ListServicesResult();
explicit ListServicesResult(const std::string &payload);
~ListServicesResult();
std::vector<Service> getServices()const;
protected:
void parse(const std::string &payload);
private:
std::vector<Service> services_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTSERVICESRESULT_H_

View File

@@ -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_LISTSPANNAMESREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTSPANNAMESREQUEST_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 ListSpanNamesRequest : public RpcServiceRequest
{
public:
ListSpanNamesRequest();
~ListSpanNamesRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
long getEndTime()const;
void setEndTime(long endTime);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
long getStartTime()const;
void setStartTime(long startTime);
private:
std::string regionId_;
long endTime_;
std::string serviceName_;
long startTime_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTSPANNAMESREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_LISTSPANNAMESRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_LISTSPANNAMESRESULT_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 ListSpanNamesResult : public ServiceResult
{
public:
ListSpanNamesResult();
explicit ListSpanNamesResult(const std::string &payload);
~ListSpanNamesResult();
std::vector<std::string> getSpanNames()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> spanNames_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_LISTSPANNAMESRESULT_H_

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESREQUEST_H_
#define ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESREQUEST_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 SearchTracesRequest : public RpcServiceRequest
{
struct Tag
{
std::string value;
std::string key;
};
public:
SearchTracesRequest();
~SearchTracesRequest();
std::string getServiceIp()const;
void setServiceIp(const std::string& serviceIp);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getOperationName()const;
void setOperationName(const std::string& operationName);
std::string getAppType()const;
void setAppType(const std::string& appType);
int getPageSize()const;
void setPageSize(int pageSize);
long getEndTime()const;
void setEndTime(long endTime);
std::string getServiceName()const;
void setServiceName(const std::string& serviceName);
long getStartTime()const;
void setStartTime(long startTime);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
bool getReverse()const;
void setReverse(bool reverse);
long getMinDuration()const;
void setMinDuration(long minDuration);
int getPageNumber()const;
void setPageNumber(int pageNumber);
private:
std::string serviceIp_;
std::string regionId_;
std::string operationName_;
std::string appType_;
int pageSize_;
long endTime_;
std::string serviceName_;
long startTime_;
std::vector<Tag> tag_;
bool reverse_;
long minDuration_;
int pageNumber_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESRESULT_H_
#define ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESRESULT_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 SearchTracesResult : public ServiceResult
{
public:
struct PageBean
{
struct TraceInfo
{
std::string serviceIp;
std::string operationName;
std::string serviceName;
std::string traceID;
long duration;
long timestamp;
};
long totalCount;
int pageSize;
int pageNumber;
std::vector<TraceInfo> traceInfos;
};
SearchTracesResult();
explicit SearchTracesResult(const std::string &payload);
~SearchTracesResult();
PageBean getPageBean()const;
protected:
void parse(const std::string &payload);
private:
PageBean pageBean_;
};
}
}
}
#endif // !ALIBABACLOUD_XTRACE_MODEL_SEARCHTRACESRESULT_H_

View File

@@ -0,0 +1,82 @@
/*
* 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/GetTagKeyRequest.h>
using AlibabaCloud::Xtrace::Model::GetTagKeyRequest;
GetTagKeyRequest::GetTagKeyRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "GetTagKey")
{}
GetTagKeyRequest::~GetTagKeyRequest()
{}
std::string GetTagKeyRequest::getRegionId()const
{
return regionId_;
}
void GetTagKeyRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
long GetTagKeyRequest::getEndTime()const
{
return endTime_;
}
void GetTagKeyRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setCoreParameter("EndTime", std::to_string(endTime));
}
std::string GetTagKeyRequest::getServiceName()const
{
return serviceName_;
}
void GetTagKeyRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setCoreParameter("ServiceName", serviceName);
}
long GetTagKeyRequest::getStartTime()const
{
return startTime_;
}
void GetTagKeyRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setCoreParameter("StartTime", std::to_string(startTime));
}
std::string GetTagKeyRequest::getSpanName()const
{
return spanName_;
}
void GetTagKeyRequest::setSpanName(const std::string& spanName)
{
spanName_ = spanName;
setCoreParameter("SpanName", spanName);
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/xtrace/model/GetTagKeyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
GetTagKeyResult::GetTagKeyResult() :
ServiceResult()
{}
GetTagKeyResult::GetTagKeyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTagKeyResult::~GetTagKeyResult()
{}
void GetTagKeyResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allTagKeys = value["TagKeys"]["TagKey"];
for (const auto &item : allTagKeys)
tagKeys_.push_back(item.asString());
}
std::vector<std::string> GetTagKeyResult::getTagKeys()const
{
return tagKeys_;
}

View File

@@ -0,0 +1,93 @@
/*
* 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/GetTagValRequest.h>
using AlibabaCloud::Xtrace::Model::GetTagValRequest;
GetTagValRequest::GetTagValRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "GetTagVal")
{}
GetTagValRequest::~GetTagValRequest()
{}
std::string GetTagValRequest::getRegionId()const
{
return regionId_;
}
void GetTagValRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
long GetTagValRequest::getEndTime()const
{
return endTime_;
}
void GetTagValRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setCoreParameter("EndTime", std::to_string(endTime));
}
std::string GetTagValRequest::getServiceName()const
{
return serviceName_;
}
void GetTagValRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setCoreParameter("ServiceName", serviceName);
}
long GetTagValRequest::getStartTime()const
{
return startTime_;
}
void GetTagValRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setCoreParameter("StartTime", std::to_string(startTime));
}
std::string GetTagValRequest::getTagKey()const
{
return tagKey_;
}
void GetTagValRequest::setTagKey(const std::string& tagKey)
{
tagKey_ = tagKey;
setCoreParameter("TagKey", tagKey);
}
std::string GetTagValRequest::getSpanName()const
{
return spanName_;
}
void GetTagValRequest::setSpanName(const std::string& spanName)
{
spanName_ = spanName;
setCoreParameter("SpanName", spanName);
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/xtrace/model/GetTagValResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
GetTagValResult::GetTagValResult() :
ServiceResult()
{}
GetTagValResult::GetTagValResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTagValResult::~GetTagValResult()
{}
void GetTagValResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allTagValues = value["TagValues"]["TagValue"];
for (const auto &item : allTagValues)
tagValues_.push_back(item.asString());
}
std::vector<std::string> GetTagValResult::getTagValues()const
{
return tagValues_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/GetTokenRequest.h>
using AlibabaCloud::Xtrace::Model::GetTokenRequest;
GetTokenRequest::GetTokenRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "GetToken")
{}
GetTokenRequest::~GetTokenRequest()
{}
std::string GetTokenRequest::getRegionId()const
{
return regionId_;
}
void GetTokenRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string GetTokenRequest::getAppType()const
{
return appType_;
}
void GetTokenRequest::setAppType(const std::string& appType)
{
appType_ = appType;
setCoreParameter("AppType", appType);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/xtrace/model/GetTokenResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
GetTokenResult::GetTokenResult() :
ServiceResult()
{}
GetTokenResult::GetTokenResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTokenResult::~GetTokenResult()
{}
void GetTokenResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto tokenNode = value["Token"];
if(!tokenNode["Domain"].isNull())
token_.domain = tokenNode["Domain"].asString();
if(!tokenNode["LicenseKey"].isNull())
token_.licenseKey = tokenNode["LicenseKey"].asString();
if(!tokenNode["Pid"].isNull())
token_.pid = tokenNode["Pid"].asString();
if(!tokenNode["InternalDomain"].isNull())
token_.internalDomain = tokenNode["InternalDomain"].asString();
}
GetTokenResult::Token GetTokenResult::getToken()const
{
return token_;
}

View File

@@ -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.
*/
#include <alibabacloud/xtrace/model/GetTraceRequest.h>
using AlibabaCloud::Xtrace::Model::GetTraceRequest;
GetTraceRequest::GetTraceRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "GetTrace")
{}
GetTraceRequest::~GetTraceRequest()
{}
std::string GetTraceRequest::getTraceID()const
{
return traceID_;
}
void GetTraceRequest::setTraceID(const std::string& traceID)
{
traceID_ = traceID;
setCoreParameter("TraceID", traceID);
}
std::string GetTraceRequest::getRegionId()const
{
return regionId_;
}
void GetTraceRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string GetTraceRequest::getAppType()const
{
return appType_;
}
void GetTraceRequest::setAppType(const std::string& appType)
{
appType_ = appType;
setCoreParameter("AppType", appType);
}

View File

@@ -0,0 +1,105 @@
/*
* 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/GetTraceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
GetTraceResult::GetTraceResult() :
ServiceResult()
{}
GetTraceResult::GetTraceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTraceResult::~GetTraceResult()
{}
void GetTraceResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allSpans = value["Spans"]["Span"];
for (auto value : allSpans)
{
Span spansObject;
if(!value["TraceID"].isNull())
spansObject.traceID = value["TraceID"].asString();
if(!value["OperationName"].isNull())
spansObject.operationName = value["OperationName"].asString();
if(!value["Duration"].isNull())
spansObject.duration = std::stol(value["Duration"].asString());
if(!value["ServiceName"].isNull())
spansObject.serviceName = value["ServiceName"].asString();
if(!value["ServiceIp"].isNull())
spansObject.serviceIp = value["ServiceIp"].asString();
if(!value["Timestamp"].isNull())
spansObject.timestamp = std::stol(value["Timestamp"].asString());
if(!value["RpcId"].isNull())
spansObject.rpcId = value["RpcId"].asString();
if(!value["ResultCode"].isNull())
spansObject.resultCode = value["ResultCode"].asString();
if(!value["HaveStack"].isNull())
spansObject.haveStack = value["HaveStack"].asString() == "true";
auto allTagEntryList = value["TagEntryList"]["TagEntry"];
for (auto value : allTagEntryList)
{
Span::TagEntry tagEntryListObject;
if(!value["Key"].isNull())
tagEntryListObject.key = value["Key"].asString();
if(!value["Value"].isNull())
tagEntryListObject.value = value["Value"].asString();
spansObject.tagEntryList.push_back(tagEntryListObject);
}
auto allLogEventList = value["LogEventList"]["LogEvent"];
for (auto value : allLogEventList)
{
Span::LogEvent logEventListObject;
if(!value["Timestamp"].isNull())
logEventListObject.timestamp = std::stol(value["Timestamp"].asString());
auto allTagEntryList1 = value["TagEntryList"]["TagEntry"];
for (auto value : allTagEntryList1)
{
Span::LogEvent::TagEntry2 tagEntryList1Object;
if(!value["Key"].isNull())
tagEntryList1Object.key = value["Key"].asString();
if(!value["Value"].isNull())
tagEntryList1Object.value = value["Value"].asString();
logEventListObject.tagEntryList1.push_back(tagEntryList1Object);
}
spansObject.logEventList.push_back(logEventListObject);
}
spans_.push_back(spansObject);
}
}
std::vector<GetTraceResult::Span> GetTraceResult::getSpans()const
{
return spans_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/ListIpOrHostsRequest.h>
using AlibabaCloud::Xtrace::Model::ListIpOrHostsRequest;
ListIpOrHostsRequest::ListIpOrHostsRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "ListIpOrHosts")
{}
ListIpOrHostsRequest::~ListIpOrHostsRequest()
{}
std::string ListIpOrHostsRequest::getRegionId()const
{
return regionId_;
}
void ListIpOrHostsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
long ListIpOrHostsRequest::getEndTime()const
{
return endTime_;
}
void ListIpOrHostsRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setCoreParameter("EndTime", std::to_string(endTime));
}
std::string ListIpOrHostsRequest::getServiceName()const
{
return serviceName_;
}
void ListIpOrHostsRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setCoreParameter("ServiceName", serviceName);
}
long ListIpOrHostsRequest::getStartTime()const
{
return startTime_;
}
void ListIpOrHostsRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setCoreParameter("StartTime", std::to_string(startTime));
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/xtrace/model/ListIpOrHostsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
ListIpOrHostsResult::ListIpOrHostsResult() :
ServiceResult()
{}
ListIpOrHostsResult::ListIpOrHostsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListIpOrHostsResult::~ListIpOrHostsResult()
{}
void ListIpOrHostsResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allIpNames = value["IpNames"]["IpName"];
for (const auto &item : allIpNames)
ipNames_.push_back(item.asString());
}
std::vector<std::string> ListIpOrHostsResult::getIpNames()const
{
return ipNames_;
}

View File

@@ -0,0 +1,49 @@
/*
* 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/ListServicesRequest.h>
using AlibabaCloud::Xtrace::Model::ListServicesRequest;
ListServicesRequest::ListServicesRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "ListServices")
{}
ListServicesRequest::~ListServicesRequest()
{}
std::string ListServicesRequest::getRegionId()const
{
return regionId_;
}
void ListServicesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ListServicesRequest::getAppType()const
{
return appType_;
}
void ListServicesRequest::setAppType(const std::string& appType)
{
appType_ = appType;
setCoreParameter("AppType", appType);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/ListServicesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
ListServicesResult::ListServicesResult() :
ServiceResult()
{}
ListServicesResult::ListServicesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListServicesResult::~ListServicesResult()
{}
void ListServicesResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allServices = value["Services"]["Service"];
for (auto value : allServices)
{
Service servicesObject;
if(!value["ServiceName"].isNull())
servicesObject.serviceName = value["ServiceName"].asString();
if(!value["Pid"].isNull())
servicesObject.pid = value["Pid"].asString();
if(!value["RegionId"].isNull())
servicesObject.regionId = value["RegionId"].asString();
services_.push_back(servicesObject);
}
}
std::vector<ListServicesResult::Service> ListServicesResult::getServices()const
{
return services_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/ListSpanNamesRequest.h>
using AlibabaCloud::Xtrace::Model::ListSpanNamesRequest;
ListSpanNamesRequest::ListSpanNamesRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "ListSpanNames")
{}
ListSpanNamesRequest::~ListSpanNamesRequest()
{}
std::string ListSpanNamesRequest::getRegionId()const
{
return regionId_;
}
void ListSpanNamesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
long ListSpanNamesRequest::getEndTime()const
{
return endTime_;
}
void ListSpanNamesRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setCoreParameter("EndTime", std::to_string(endTime));
}
std::string ListSpanNamesRequest::getServiceName()const
{
return serviceName_;
}
void ListSpanNamesRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setCoreParameter("ServiceName", serviceName);
}
long ListSpanNamesRequest::getStartTime()const
{
return startTime_;
}
void ListSpanNamesRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setCoreParameter("StartTime", std::to_string(startTime));
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/xtrace/model/ListSpanNamesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
ListSpanNamesResult::ListSpanNamesResult() :
ServiceResult()
{}
ListSpanNamesResult::ListSpanNamesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSpanNamesResult::~ListSpanNamesResult()
{}
void ListSpanNamesResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto allSpanNames = value["SpanNames"]["SpanName"];
for (const auto &item : allSpanNames)
spanNames_.push_back(item.asString());
}
std::vector<std::string> ListSpanNamesResult::getSpanNames()const
{
return spanNames_;
}

View File

@@ -0,0 +1,165 @@
/*
* 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/SearchTracesRequest.h>
using AlibabaCloud::Xtrace::Model::SearchTracesRequest;
SearchTracesRequest::SearchTracesRequest() :
RpcServiceRequest("xtrace", "2019-08-08", "SearchTraces")
{}
SearchTracesRequest::~SearchTracesRequest()
{}
std::string SearchTracesRequest::getServiceIp()const
{
return serviceIp_;
}
void SearchTracesRequest::setServiceIp(const std::string& serviceIp)
{
serviceIp_ = serviceIp;
setCoreParameter("ServiceIp", serviceIp);
}
std::string SearchTracesRequest::getRegionId()const
{
return regionId_;
}
void SearchTracesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string SearchTracesRequest::getOperationName()const
{
return operationName_;
}
void SearchTracesRequest::setOperationName(const std::string& operationName)
{
operationName_ = operationName;
setCoreParameter("OperationName", operationName);
}
std::string SearchTracesRequest::getAppType()const
{
return appType_;
}
void SearchTracesRequest::setAppType(const std::string& appType)
{
appType_ = appType;
setCoreParameter("AppType", appType);
}
int SearchTracesRequest::getPageSize()const
{
return pageSize_;
}
void SearchTracesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
long SearchTracesRequest::getEndTime()const
{
return endTime_;
}
void SearchTracesRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setCoreParameter("EndTime", std::to_string(endTime));
}
std::string SearchTracesRequest::getServiceName()const
{
return serviceName_;
}
void SearchTracesRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setCoreParameter("ServiceName", serviceName);
}
long SearchTracesRequest::getStartTime()const
{
return startTime_;
}
void SearchTracesRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setCoreParameter("StartTime", std::to_string(startTime));
}
std::vector<SearchTracesRequest::Tag> SearchTracesRequest::getTag()const
{
return tag_;
}
void SearchTracesRequest::setTag(const std::vector<Tag>& tag)
{
tag_ = tag;
int i = 0;
for(int i = 0; i!= tag.size(); i++) {
auto obj = tag.at(i);
std::string str ="Tag."+ std::to_string(i);
setCoreParameter(str + ".Value", obj.value);
setCoreParameter(str + ".Key", obj.key);
}
}
bool SearchTracesRequest::getReverse()const
{
return reverse_;
}
void SearchTracesRequest::setReverse(bool reverse)
{
reverse_ = reverse;
setCoreParameter("Reverse", reverse ? "true" : "false");
}
long SearchTracesRequest::getMinDuration()const
{
return minDuration_;
}
void SearchTracesRequest::setMinDuration(long minDuration)
{
minDuration_ = minDuration;
setCoreParameter("MinDuration", std::to_string(minDuration));
}
int SearchTracesRequest::getPageNumber()const
{
return pageNumber_;
}
void SearchTracesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,78 @@
/*
* 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/SearchTracesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Xtrace;
using namespace AlibabaCloud::Xtrace::Model;
SearchTracesResult::SearchTracesResult() :
ServiceResult()
{}
SearchTracesResult::SearchTracesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchTracesResult::~SearchTracesResult()
{}
void SearchTracesResult::parse(const std::string &payload)
{
Json::CharReaderBuilder builder;
Json::CharReader *reader = builder.newCharReader();
Json::Value *val;
Json::Value value;
JSONCPP_STRING *errs;
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
value = *val;
setRequestId(value["RequestId"].asString());
auto pageBeanNode = value["PageBean"];
if(!pageBeanNode["TotalCount"].isNull())
pageBean_.totalCount = std::stol(pageBeanNode["TotalCount"].asString());
if(!pageBeanNode["PageSize"].isNull())
pageBean_.pageSize = std::stoi(pageBeanNode["PageSize"].asString());
if(!pageBeanNode["PageNumber"].isNull())
pageBean_.pageNumber = std::stoi(pageBeanNode["PageNumber"].asString());
auto allTraceInfos = value["TraceInfos"]["TraceInfo"];
for (auto value : allTraceInfos)
{
PageBean::TraceInfo traceInfoObject;
if(!value["TraceID"].isNull())
traceInfoObject.traceID = value["TraceID"].asString();
if(!value["OperationName"].isNull())
traceInfoObject.operationName = value["OperationName"].asString();
if(!value["ServiceName"].isNull())
traceInfoObject.serviceName = value["ServiceName"].asString();
if(!value["ServiceIp"].isNull())
traceInfoObject.serviceIp = value["ServiceIp"].asString();
if(!value["Duration"].isNull())
traceInfoObject.duration = std::stol(value["Duration"].asString());
if(!value["Timestamp"].isNull())
traceInfoObject.timestamp = std::stol(value["Timestamp"].asString());
pageBean_.traceInfos.push_back(traceInfoObject);
}
}
SearchTracesResult::PageBean SearchTracesResult::getPageBean()const
{
return pageBean_;
}