From f1590ff81a1f1680c52463613478555aa9e24e38 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 30 Nov 2020 09:08:10 +0000 Subject: [PATCH] Add OpenARMS api. --- CHANGELOG | 3 + arms/CMakeLists.txt | 24 ++ arms/include/alibabacloud/arms/ARMSClient.h | 48 ++++ .../arms/model/CreateWehookRequest.h | 12 +- .../arms/model/DescribeDispatchRuleRequest.h | 54 +++++ .../arms/model/DescribeDispatchRuleResult.h | 92 ++++++++ .../arms/model/ExportPrometheusRulesRequest.h | 57 +++++ .../arms/model/ExportPrometheusRulesResult.h | 51 +++++ .../arms/model/GetIntegrationTokenRequest.h | 54 +++++ .../arms/model/GetIntegrationTokenResult.h | 51 +++++ .../arms/model/ImportPrometheusRulesRequest.h | 60 +++++ .../arms/model/ImportPrometheusRulesResult.h | 51 +++++ .../arms/model/SendCustomIncidentsRequest.h | 57 +++++ .../arms/model/SendCustomIncidentsResult.h | 51 +++++ .../arms/model/SendMseIncidentRequest.h | 54 +++++ .../arms/model/SendMseIncidentResult.h | 51 +++++ .../arms/model/UpdateWebhookRequest.h | 12 +- arms/src/ARMSClient.cc | 216 ++++++++++++++++++ arms/src/model/CreateWehookRequest.cc | 20 +- arms/src/model/DescribeDispatchRuleRequest.cc | 62 +++++ arms/src/model/DescribeDispatchRuleResult.cc | 111 +++++++++ .../src/model/ExportPrometheusRulesRequest.cc | 73 ++++++ arms/src/model/ExportPrometheusRulesResult.cc | 51 +++++ arms/src/model/GetIntegrationTokenRequest.cc | 62 +++++ arms/src/model/GetIntegrationTokenResult.cc | 51 +++++ arms/src/model/GetMultipleTraceResult.cc | 76 +++--- arms/src/model/GetTraceResult.cc | 32 +-- .../src/model/ImportPrometheusRulesRequest.cc | 84 +++++++ arms/src/model/ImportPrometheusRulesResult.cc | 51 +++++ .../model/SearchAlertContactGroupResult.cc | 40 ++-- arms/src/model/SendCustomIncidentsRequest.cc | 73 ++++++ arms/src/model/SendCustomIncidentsResult.cc | 51 +++++ arms/src/model/SendMseIncidentRequest.cc | 62 +++++ arms/src/model/SendMseIncidentResult.cc | 51 +++++ arms/src/model/UpdateWebhookRequest.cc | 20 +- 35 files changed, 1862 insertions(+), 106 deletions(-) create mode 100644 arms/include/alibabacloud/arms/model/DescribeDispatchRuleRequest.h create mode 100644 arms/include/alibabacloud/arms/model/DescribeDispatchRuleResult.h create mode 100644 arms/include/alibabacloud/arms/model/ExportPrometheusRulesRequest.h create mode 100644 arms/include/alibabacloud/arms/model/ExportPrometheusRulesResult.h create mode 100644 arms/include/alibabacloud/arms/model/GetIntegrationTokenRequest.h create mode 100644 arms/include/alibabacloud/arms/model/GetIntegrationTokenResult.h create mode 100644 arms/include/alibabacloud/arms/model/ImportPrometheusRulesRequest.h create mode 100644 arms/include/alibabacloud/arms/model/ImportPrometheusRulesResult.h create mode 100644 arms/include/alibabacloud/arms/model/SendCustomIncidentsRequest.h create mode 100644 arms/include/alibabacloud/arms/model/SendCustomIncidentsResult.h create mode 100644 arms/include/alibabacloud/arms/model/SendMseIncidentRequest.h create mode 100644 arms/include/alibabacloud/arms/model/SendMseIncidentResult.h create mode 100644 arms/src/model/DescribeDispatchRuleRequest.cc create mode 100644 arms/src/model/DescribeDispatchRuleResult.cc create mode 100644 arms/src/model/ExportPrometheusRulesRequest.cc create mode 100644 arms/src/model/ExportPrometheusRulesResult.cc create mode 100644 arms/src/model/GetIntegrationTokenRequest.cc create mode 100644 arms/src/model/GetIntegrationTokenResult.cc create mode 100644 arms/src/model/ImportPrometheusRulesRequest.cc create mode 100644 arms/src/model/ImportPrometheusRulesResult.cc create mode 100644 arms/src/model/SendCustomIncidentsRequest.cc create mode 100644 arms/src/model/SendCustomIncidentsResult.cc create mode 100644 arms/src/model/SendMseIncidentRequest.cc create mode 100644 arms/src/model/SendMseIncidentResult.cc diff --git a/CHANGELOG b/CHANGELOG index 2cebed899..cd751bc32 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-11-30 Version: patch +- Add OpenARMS api. + 2020-11-30 Version: patch - Support autoPtovisioning whth DiskConfigs. diff --git a/arms/CMakeLists.txt b/arms/CMakeLists.txt index 5d9901710..7e836cba1 100644 --- a/arms/CMakeLists.txt +++ b/arms/CMakeLists.txt @@ -49,14 +49,20 @@ set(arms_public_header_model include/alibabacloud/arms/model/DeleteRetcodeAppResult.h include/alibabacloud/arms/model/DeleteTraceAppRequest.h include/alibabacloud/arms/model/DeleteTraceAppResult.h + include/alibabacloud/arms/model/DescribeDispatchRuleRequest.h + include/alibabacloud/arms/model/DescribeDispatchRuleResult.h include/alibabacloud/arms/model/DescribeTraceLicenseKeyRequest.h include/alibabacloud/arms/model/DescribeTraceLicenseKeyResult.h include/alibabacloud/arms/model/DescribeTraceLocationRequest.h include/alibabacloud/arms/model/DescribeTraceLocationResult.h + include/alibabacloud/arms/model/ExportPrometheusRulesRequest.h + include/alibabacloud/arms/model/ExportPrometheusRulesResult.h include/alibabacloud/arms/model/GetAppApiByPageRequest.h include/alibabacloud/arms/model/GetAppApiByPageResult.h include/alibabacloud/arms/model/GetConsistencySnapshotRequest.h include/alibabacloud/arms/model/GetConsistencySnapshotResult.h + include/alibabacloud/arms/model/GetIntegrationTokenRequest.h + include/alibabacloud/arms/model/GetIntegrationTokenResult.h include/alibabacloud/arms/model/GetMultipleTraceRequest.h include/alibabacloud/arms/model/GetMultipleTraceResult.h include/alibabacloud/arms/model/GetPrometheusApiTokenRequest.h @@ -73,6 +79,8 @@ set(arms_public_header_model include/alibabacloud/arms/model/ImportAppAlertRulesResult.h include/alibabacloud/arms/model/ImportCustomAlertRulesRequest.h include/alibabacloud/arms/model/ImportCustomAlertRulesResult.h + include/alibabacloud/arms/model/ImportPrometheusRulesRequest.h + include/alibabacloud/arms/model/ImportPrometheusRulesResult.h include/alibabacloud/arms/model/ListClusterFromGrafanaRequest.h include/alibabacloud/arms/model/ListClusterFromGrafanaResult.h include/alibabacloud/arms/model/ListDashboardsRequest.h @@ -111,6 +119,10 @@ set(arms_public_header_model include/alibabacloud/arms/model/SearchTracesResult.h include/alibabacloud/arms/model/SearchTracesByPageRequest.h include/alibabacloud/arms/model/SearchTracesByPageResult.h + include/alibabacloud/arms/model/SendCustomIncidentsRequest.h + include/alibabacloud/arms/model/SendCustomIncidentsResult.h + include/alibabacloud/arms/model/SendMseIncidentRequest.h + include/alibabacloud/arms/model/SendMseIncidentResult.h include/alibabacloud/arms/model/SetRetcodeShareStatusRequest.h include/alibabacloud/arms/model/SetRetcodeShareStatusResult.h include/alibabacloud/arms/model/StartAlertRequest.h @@ -156,14 +168,20 @@ set(arms_src src/model/DeleteRetcodeAppResult.cc src/model/DeleteTraceAppRequest.cc src/model/DeleteTraceAppResult.cc + src/model/DescribeDispatchRuleRequest.cc + src/model/DescribeDispatchRuleResult.cc src/model/DescribeTraceLicenseKeyRequest.cc src/model/DescribeTraceLicenseKeyResult.cc src/model/DescribeTraceLocationRequest.cc src/model/DescribeTraceLocationResult.cc + src/model/ExportPrometheusRulesRequest.cc + src/model/ExportPrometheusRulesResult.cc src/model/GetAppApiByPageRequest.cc src/model/GetAppApiByPageResult.cc src/model/GetConsistencySnapshotRequest.cc src/model/GetConsistencySnapshotResult.cc + src/model/GetIntegrationTokenRequest.cc + src/model/GetIntegrationTokenResult.cc src/model/GetMultipleTraceRequest.cc src/model/GetMultipleTraceResult.cc src/model/GetPrometheusApiTokenRequest.cc @@ -180,6 +198,8 @@ set(arms_src src/model/ImportAppAlertRulesResult.cc src/model/ImportCustomAlertRulesRequest.cc src/model/ImportCustomAlertRulesResult.cc + src/model/ImportPrometheusRulesRequest.cc + src/model/ImportPrometheusRulesResult.cc src/model/ListClusterFromGrafanaRequest.cc src/model/ListClusterFromGrafanaResult.cc src/model/ListDashboardsRequest.cc @@ -218,6 +238,10 @@ set(arms_src src/model/SearchTracesResult.cc src/model/SearchTracesByPageRequest.cc src/model/SearchTracesByPageResult.cc + src/model/SendCustomIncidentsRequest.cc + src/model/SendCustomIncidentsResult.cc + src/model/SendMseIncidentRequest.cc + src/model/SendMseIncidentResult.cc src/model/SetRetcodeShareStatusRequest.cc src/model/SetRetcodeShareStatusResult.cc src/model/StartAlertRequest.cc diff --git a/arms/include/alibabacloud/arms/ARMSClient.h b/arms/include/alibabacloud/arms/ARMSClient.h index 5cb4c87f6..0f4cd141a 100644 --- a/arms/include/alibabacloud/arms/ARMSClient.h +++ b/arms/include/alibabacloud/arms/ARMSClient.h @@ -50,14 +50,20 @@ #include "model/DeleteRetcodeAppResult.h" #include "model/DeleteTraceAppRequest.h" #include "model/DeleteTraceAppResult.h" +#include "model/DescribeDispatchRuleRequest.h" +#include "model/DescribeDispatchRuleResult.h" #include "model/DescribeTraceLicenseKeyRequest.h" #include "model/DescribeTraceLicenseKeyResult.h" #include "model/DescribeTraceLocationRequest.h" #include "model/DescribeTraceLocationResult.h" +#include "model/ExportPrometheusRulesRequest.h" +#include "model/ExportPrometheusRulesResult.h" #include "model/GetAppApiByPageRequest.h" #include "model/GetAppApiByPageResult.h" #include "model/GetConsistencySnapshotRequest.h" #include "model/GetConsistencySnapshotResult.h" +#include "model/GetIntegrationTokenRequest.h" +#include "model/GetIntegrationTokenResult.h" #include "model/GetMultipleTraceRequest.h" #include "model/GetMultipleTraceResult.h" #include "model/GetPrometheusApiTokenRequest.h" @@ -74,6 +80,8 @@ #include "model/ImportAppAlertRulesResult.h" #include "model/ImportCustomAlertRulesRequest.h" #include "model/ImportCustomAlertRulesResult.h" +#include "model/ImportPrometheusRulesRequest.h" +#include "model/ImportPrometheusRulesResult.h" #include "model/ListClusterFromGrafanaRequest.h" #include "model/ListClusterFromGrafanaResult.h" #include "model/ListDashboardsRequest.h" @@ -112,6 +120,10 @@ #include "model/SearchTracesResult.h" #include "model/SearchTracesByPageRequest.h" #include "model/SearchTracesByPageResult.h" +#include "model/SendCustomIncidentsRequest.h" +#include "model/SendCustomIncidentsResult.h" +#include "model/SendMseIncidentRequest.h" +#include "model/SendMseIncidentResult.h" #include "model/SetRetcodeShareStatusRequest.h" #include "model/SetRetcodeShareStatusResult.h" #include "model/StartAlertRequest.h" @@ -177,18 +189,27 @@ namespace AlibabaCloud typedef Outcome DeleteTraceAppOutcome; typedef std::future DeleteTraceAppOutcomeCallable; typedef std::function&)> DeleteTraceAppAsyncHandler; + typedef Outcome DescribeDispatchRuleOutcome; + typedef std::future DescribeDispatchRuleOutcomeCallable; + typedef std::function&)> DescribeDispatchRuleAsyncHandler; typedef Outcome DescribeTraceLicenseKeyOutcome; typedef std::future DescribeTraceLicenseKeyOutcomeCallable; typedef std::function&)> DescribeTraceLicenseKeyAsyncHandler; typedef Outcome DescribeTraceLocationOutcome; typedef std::future DescribeTraceLocationOutcomeCallable; typedef std::function&)> DescribeTraceLocationAsyncHandler; + typedef Outcome ExportPrometheusRulesOutcome; + typedef std::future ExportPrometheusRulesOutcomeCallable; + typedef std::function&)> ExportPrometheusRulesAsyncHandler; typedef Outcome GetAppApiByPageOutcome; typedef std::future GetAppApiByPageOutcomeCallable; typedef std::function&)> GetAppApiByPageAsyncHandler; typedef Outcome GetConsistencySnapshotOutcome; typedef std::future GetConsistencySnapshotOutcomeCallable; typedef std::function&)> GetConsistencySnapshotAsyncHandler; + typedef Outcome GetIntegrationTokenOutcome; + typedef std::future GetIntegrationTokenOutcomeCallable; + typedef std::function&)> GetIntegrationTokenAsyncHandler; typedef Outcome GetMultipleTraceOutcome; typedef std::future GetMultipleTraceOutcomeCallable; typedef std::function&)> GetMultipleTraceAsyncHandler; @@ -213,6 +234,9 @@ namespace AlibabaCloud typedef Outcome ImportCustomAlertRulesOutcome; typedef std::future ImportCustomAlertRulesOutcomeCallable; typedef std::function&)> ImportCustomAlertRulesAsyncHandler; + typedef Outcome ImportPrometheusRulesOutcome; + typedef std::future ImportPrometheusRulesOutcomeCallable; + typedef std::function&)> ImportPrometheusRulesAsyncHandler; typedef Outcome ListClusterFromGrafanaOutcome; typedef std::future ListClusterFromGrafanaOutcomeCallable; typedef std::function&)> ListClusterFromGrafanaAsyncHandler; @@ -270,6 +294,12 @@ namespace AlibabaCloud typedef Outcome SearchTracesByPageOutcome; typedef std::future SearchTracesByPageOutcomeCallable; typedef std::function&)> SearchTracesByPageAsyncHandler; + typedef Outcome SendCustomIncidentsOutcome; + typedef std::future SendCustomIncidentsOutcomeCallable; + typedef std::function&)> SendCustomIncidentsAsyncHandler; + typedef Outcome SendMseIncidentOutcome; + typedef std::future SendMseIncidentOutcomeCallable; + typedef std::function&)> SendMseIncidentAsyncHandler; typedef Outcome SetRetcodeShareStatusOutcome; typedef std::future SetRetcodeShareStatusOutcomeCallable; typedef std::function&)> SetRetcodeShareStatusAsyncHandler; @@ -338,18 +368,27 @@ namespace AlibabaCloud DeleteTraceAppOutcome deleteTraceApp(const Model::DeleteTraceAppRequest &request)const; void deleteTraceAppAsync(const Model::DeleteTraceAppRequest& request, const DeleteTraceAppAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteTraceAppOutcomeCallable deleteTraceAppCallable(const Model::DeleteTraceAppRequest& request) const; + DescribeDispatchRuleOutcome describeDispatchRule(const Model::DescribeDispatchRuleRequest &request)const; + void describeDispatchRuleAsync(const Model::DescribeDispatchRuleRequest& request, const DescribeDispatchRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDispatchRuleOutcomeCallable describeDispatchRuleCallable(const Model::DescribeDispatchRuleRequest& request) const; DescribeTraceLicenseKeyOutcome describeTraceLicenseKey(const Model::DescribeTraceLicenseKeyRequest &request)const; void describeTraceLicenseKeyAsync(const Model::DescribeTraceLicenseKeyRequest& request, const DescribeTraceLicenseKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeTraceLicenseKeyOutcomeCallable describeTraceLicenseKeyCallable(const Model::DescribeTraceLicenseKeyRequest& request) const; DescribeTraceLocationOutcome describeTraceLocation(const Model::DescribeTraceLocationRequest &request)const; void describeTraceLocationAsync(const Model::DescribeTraceLocationRequest& request, const DescribeTraceLocationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeTraceLocationOutcomeCallable describeTraceLocationCallable(const Model::DescribeTraceLocationRequest& request) const; + ExportPrometheusRulesOutcome exportPrometheusRules(const Model::ExportPrometheusRulesRequest &request)const; + void exportPrometheusRulesAsync(const Model::ExportPrometheusRulesRequest& request, const ExportPrometheusRulesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ExportPrometheusRulesOutcomeCallable exportPrometheusRulesCallable(const Model::ExportPrometheusRulesRequest& request) const; GetAppApiByPageOutcome getAppApiByPage(const Model::GetAppApiByPageRequest &request)const; void getAppApiByPageAsync(const Model::GetAppApiByPageRequest& request, const GetAppApiByPageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetAppApiByPageOutcomeCallable getAppApiByPageCallable(const Model::GetAppApiByPageRequest& request) const; GetConsistencySnapshotOutcome getConsistencySnapshot(const Model::GetConsistencySnapshotRequest &request)const; void getConsistencySnapshotAsync(const Model::GetConsistencySnapshotRequest& request, const GetConsistencySnapshotAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetConsistencySnapshotOutcomeCallable getConsistencySnapshotCallable(const Model::GetConsistencySnapshotRequest& request) const; + GetIntegrationTokenOutcome getIntegrationToken(const Model::GetIntegrationTokenRequest &request)const; + void getIntegrationTokenAsync(const Model::GetIntegrationTokenRequest& request, const GetIntegrationTokenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetIntegrationTokenOutcomeCallable getIntegrationTokenCallable(const Model::GetIntegrationTokenRequest& request) const; GetMultipleTraceOutcome getMultipleTrace(const Model::GetMultipleTraceRequest &request)const; void getMultipleTraceAsync(const Model::GetMultipleTraceRequest& request, const GetMultipleTraceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetMultipleTraceOutcomeCallable getMultipleTraceCallable(const Model::GetMultipleTraceRequest& request) const; @@ -374,6 +413,9 @@ namespace AlibabaCloud ImportCustomAlertRulesOutcome importCustomAlertRules(const Model::ImportCustomAlertRulesRequest &request)const; void importCustomAlertRulesAsync(const Model::ImportCustomAlertRulesRequest& request, const ImportCustomAlertRulesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ImportCustomAlertRulesOutcomeCallable importCustomAlertRulesCallable(const Model::ImportCustomAlertRulesRequest& request) const; + ImportPrometheusRulesOutcome importPrometheusRules(const Model::ImportPrometheusRulesRequest &request)const; + void importPrometheusRulesAsync(const Model::ImportPrometheusRulesRequest& request, const ImportPrometheusRulesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ImportPrometheusRulesOutcomeCallable importPrometheusRulesCallable(const Model::ImportPrometheusRulesRequest& request) const; ListClusterFromGrafanaOutcome listClusterFromGrafana(const Model::ListClusterFromGrafanaRequest &request)const; void listClusterFromGrafanaAsync(const Model::ListClusterFromGrafanaRequest& request, const ListClusterFromGrafanaAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListClusterFromGrafanaOutcomeCallable listClusterFromGrafanaCallable(const Model::ListClusterFromGrafanaRequest& request) const; @@ -431,6 +473,12 @@ namespace AlibabaCloud SearchTracesByPageOutcome searchTracesByPage(const Model::SearchTracesByPageRequest &request)const; void searchTracesByPageAsync(const Model::SearchTracesByPageRequest& request, const SearchTracesByPageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SearchTracesByPageOutcomeCallable searchTracesByPageCallable(const Model::SearchTracesByPageRequest& request) const; + SendCustomIncidentsOutcome sendCustomIncidents(const Model::SendCustomIncidentsRequest &request)const; + void sendCustomIncidentsAsync(const Model::SendCustomIncidentsRequest& request, const SendCustomIncidentsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SendCustomIncidentsOutcomeCallable sendCustomIncidentsCallable(const Model::SendCustomIncidentsRequest& request) const; + SendMseIncidentOutcome sendMseIncident(const Model::SendMseIncidentRequest &request)const; + void sendMseIncidentAsync(const Model::SendMseIncidentRequest& request, const SendMseIncidentAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SendMseIncidentOutcomeCallable sendMseIncidentCallable(const Model::SendMseIncidentRequest& request) const; SetRetcodeShareStatusOutcome setRetcodeShareStatus(const Model::SetRetcodeShareStatusRequest &request)const; void setRetcodeShareStatusAsync(const Model::SetRetcodeShareStatusRequest& request, const SetRetcodeShareStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SetRetcodeShareStatusOutcomeCallable setRetcodeShareStatusCallable(const Model::SetRetcodeShareStatusRequest& request) const; diff --git a/arms/include/alibabacloud/arms/model/CreateWehookRequest.h b/arms/include/alibabacloud/arms/model/CreateWehookRequest.h index 8bdac369a..c402195a3 100644 --- a/arms/include/alibabacloud/arms/model/CreateWehookRequest.h +++ b/arms/include/alibabacloud/arms/model/CreateWehookRequest.h @@ -35,12 +35,12 @@ namespace AlibabaCloud CreateWehookRequest(); ~CreateWehookRequest(); - std::string getHeaders()const; - void setHeaders(const std::string& headers); + std::string getHttpHeaders()const; + void setHttpHeaders(const std::string& httpHeaders); std::string getMethod()const; void setMethod(const std::string& method); - std::string getParams()const; - void setParams(const std::string& params); + std::string getHttpParams()const; + void setHttpParams(const std::string& httpParams); std::string getProxyUserId()const; void setProxyUserId(const std::string& proxyUserId); std::string getBody()const; @@ -53,9 +53,9 @@ namespace AlibabaCloud void setRegionId(const std::string& regionId); private: - std::string headers_; + std::string httpHeaders_; std::string method_; - std::string params_; + std::string httpParams_; std::string proxyUserId_; std::string body_; std::string url_; diff --git a/arms/include/alibabacloud/arms/model/DescribeDispatchRuleRequest.h b/arms/include/alibabacloud/arms/model/DescribeDispatchRuleRequest.h new file mode 100644 index 000000000..a8fccfd21 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeDispatchRuleRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULEREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT DescribeDispatchRuleRequest : public RpcServiceRequest + { + + public: + DescribeDispatchRuleRequest(); + ~DescribeDispatchRuleRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getId()const; + void setId(const std::string& id); + std::string getProxyUserId()const; + void setProxyUserId(const std::string& proxyUserId); + + private: + std::string regionId_; + std::string id_; + std::string proxyUserId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULEREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/DescribeDispatchRuleResult.h b/arms/include/alibabacloud/arms/model/DescribeDispatchRuleResult.h new file mode 100644 index 000000000..889702023 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/DescribeDispatchRuleResult.h @@ -0,0 +1,92 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULERESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT DescribeDispatchRuleResult : public ServiceResult + { + public: + struct DispatchRule + { + struct LabelMatchExpressionGrid + { + struct LabelMatchExpressionGroup + { + struct LabelMatchExpression + { + std::string value; + std::string _operator; + std::string key; + }; + std::vector labelMatchExpressions; + }; + std::vector labelMatchExpressionGroups; + }; + struct GroupRule + { + long groupInterval; + std::vector groupingFields; + long groupWaitTime; + long groupId; + }; + struct NotifyRule + { + struct NotifyObject + { + std::string notifyType; + std::string notifyObjectId; + std::string name; + }; + std::vector notifyChannels; + std::vector notifyObjects; + }; + std::vector groupRules; + std::string state; + long ruleId; + LabelMatchExpressionGrid labelMatchExpressionGrid; + std::vector notifyRules; + std::string name; + }; + + + DescribeDispatchRuleResult(); + explicit DescribeDispatchRuleResult(const std::string &payload); + ~DescribeDispatchRuleResult(); + DispatchRule getDispatchRule()const; + + protected: + void parse(const std::string &payload); + private: + DispatchRule dispatchRule_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_DESCRIBEDISPATCHRULERESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/ExportPrometheusRulesRequest.h b/arms/include/alibabacloud/arms/model/ExportPrometheusRulesRequest.h new file mode 100644 index 000000000..b2aca0607 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/ExportPrometheusRulesRequest.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_ARMS_MODEL_EXPORTPROMETHEUSRULESREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_EXPORTPROMETHEUSRULESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT ExportPrometheusRulesRequest : public RpcServiceRequest + { + + public: + ExportPrometheusRulesRequest(); + ~ExportPrometheusRulesRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + std::string getName()const; + void setName(const std::string& name); + std::string getClusterId()const; + void setClusterId(const std::string& clusterId); + + private: + std::string regionId_; + std::string _nameSpace_; + std::string name_; + std::string clusterId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_EXPORTPROMETHEUSRULESREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/ExportPrometheusRulesResult.h b/arms/include/alibabacloud/arms/model/ExportPrometheusRulesResult.h new file mode 100644 index 000000000..e13db53c1 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/ExportPrometheusRulesResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_EXPORTPROMETHEUSRULESRESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_EXPORTPROMETHEUSRULESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT ExportPrometheusRulesResult : public ServiceResult + { + public: + + + ExportPrometheusRulesResult(); + explicit ExportPrometheusRulesResult(const std::string &payload); + ~ExportPrometheusRulesResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_EXPORTPROMETHEUSRULESRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetIntegrationTokenRequest.h b/arms/include/alibabacloud/arms/model/GetIntegrationTokenRequest.h new file mode 100644 index 000000000..20cb50869 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetIntegrationTokenRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT GetIntegrationTokenRequest : public RpcServiceRequest + { + + public: + GetIntegrationTokenRequest(); + ~GetIntegrationTokenRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getProxyUserId()const; + void setProxyUserId(const std::string& proxyUserId); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + std::string regionId_; + std::string proxyUserId_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/GetIntegrationTokenResult.h b/arms/include/alibabacloud/arms/model/GetIntegrationTokenResult.h new file mode 100644 index 000000000..13e375e10 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/GetIntegrationTokenResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENRESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT GetIntegrationTokenResult : public ServiceResult + { + public: + + + GetIntegrationTokenResult(); + explicit GetIntegrationTokenResult(const std::string &payload); + ~GetIntegrationTokenResult(); + std::string getToken()const; + + protected: + void parse(const std::string &payload); + private: + std::string token_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_GETINTEGRATIONTOKENRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/ImportPrometheusRulesRequest.h b/arms/include/alibabacloud/arms/model/ImportPrometheusRulesRequest.h new file mode 100644 index 000000000..3f6e0a2bd --- /dev/null +++ b/arms/include/alibabacloud/arms/model/ImportPrometheusRulesRequest.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_ARMS_MODEL_IMPORTPROMETHEUSRULESREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_IMPORTPROMETHEUSRULESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT ImportPrometheusRulesRequest : public RpcServiceRequest + { + + public: + ImportPrometheusRulesRequest(); + ~ImportPrometheusRulesRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + std::string getName()const; + void setName(const std::string& name); + std::string getClusterId()const; + void setClusterId(const std::string& clusterId); + std::string getContent()const; + void setContent(const std::string& content); + + private: + std::string regionId_; + std::string _nameSpace_; + std::string name_; + std::string clusterId_; + std::string content_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_IMPORTPROMETHEUSRULESREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/ImportPrometheusRulesResult.h b/arms/include/alibabacloud/arms/model/ImportPrometheusRulesResult.h new file mode 100644 index 000000000..daec7f52e --- /dev/null +++ b/arms/include/alibabacloud/arms/model/ImportPrometheusRulesResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_IMPORTPROMETHEUSRULESRESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_IMPORTPROMETHEUSRULESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT ImportPrometheusRulesResult : public ServiceResult + { + public: + + + ImportPrometheusRulesResult(); + explicit ImportPrometheusRulesResult(const std::string &payload); + ~ImportPrometheusRulesResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_IMPORTPROMETHEUSRULESRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SendCustomIncidentsRequest.h b/arms/include/alibabacloud/arms/model/SendCustomIncidentsRequest.h new file mode 100644 index 000000000..a3d6a4dc1 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SendCustomIncidentsRequest.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_ARMS_MODEL_SENDCUSTOMINCIDENTSREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_SENDCUSTOMINCIDENTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT SendCustomIncidentsRequest : public RpcServiceRequest + { + + public: + SendCustomIncidentsRequest(); + ~SendCustomIncidentsRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getIncidents()const; + void setIncidents(const std::string& incidents); + std::string getProxyUserId()const; + void setProxyUserId(const std::string& proxyUserId); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + std::string regionId_; + std::string incidents_; + std::string proxyUserId_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_SENDCUSTOMINCIDENTSREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SendCustomIncidentsResult.h b/arms/include/alibabacloud/arms/model/SendCustomIncidentsResult.h new file mode 100644 index 000000000..248a0a5dd --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SendCustomIncidentsResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_SENDCUSTOMINCIDENTSRESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_SENDCUSTOMINCIDENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT SendCustomIncidentsResult : public ServiceResult + { + public: + + + SendCustomIncidentsResult(); + explicit SendCustomIncidentsResult(const std::string &payload); + ~SendCustomIncidentsResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_SENDCUSTOMINCIDENTSRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SendMseIncidentRequest.h b/arms/include/alibabacloud/arms/model/SendMseIncidentRequest.h new file mode 100644 index 000000000..fe60a018b --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SendMseIncidentRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTREQUEST_H_ +#define ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT SendMseIncidentRequest : public RpcServiceRequest + { + + public: + SendMseIncidentRequest(); + ~SendMseIncidentRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getIncidents()const; + void setIncidents(const std::string& incidents); + std::string getProxyUserId()const; + void setProxyUserId(const std::string& proxyUserId); + + private: + std::string regionId_; + std::string incidents_; + std::string proxyUserId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTREQUEST_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/SendMseIncidentResult.h b/arms/include/alibabacloud/arms/model/SendMseIncidentResult.h new file mode 100644 index 000000000..490d15c66 --- /dev/null +++ b/arms/include/alibabacloud/arms/model/SendMseIncidentResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTRESULT_H_ +#define ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS + { + namespace Model + { + class ALIBABACLOUD_ARMS_EXPORT SendMseIncidentResult : public ServiceResult + { + public: + + + SendMseIncidentResult(); + explicit SendMseIncidentResult(const std::string &payload); + ~SendMseIncidentResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS_MODEL_SENDMSEINCIDENTRESULT_H_ \ No newline at end of file diff --git a/arms/include/alibabacloud/arms/model/UpdateWebhookRequest.h b/arms/include/alibabacloud/arms/model/UpdateWebhookRequest.h index 8ba512393..63a052314 100644 --- a/arms/include/alibabacloud/arms/model/UpdateWebhookRequest.h +++ b/arms/include/alibabacloud/arms/model/UpdateWebhookRequest.h @@ -35,14 +35,14 @@ namespace AlibabaCloud UpdateWebhookRequest(); ~UpdateWebhookRequest(); - std::string getHeaders()const; - void setHeaders(const std::string& headers); + std::string getHttpHeaders()const; + void setHttpHeaders(const std::string& httpHeaders); std::string getMethod()const; void setMethod(const std::string& method); long getContactId()const; void setContactId(long contactId); - std::string getParams()const; - void setParams(const std::string& params); + std::string getHttpParams()const; + void setHttpParams(const std::string& httpParams); std::string getProxyUserId()const; void setProxyUserId(const std::string& proxyUserId); std::string getBody()const; @@ -55,10 +55,10 @@ namespace AlibabaCloud void setRegionId(const std::string& regionId); private: - std::string headers_; + std::string httpHeaders_; std::string method_; long contactId_; - std::string params_; + std::string httpParams_; std::string proxyUserId_; std::string body_; std::string url_; diff --git a/arms/src/ARMSClient.cc b/arms/src/ARMSClient.cc index 29c6502b3..79a388e5a 100644 --- a/arms/src/ARMSClient.cc +++ b/arms/src/ARMSClient.cc @@ -555,6 +555,42 @@ ARMSClient::DeleteTraceAppOutcomeCallable ARMSClient::deleteTraceAppCallable(con return task->get_future(); } +ARMSClient::DescribeDispatchRuleOutcome ARMSClient::describeDispatchRule(const DescribeDispatchRuleRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDispatchRuleOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDispatchRuleOutcome(DescribeDispatchRuleResult(outcome.result())); + else + return DescribeDispatchRuleOutcome(outcome.error()); +} + +void ARMSClient::describeDispatchRuleAsync(const DescribeDispatchRuleRequest& request, const DescribeDispatchRuleAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDispatchRule(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::DescribeDispatchRuleOutcomeCallable ARMSClient::describeDispatchRuleCallable(const DescribeDispatchRuleRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDispatchRule(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ARMSClient::DescribeTraceLicenseKeyOutcome ARMSClient::describeTraceLicenseKey(const DescribeTraceLicenseKeyRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -627,6 +663,42 @@ ARMSClient::DescribeTraceLocationOutcomeCallable ARMSClient::describeTraceLocati return task->get_future(); } +ARMSClient::ExportPrometheusRulesOutcome ARMSClient::exportPrometheusRules(const ExportPrometheusRulesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ExportPrometheusRulesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ExportPrometheusRulesOutcome(ExportPrometheusRulesResult(outcome.result())); + else + return ExportPrometheusRulesOutcome(outcome.error()); +} + +void ARMSClient::exportPrometheusRulesAsync(const ExportPrometheusRulesRequest& request, const ExportPrometheusRulesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, exportPrometheusRules(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::ExportPrometheusRulesOutcomeCallable ARMSClient::exportPrometheusRulesCallable(const ExportPrometheusRulesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->exportPrometheusRules(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ARMSClient::GetAppApiByPageOutcome ARMSClient::getAppApiByPage(const GetAppApiByPageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -699,6 +771,42 @@ ARMSClient::GetConsistencySnapshotOutcomeCallable ARMSClient::getConsistencySnap return task->get_future(); } +ARMSClient::GetIntegrationTokenOutcome ARMSClient::getIntegrationToken(const GetIntegrationTokenRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetIntegrationTokenOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetIntegrationTokenOutcome(GetIntegrationTokenResult(outcome.result())); + else + return GetIntegrationTokenOutcome(outcome.error()); +} + +void ARMSClient::getIntegrationTokenAsync(const GetIntegrationTokenRequest& request, const GetIntegrationTokenAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getIntegrationToken(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::GetIntegrationTokenOutcomeCallable ARMSClient::getIntegrationTokenCallable(const GetIntegrationTokenRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getIntegrationToken(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ARMSClient::GetMultipleTraceOutcome ARMSClient::getMultipleTrace(const GetMultipleTraceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -987,6 +1095,42 @@ ARMSClient::ImportCustomAlertRulesOutcomeCallable ARMSClient::importCustomAlertR return task->get_future(); } +ARMSClient::ImportPrometheusRulesOutcome ARMSClient::importPrometheusRules(const ImportPrometheusRulesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ImportPrometheusRulesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ImportPrometheusRulesOutcome(ImportPrometheusRulesResult(outcome.result())); + else + return ImportPrometheusRulesOutcome(outcome.error()); +} + +void ARMSClient::importPrometheusRulesAsync(const ImportPrometheusRulesRequest& request, const ImportPrometheusRulesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, importPrometheusRules(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::ImportPrometheusRulesOutcomeCallable ARMSClient::importPrometheusRulesCallable(const ImportPrometheusRulesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->importPrometheusRules(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ARMSClient::ListClusterFromGrafanaOutcome ARMSClient::listClusterFromGrafana(const ListClusterFromGrafanaRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1671,6 +1815,78 @@ ARMSClient::SearchTracesByPageOutcomeCallable ARMSClient::searchTracesByPageCall return task->get_future(); } +ARMSClient::SendCustomIncidentsOutcome ARMSClient::sendCustomIncidents(const SendCustomIncidentsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SendCustomIncidentsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SendCustomIncidentsOutcome(SendCustomIncidentsResult(outcome.result())); + else + return SendCustomIncidentsOutcome(outcome.error()); +} + +void ARMSClient::sendCustomIncidentsAsync(const SendCustomIncidentsRequest& request, const SendCustomIncidentsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, sendCustomIncidents(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::SendCustomIncidentsOutcomeCallable ARMSClient::sendCustomIncidentsCallable(const SendCustomIncidentsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->sendCustomIncidents(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ARMSClient::SendMseIncidentOutcome ARMSClient::sendMseIncident(const SendMseIncidentRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SendMseIncidentOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SendMseIncidentOutcome(SendMseIncidentResult(outcome.result())); + else + return SendMseIncidentOutcome(outcome.error()); +} + +void ARMSClient::sendMseIncidentAsync(const SendMseIncidentRequest& request, const SendMseIncidentAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, sendMseIncident(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMSClient::SendMseIncidentOutcomeCallable ARMSClient::sendMseIncidentCallable(const SendMseIncidentRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->sendMseIncident(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ARMSClient::SetRetcodeShareStatusOutcome ARMSClient::setRetcodeShareStatus(const SetRetcodeShareStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/arms/src/model/CreateWehookRequest.cc b/arms/src/model/CreateWehookRequest.cc index b0e4b9f4c..537109a08 100644 --- a/arms/src/model/CreateWehookRequest.cc +++ b/arms/src/model/CreateWehookRequest.cc @@ -27,15 +27,15 @@ CreateWehookRequest::CreateWehookRequest() : CreateWehookRequest::~CreateWehookRequest() {} -std::string CreateWehookRequest::getHeaders()const +std::string CreateWehookRequest::getHttpHeaders()const { - return headers_; + return httpHeaders_; } -void CreateWehookRequest::setHeaders(const std::string& headers) +void CreateWehookRequest::setHttpHeaders(const std::string& httpHeaders) { - headers_ = headers; - setParameter("Headers", headers); + httpHeaders_ = httpHeaders; + setParameter("HttpHeaders", httpHeaders); } std::string CreateWehookRequest::getMethod()const @@ -49,15 +49,15 @@ void CreateWehookRequest::setMethod(const std::string& method) setParameter("Method", method); } -std::string CreateWehookRequest::getParams()const +std::string CreateWehookRequest::getHttpParams()const { - return params_; + return httpParams_; } -void CreateWehookRequest::setParams(const std::string& params) +void CreateWehookRequest::setHttpParams(const std::string& httpParams) { - params_ = params; - setParameter("Params", params); + httpParams_ = httpParams; + setParameter("HttpParams", httpParams); } std::string CreateWehookRequest::getProxyUserId()const diff --git a/arms/src/model/DescribeDispatchRuleRequest.cc b/arms/src/model/DescribeDispatchRuleRequest.cc new file mode 100644 index 000000000..5fffc0210 --- /dev/null +++ b/arms/src/model/DescribeDispatchRuleRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ARMS::Model::DescribeDispatchRuleRequest; + +DescribeDispatchRuleRequest::DescribeDispatchRuleRequest() : + RpcServiceRequest("arms", "2019-08-08", "DescribeDispatchRule") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeDispatchRuleRequest::~DescribeDispatchRuleRequest() +{} + +std::string DescribeDispatchRuleRequest::getRegionId()const +{ + return regionId_; +} + +void DescribeDispatchRuleRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string DescribeDispatchRuleRequest::getId()const +{ + return id_; +} + +void DescribeDispatchRuleRequest::setId(const std::string& id) +{ + id_ = id; + setParameter("Id", id); +} + +std::string DescribeDispatchRuleRequest::getProxyUserId()const +{ + return proxyUserId_; +} + +void DescribeDispatchRuleRequest::setProxyUserId(const std::string& proxyUserId) +{ + proxyUserId_ = proxyUserId; + setParameter("ProxyUserId", proxyUserId); +} + diff --git a/arms/src/model/DescribeDispatchRuleResult.cc b/arms/src/model/DescribeDispatchRuleResult.cc new file mode 100644 index 000000000..dacab658e --- /dev/null +++ b/arms/src/model/DescribeDispatchRuleResult.cc @@ -0,0 +1,111 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +DescribeDispatchRuleResult::DescribeDispatchRuleResult() : + ServiceResult() +{} + +DescribeDispatchRuleResult::DescribeDispatchRuleResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDispatchRuleResult::~DescribeDispatchRuleResult() +{} + +void DescribeDispatchRuleResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dispatchRuleNode = value["DispatchRule"]; + if(!dispatchRuleNode["RuleId"].isNull()) + dispatchRule_.ruleId = std::stol(dispatchRuleNode["RuleId"].asString()); + if(!dispatchRuleNode["Name"].isNull()) + dispatchRule_.name = dispatchRuleNode["Name"].asString(); + if(!dispatchRuleNode["State"].isNull()) + dispatchRule_.state = dispatchRuleNode["State"].asString(); + auto allGroupRulesNode = dispatchRuleNode["GroupRules"]["GroupRule"]; + for (auto dispatchRuleNodeGroupRulesGroupRule : allGroupRulesNode) + { + DispatchRule::GroupRule groupRuleObject; + if(!dispatchRuleNodeGroupRulesGroupRule["GroupId"].isNull()) + groupRuleObject.groupId = std::stol(dispatchRuleNodeGroupRulesGroupRule["GroupId"].asString()); + if(!dispatchRuleNodeGroupRulesGroupRule["GroupWaitTime"].isNull()) + groupRuleObject.groupWaitTime = std::stol(dispatchRuleNodeGroupRulesGroupRule["GroupWaitTime"].asString()); + if(!dispatchRuleNodeGroupRulesGroupRule["GroupInterval"].isNull()) + groupRuleObject.groupInterval = std::stol(dispatchRuleNodeGroupRulesGroupRule["GroupInterval"].asString()); + auto allGroupingFields = value["GroupingFields"]["GroupingField"]; + for (auto value : allGroupingFields) + groupRuleObject.groupingFields.push_back(value.asString()); + dispatchRule_.groupRules.push_back(groupRuleObject); + } + auto allNotifyRulesNode = dispatchRuleNode["NotifyRules"]["NotifyRule"]; + for (auto dispatchRuleNodeNotifyRulesNotifyRule : allNotifyRulesNode) + { + DispatchRule::NotifyRule notifyRuleObject; + auto allNotifyObjectsNode = dispatchRuleNodeNotifyRulesNotifyRule["NotifyObjects"]["NotifyObject"]; + for (auto dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject : allNotifyObjectsNode) + { + DispatchRule::NotifyRule::NotifyObject notifyObjectsObject; + if(!dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["NotifyType"].isNull()) + notifyObjectsObject.notifyType = dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["NotifyType"].asString(); + if(!dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["Name"].isNull()) + notifyObjectsObject.name = dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["Name"].asString(); + if(!dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["NotifyObjectId"].isNull()) + notifyObjectsObject.notifyObjectId = dispatchRuleNodeNotifyRulesNotifyRuleNotifyObjectsNotifyObject["NotifyObjectId"].asString(); + notifyRuleObject.notifyObjects.push_back(notifyObjectsObject); + } + auto allNotifyChannels = value["NotifyChannels"]["NotifyChannel"]; + for (auto value : allNotifyChannels) + notifyRuleObject.notifyChannels.push_back(value.asString()); + dispatchRule_.notifyRules.push_back(notifyRuleObject); + } + auto labelMatchExpressionGridNode = dispatchRuleNode["LabelMatchExpressionGrid"]; + auto allLabelMatchExpressionGroupsNode = labelMatchExpressionGridNode["LabelMatchExpressionGroups"]["LabelMatchExpressionGroup"]; + for (auto labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroup : allLabelMatchExpressionGroupsNode) + { + DispatchRule::LabelMatchExpressionGrid::LabelMatchExpressionGroup labelMatchExpressionGroupObject; + auto allLabelMatchExpressionsNode = labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroup["LabelMatchExpressions"]["LabelMatchExpression"]; + for (auto labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression : allLabelMatchExpressionsNode) + { + DispatchRule::LabelMatchExpressionGrid::LabelMatchExpressionGroup::LabelMatchExpression labelMatchExpressionsObject; + if(!labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Key"].isNull()) + labelMatchExpressionsObject.key = labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Key"].asString(); + if(!labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Value"].isNull()) + labelMatchExpressionsObject.value = labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Value"].asString(); + if(!labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Operator"].isNull()) + labelMatchExpressionsObject._operator = labelMatchExpressionGridNodeLabelMatchExpressionGroupsLabelMatchExpressionGroupLabelMatchExpressionsLabelMatchExpression["Operator"].asString(); + labelMatchExpressionGroupObject.labelMatchExpressions.push_back(labelMatchExpressionsObject); + } + dispatchRule_.labelMatchExpressionGrid.labelMatchExpressionGroups.push_back(labelMatchExpressionGroupObject); + } + +} + +DescribeDispatchRuleResult::DispatchRule DescribeDispatchRuleResult::getDispatchRule()const +{ + return dispatchRule_; +} + diff --git a/arms/src/model/ExportPrometheusRulesRequest.cc b/arms/src/model/ExportPrometheusRulesRequest.cc new file mode 100644 index 000000000..be2de037e --- /dev/null +++ b/arms/src/model/ExportPrometheusRulesRequest.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 + +using AlibabaCloud::ARMS::Model::ExportPrometheusRulesRequest; + +ExportPrometheusRulesRequest::ExportPrometheusRulesRequest() : + RpcServiceRequest("arms", "2019-08-08", "ExportPrometheusRules") +{ + setMethod(HttpRequest::Method::Post); +} + +ExportPrometheusRulesRequest::~ExportPrometheusRulesRequest() +{} + +std::string ExportPrometheusRulesRequest::getRegionId()const +{ + return regionId_; +} + +void ExportPrometheusRulesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ExportPrometheusRulesRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void ExportPrometheusRulesRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setParameter("_NameSpace", _nameSpace); +} + +std::string ExportPrometheusRulesRequest::getName()const +{ + return name_; +} + +void ExportPrometheusRulesRequest::setName(const std::string& name) +{ + name_ = name; + setParameter("Name", name); +} + +std::string ExportPrometheusRulesRequest::getClusterId()const +{ + return clusterId_; +} + +void ExportPrometheusRulesRequest::setClusterId(const std::string& clusterId) +{ + clusterId_ = clusterId; + setParameter("ClusterId", clusterId); +} + diff --git a/arms/src/model/ExportPrometheusRulesResult.cc b/arms/src/model/ExportPrometheusRulesResult.cc new file mode 100644 index 000000000..9410e47e6 --- /dev/null +++ b/arms/src/model/ExportPrometheusRulesResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +ExportPrometheusRulesResult::ExportPrometheusRulesResult() : + ServiceResult() +{} + +ExportPrometheusRulesResult::ExportPrometheusRulesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ExportPrometheusRulesResult::~ExportPrometheusRulesResult() +{} + +void ExportPrometheusRulesResult::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 ExportPrometheusRulesResult::getData()const +{ + return data_; +} + diff --git a/arms/src/model/GetIntegrationTokenRequest.cc b/arms/src/model/GetIntegrationTokenRequest.cc new file mode 100644 index 000000000..5f1c5d9ba --- /dev/null +++ b/arms/src/model/GetIntegrationTokenRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ARMS::Model::GetIntegrationTokenRequest; + +GetIntegrationTokenRequest::GetIntegrationTokenRequest() : + RpcServiceRequest("arms", "2019-08-08", "GetIntegrationToken") +{ + setMethod(HttpRequest::Method::Post); +} + +GetIntegrationTokenRequest::~GetIntegrationTokenRequest() +{} + +std::string GetIntegrationTokenRequest::getRegionId()const +{ + return regionId_; +} + +void GetIntegrationTokenRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string GetIntegrationTokenRequest::getProxyUserId()const +{ + return proxyUserId_; +} + +void GetIntegrationTokenRequest::setProxyUserId(const std::string& proxyUserId) +{ + proxyUserId_ = proxyUserId; + setParameter("ProxyUserId", proxyUserId); +} + +std::string GetIntegrationTokenRequest::getProductType()const +{ + return productType_; +} + +void GetIntegrationTokenRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setParameter("ProductType", productType); +} + diff --git a/arms/src/model/GetIntegrationTokenResult.cc b/arms/src/model/GetIntegrationTokenResult.cc new file mode 100644 index 000000000..dd9e69248 --- /dev/null +++ b/arms/src/model/GetIntegrationTokenResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +GetIntegrationTokenResult::GetIntegrationTokenResult() : + ServiceResult() +{} + +GetIntegrationTokenResult::GetIntegrationTokenResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetIntegrationTokenResult::~GetIntegrationTokenResult() +{} + +void GetIntegrationTokenResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Token"].isNull()) + token_ = value["Token"].asString(); + +} + +std::string GetIntegrationTokenResult::getToken()const +{ + return token_; +} + diff --git a/arms/src/model/GetMultipleTraceResult.cc b/arms/src/model/GetMultipleTraceResult.cc index 6a5c981c1..7ec17dff5 100644 --- a/arms/src/model/GetMultipleTraceResult.cc +++ b/arms/src/model/GetMultipleTraceResult.cc @@ -45,54 +45,54 @@ void GetMultipleTraceResult::parse(const std::string &payload) MultiCallChainInfo multiCallChainInfosObject; if(!valueMultiCallChainInfosMultiCallChainInfo["TraceID"].isNull()) multiCallChainInfosObject.traceID = valueMultiCallChainInfosMultiCallChainInfo["TraceID"].asString(); - auto allSpansNode = allMultiCallChainInfosNode["Spans"]["Span"]; - for (auto allMultiCallChainInfosNodeSpansSpan : allSpansNode) + auto allSpansNode = valueMultiCallChainInfosMultiCallChainInfo["Spans"]["Span"]; + for (auto valueMultiCallChainInfosMultiCallChainInfoSpansSpan : allSpansNode) { MultiCallChainInfo::Span spansObject; - if(!allMultiCallChainInfosNodeSpansSpan["TraceID"].isNull()) - spansObject.traceID = allMultiCallChainInfosNodeSpansSpan["TraceID"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["OperationName"].isNull()) - spansObject.operationName = allMultiCallChainInfosNodeSpansSpan["OperationName"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["Duration"].isNull()) - spansObject.duration = std::stol(allMultiCallChainInfosNodeSpansSpan["Duration"].asString()); - if(!allMultiCallChainInfosNodeSpansSpan["ServiceName"].isNull()) - spansObject.serviceName = allMultiCallChainInfosNodeSpansSpan["ServiceName"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["ServiceIp"].isNull()) - spansObject.serviceIp = allMultiCallChainInfosNodeSpansSpan["ServiceIp"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["Timestamp"].isNull()) - spansObject.timestamp = std::stol(allMultiCallChainInfosNodeSpansSpan["Timestamp"].asString()); - if(!allMultiCallChainInfosNodeSpansSpan["RpcId"].isNull()) - spansObject.rpcId = allMultiCallChainInfosNodeSpansSpan["RpcId"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["ResultCode"].isNull()) - spansObject.resultCode = allMultiCallChainInfosNodeSpansSpan["ResultCode"].asString(); - if(!allMultiCallChainInfosNodeSpansSpan["HaveStack"].isNull()) - spansObject.haveStack = allMultiCallChainInfosNodeSpansSpan["HaveStack"].asString() == "true"; - if(!allMultiCallChainInfosNodeSpansSpan["RpcType"].isNull()) - spansObject.rpcType = std::stoi(allMultiCallChainInfosNodeSpansSpan["RpcType"].asString()); - auto allTagEntryListNode = allSpansNode["TagEntryList"]["TagEntry"]; - for (auto allSpansNodeTagEntryListTagEntry : allTagEntryListNode) + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["TraceID"].isNull()) + spansObject.traceID = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["TraceID"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["OperationName"].isNull()) + spansObject.operationName = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["OperationName"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["Duration"].isNull()) + spansObject.duration = std::stol(valueMultiCallChainInfosMultiCallChainInfoSpansSpan["Duration"].asString()); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ServiceName"].isNull()) + spansObject.serviceName = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ServiceName"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ServiceIp"].isNull()) + spansObject.serviceIp = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ServiceIp"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["Timestamp"].isNull()) + spansObject.timestamp = std::stol(valueMultiCallChainInfosMultiCallChainInfoSpansSpan["Timestamp"].asString()); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["RpcId"].isNull()) + spansObject.rpcId = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["RpcId"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ResultCode"].isNull()) + spansObject.resultCode = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["ResultCode"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["HaveStack"].isNull()) + spansObject.haveStack = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["HaveStack"].asString() == "true"; + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpan["RpcType"].isNull()) + spansObject.rpcType = std::stoi(valueMultiCallChainInfosMultiCallChainInfoSpansSpan["RpcType"].asString()); + auto allTagEntryListNode = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["TagEntryList"]["TagEntry"]; + for (auto valueMultiCallChainInfosMultiCallChainInfoSpansSpanTagEntryListTagEntry : allTagEntryListNode) { MultiCallChainInfo::Span::TagEntry tagEntryListObject; - if(!allSpansNodeTagEntryListTagEntry["Key"].isNull()) - tagEntryListObject.key = allSpansNodeTagEntryListTagEntry["Key"].asString(); - if(!allSpansNodeTagEntryListTagEntry["Value"].isNull()) - tagEntryListObject.value = allSpansNodeTagEntryListTagEntry["Value"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpanTagEntryListTagEntry["Key"].isNull()) + tagEntryListObject.key = valueMultiCallChainInfosMultiCallChainInfoSpansSpanTagEntryListTagEntry["Key"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpanTagEntryListTagEntry["Value"].isNull()) + tagEntryListObject.value = valueMultiCallChainInfosMultiCallChainInfoSpansSpanTagEntryListTagEntry["Value"].asString(); spansObject.tagEntryList.push_back(tagEntryListObject); } - auto allLogEventListNode = allSpansNode["LogEventList"]["LogEvent"]; - for (auto allSpansNodeLogEventListLogEvent : allLogEventListNode) + auto allLogEventListNode = valueMultiCallChainInfosMultiCallChainInfoSpansSpan["LogEventList"]["LogEvent"]; + for (auto valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEvent : allLogEventListNode) { MultiCallChainInfo::Span::LogEvent logEventListObject; - if(!allSpansNodeLogEventListLogEvent["Timestamp"].isNull()) - logEventListObject.timestamp = std::stol(allSpansNodeLogEventListLogEvent["Timestamp"].asString()); - auto allTagEntryList1Node = allLogEventListNode["TagEntryList"]["TagEntry"]; - for (auto allLogEventListNodeTagEntryListTagEntry : allTagEntryList1Node) + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEvent["Timestamp"].isNull()) + logEventListObject.timestamp = std::stol(valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEvent["Timestamp"].asString()); + auto allTagEntryList1Node = valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEvent["TagEntryList"]["TagEntry"]; + for (auto valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEventTagEntryListTagEntry : allTagEntryList1Node) { MultiCallChainInfo::Span::LogEvent::TagEntry2 tagEntryList1Object; - if(!allLogEventListNodeTagEntryListTagEntry["Key"].isNull()) - tagEntryList1Object.key = allLogEventListNodeTagEntryListTagEntry["Key"].asString(); - if(!allLogEventListNodeTagEntryListTagEntry["Value"].isNull()) - tagEntryList1Object.value = allLogEventListNodeTagEntryListTagEntry["Value"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].isNull()) + tagEntryList1Object.key = valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].asString(); + if(!valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].isNull()) + tagEntryList1Object.value = valueMultiCallChainInfosMultiCallChainInfoSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].asString(); logEventListObject.tagEntryList1.push_back(tagEntryList1Object); } spansObject.logEventList.push_back(logEventListObject); diff --git a/arms/src/model/GetTraceResult.cc b/arms/src/model/GetTraceResult.cc index c29799895..757e9e715 100644 --- a/arms/src/model/GetTraceResult.cc +++ b/arms/src/model/GetTraceResult.cc @@ -63,30 +63,30 @@ void GetTraceResult::parse(const std::string &payload) spansObject.haveStack = valueSpansSpan["HaveStack"].asString() == "true"; if(!valueSpansSpan["RpcType"].isNull()) spansObject.rpcType = std::stoi(valueSpansSpan["RpcType"].asString()); - auto allTagEntryListNode = allSpansNode["TagEntryList"]["TagEntry"]; - for (auto allSpansNodeTagEntryListTagEntry : allTagEntryListNode) + auto allTagEntryListNode = valueSpansSpan["TagEntryList"]["TagEntry"]; + for (auto valueSpansSpanTagEntryListTagEntry : allTagEntryListNode) { Span::TagEntry tagEntryListObject; - if(!allSpansNodeTagEntryListTagEntry["Key"].isNull()) - tagEntryListObject.key = allSpansNodeTagEntryListTagEntry["Key"].asString(); - if(!allSpansNodeTagEntryListTagEntry["Value"].isNull()) - tagEntryListObject.value = allSpansNodeTagEntryListTagEntry["Value"].asString(); + if(!valueSpansSpanTagEntryListTagEntry["Key"].isNull()) + tagEntryListObject.key = valueSpansSpanTagEntryListTagEntry["Key"].asString(); + if(!valueSpansSpanTagEntryListTagEntry["Value"].isNull()) + tagEntryListObject.value = valueSpansSpanTagEntryListTagEntry["Value"].asString(); spansObject.tagEntryList.push_back(tagEntryListObject); } - auto allLogEventListNode = allSpansNode["LogEventList"]["LogEvent"]; - for (auto allSpansNodeLogEventListLogEvent : allLogEventListNode) + auto allLogEventListNode = valueSpansSpan["LogEventList"]["LogEvent"]; + for (auto valueSpansSpanLogEventListLogEvent : allLogEventListNode) { Span::LogEvent logEventListObject; - if(!allSpansNodeLogEventListLogEvent["Timestamp"].isNull()) - logEventListObject.timestamp = std::stol(allSpansNodeLogEventListLogEvent["Timestamp"].asString()); - auto allTagEntryList1Node = allLogEventListNode["TagEntryList"]["TagEntry"]; - for (auto allLogEventListNodeTagEntryListTagEntry : allTagEntryList1Node) + if(!valueSpansSpanLogEventListLogEvent["Timestamp"].isNull()) + logEventListObject.timestamp = std::stol(valueSpansSpanLogEventListLogEvent["Timestamp"].asString()); + auto allTagEntryList1Node = valueSpansSpanLogEventListLogEvent["TagEntryList"]["TagEntry"]; + for (auto valueSpansSpanLogEventListLogEventTagEntryListTagEntry : allTagEntryList1Node) { Span::LogEvent::TagEntry2 tagEntryList1Object; - if(!allLogEventListNodeTagEntryListTagEntry["Key"].isNull()) - tagEntryList1Object.key = allLogEventListNodeTagEntryListTagEntry["Key"].asString(); - if(!allLogEventListNodeTagEntryListTagEntry["Value"].isNull()) - tagEntryList1Object.value = allLogEventListNodeTagEntryListTagEntry["Value"].asString(); + if(!valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].isNull()) + tagEntryList1Object.key = valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].asString(); + if(!valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].isNull()) + tagEntryList1Object.value = valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].asString(); logEventListObject.tagEntryList1.push_back(tagEntryList1Object); } spansObject.logEventList.push_back(logEventListObject); diff --git a/arms/src/model/ImportPrometheusRulesRequest.cc b/arms/src/model/ImportPrometheusRulesRequest.cc new file mode 100644 index 000000000..a8ace2bdd --- /dev/null +++ b/arms/src/model/ImportPrometheusRulesRequest.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 + +using AlibabaCloud::ARMS::Model::ImportPrometheusRulesRequest; + +ImportPrometheusRulesRequest::ImportPrometheusRulesRequest() : + RpcServiceRequest("arms", "2019-08-08", "ImportPrometheusRules") +{ + setMethod(HttpRequest::Method::Post); +} + +ImportPrometheusRulesRequest::~ImportPrometheusRulesRequest() +{} + +std::string ImportPrometheusRulesRequest::getRegionId()const +{ + return regionId_; +} + +void ImportPrometheusRulesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ImportPrometheusRulesRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void ImportPrometheusRulesRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setParameter("_NameSpace", _nameSpace); +} + +std::string ImportPrometheusRulesRequest::getName()const +{ + return name_; +} + +void ImportPrometheusRulesRequest::setName(const std::string& name) +{ + name_ = name; + setParameter("Name", name); +} + +std::string ImportPrometheusRulesRequest::getClusterId()const +{ + return clusterId_; +} + +void ImportPrometheusRulesRequest::setClusterId(const std::string& clusterId) +{ + clusterId_ = clusterId; + setParameter("ClusterId", clusterId); +} + +std::string ImportPrometheusRulesRequest::getContent()const +{ + return content_; +} + +void ImportPrometheusRulesRequest::setContent(const std::string& content) +{ + content_ = content; + setParameter("Content", content); +} + diff --git a/arms/src/model/ImportPrometheusRulesResult.cc b/arms/src/model/ImportPrometheusRulesResult.cc new file mode 100644 index 000000000..4a8d82383 --- /dev/null +++ b/arms/src/model/ImportPrometheusRulesResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +ImportPrometheusRulesResult::ImportPrometheusRulesResult() : + ServiceResult() +{} + +ImportPrometheusRulesResult::ImportPrometheusRulesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ImportPrometheusRulesResult::~ImportPrometheusRulesResult() +{} + +void ImportPrometheusRulesResult::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 ImportPrometheusRulesResult::getData()const +{ + return data_; +} + diff --git a/arms/src/model/SearchAlertContactGroupResult.cc b/arms/src/model/SearchAlertContactGroupResult.cc index 01828a620..95aef68af 100644 --- a/arms/src/model/SearchAlertContactGroupResult.cc +++ b/arms/src/model/SearchAlertContactGroupResult.cc @@ -53,28 +53,28 @@ void SearchAlertContactGroupResult::parse(const std::string &payload) contactGroupsObject.createTime = std::stol(valueContactGroupsContactGroup["CreateTime"].asString()); if(!valueContactGroupsContactGroup["UpdateTime"].isNull()) contactGroupsObject.updateTime = std::stol(valueContactGroupsContactGroup["UpdateTime"].asString()); - auto allContactsNode = allContactGroupsNode["Contacts"]["Contact"]; - for (auto allContactGroupsNodeContactsContact : allContactsNode) + auto allContactsNode = valueContactGroupsContactGroup["Contacts"]["Contact"]; + for (auto valueContactGroupsContactGroupContactsContact : allContactsNode) { ContactGroup::Contact contactsObject; - if(!allContactGroupsNodeContactsContact["ContactId"].isNull()) - contactsObject.contactId = std::stol(allContactGroupsNodeContactsContact["ContactId"].asString()); - if(!allContactGroupsNodeContactsContact["ContactName"].isNull()) - contactsObject.contactName = allContactGroupsNodeContactsContact["ContactName"].asString(); - if(!allContactGroupsNodeContactsContact["Phone"].isNull()) - contactsObject.phone = allContactGroupsNodeContactsContact["Phone"].asString(); - if(!allContactGroupsNodeContactsContact["Email"].isNull()) - contactsObject.email = allContactGroupsNodeContactsContact["Email"].asString(); - if(!allContactGroupsNodeContactsContact["UserId"].isNull()) - contactsObject.userId = allContactGroupsNodeContactsContact["UserId"].asString(); - if(!allContactGroupsNodeContactsContact["DingRobot"].isNull()) - contactsObject.dingRobot = allContactGroupsNodeContactsContact["DingRobot"].asString(); - if(!allContactGroupsNodeContactsContact["CreateTime"].isNull()) - contactsObject.createTime = std::stol(allContactGroupsNodeContactsContact["CreateTime"].asString()); - if(!allContactGroupsNodeContactsContact["UpdateTime"].isNull()) - contactsObject.updateTime = std::stol(allContactGroupsNodeContactsContact["UpdateTime"].asString()); - if(!allContactGroupsNodeContactsContact["SystemNoc"].isNull()) - contactsObject.systemNoc = allContactGroupsNodeContactsContact["SystemNoc"].asString() == "true"; + if(!valueContactGroupsContactGroupContactsContact["ContactId"].isNull()) + contactsObject.contactId = std::stol(valueContactGroupsContactGroupContactsContact["ContactId"].asString()); + if(!valueContactGroupsContactGroupContactsContact["ContactName"].isNull()) + contactsObject.contactName = valueContactGroupsContactGroupContactsContact["ContactName"].asString(); + if(!valueContactGroupsContactGroupContactsContact["Phone"].isNull()) + contactsObject.phone = valueContactGroupsContactGroupContactsContact["Phone"].asString(); + if(!valueContactGroupsContactGroupContactsContact["Email"].isNull()) + contactsObject.email = valueContactGroupsContactGroupContactsContact["Email"].asString(); + if(!valueContactGroupsContactGroupContactsContact["UserId"].isNull()) + contactsObject.userId = valueContactGroupsContactGroupContactsContact["UserId"].asString(); + if(!valueContactGroupsContactGroupContactsContact["DingRobot"].isNull()) + contactsObject.dingRobot = valueContactGroupsContactGroupContactsContact["DingRobot"].asString(); + if(!valueContactGroupsContactGroupContactsContact["CreateTime"].isNull()) + contactsObject.createTime = std::stol(valueContactGroupsContactGroupContactsContact["CreateTime"].asString()); + if(!valueContactGroupsContactGroupContactsContact["UpdateTime"].isNull()) + contactsObject.updateTime = std::stol(valueContactGroupsContactGroupContactsContact["UpdateTime"].asString()); + if(!valueContactGroupsContactGroupContactsContact["SystemNoc"].isNull()) + contactsObject.systemNoc = valueContactGroupsContactGroupContactsContact["SystemNoc"].asString() == "true"; contactGroupsObject.contacts.push_back(contactsObject); } contactGroups_.push_back(contactGroupsObject); diff --git a/arms/src/model/SendCustomIncidentsRequest.cc b/arms/src/model/SendCustomIncidentsRequest.cc new file mode 100644 index 000000000..bec45c927 --- /dev/null +++ b/arms/src/model/SendCustomIncidentsRequest.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 + +using AlibabaCloud::ARMS::Model::SendCustomIncidentsRequest; + +SendCustomIncidentsRequest::SendCustomIncidentsRequest() : + RpcServiceRequest("arms", "2019-08-08", "SendCustomIncidents") +{ + setMethod(HttpRequest::Method::Post); +} + +SendCustomIncidentsRequest::~SendCustomIncidentsRequest() +{} + +std::string SendCustomIncidentsRequest::getRegionId()const +{ + return regionId_; +} + +void SendCustomIncidentsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string SendCustomIncidentsRequest::getIncidents()const +{ + return incidents_; +} + +void SendCustomIncidentsRequest::setIncidents(const std::string& incidents) +{ + incidents_ = incidents; + setParameter("Incidents", incidents); +} + +std::string SendCustomIncidentsRequest::getProxyUserId()const +{ + return proxyUserId_; +} + +void SendCustomIncidentsRequest::setProxyUserId(const std::string& proxyUserId) +{ + proxyUserId_ = proxyUserId; + setParameter("ProxyUserId", proxyUserId); +} + +std::string SendCustomIncidentsRequest::getProductType()const +{ + return productType_; +} + +void SendCustomIncidentsRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setParameter("ProductType", productType); +} + diff --git a/arms/src/model/SendCustomIncidentsResult.cc b/arms/src/model/SendCustomIncidentsResult.cc new file mode 100644 index 000000000..1d9ae6280 --- /dev/null +++ b/arms/src/model/SendCustomIncidentsResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +SendCustomIncidentsResult::SendCustomIncidentsResult() : + ServiceResult() +{} + +SendCustomIncidentsResult::SendCustomIncidentsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SendCustomIncidentsResult::~SendCustomIncidentsResult() +{} + +void SendCustomIncidentsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +bool SendCustomIncidentsResult::getSuccess()const +{ + return success_; +} + diff --git a/arms/src/model/SendMseIncidentRequest.cc b/arms/src/model/SendMseIncidentRequest.cc new file mode 100644 index 000000000..0e452c5f2 --- /dev/null +++ b/arms/src/model/SendMseIncidentRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::ARMS::Model::SendMseIncidentRequest; + +SendMseIncidentRequest::SendMseIncidentRequest() : + RpcServiceRequest("arms", "2019-08-08", "SendMseIncident") +{ + setMethod(HttpRequest::Method::Post); +} + +SendMseIncidentRequest::~SendMseIncidentRequest() +{} + +std::string SendMseIncidentRequest::getRegionId()const +{ + return regionId_; +} + +void SendMseIncidentRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string SendMseIncidentRequest::getIncidents()const +{ + return incidents_; +} + +void SendMseIncidentRequest::setIncidents(const std::string& incidents) +{ + incidents_ = incidents; + setParameter("Incidents", incidents); +} + +std::string SendMseIncidentRequest::getProxyUserId()const +{ + return proxyUserId_; +} + +void SendMseIncidentRequest::setProxyUserId(const std::string& proxyUserId) +{ + proxyUserId_ = proxyUserId; + setParameter("ProxyUserId", proxyUserId); +} + diff --git a/arms/src/model/SendMseIncidentResult.cc b/arms/src/model/SendMseIncidentResult.cc new file mode 100644 index 000000000..10ef88a7f --- /dev/null +++ b/arms/src/model/SendMseIncidentResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::ARMS; +using namespace AlibabaCloud::ARMS::Model; + +SendMseIncidentResult::SendMseIncidentResult() : + ServiceResult() +{} + +SendMseIncidentResult::SendMseIncidentResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SendMseIncidentResult::~SendMseIncidentResult() +{} + +void SendMseIncidentResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +bool SendMseIncidentResult::getSuccess()const +{ + return success_; +} + diff --git a/arms/src/model/UpdateWebhookRequest.cc b/arms/src/model/UpdateWebhookRequest.cc index e0f5565da..45f320d15 100644 --- a/arms/src/model/UpdateWebhookRequest.cc +++ b/arms/src/model/UpdateWebhookRequest.cc @@ -27,15 +27,15 @@ UpdateWebhookRequest::UpdateWebhookRequest() : UpdateWebhookRequest::~UpdateWebhookRequest() {} -std::string UpdateWebhookRequest::getHeaders()const +std::string UpdateWebhookRequest::getHttpHeaders()const { - return headers_; + return httpHeaders_; } -void UpdateWebhookRequest::setHeaders(const std::string& headers) +void UpdateWebhookRequest::setHttpHeaders(const std::string& httpHeaders) { - headers_ = headers; - setParameter("Headers", headers); + httpHeaders_ = httpHeaders; + setParameter("HttpHeaders", httpHeaders); } std::string UpdateWebhookRequest::getMethod()const @@ -60,15 +60,15 @@ void UpdateWebhookRequest::setContactId(long contactId) setParameter("ContactId", std::to_string(contactId)); } -std::string UpdateWebhookRequest::getParams()const +std::string UpdateWebhookRequest::getHttpParams()const { - return params_; + return httpParams_; } -void UpdateWebhookRequest::setParams(const std::string& params) +void UpdateWebhookRequest::setHttpParams(const std::string& httpParams) { - params_ = params; - setParameter("Params", params); + httpParams_ = httpParams; + setParameter("HttpParams", httpParams); } std::string UpdateWebhookRequest::getProxyUserId()const