CMS SDK Auto Released By shenshi,Version:1.34.55

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2019-03-20 17:40:22 +08:00
parent 815b6202ed
commit 00a377f110
401 changed files with 21507 additions and 4347 deletions

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::AccessKeyGetRequest;
AccessKeyGetRequest::AccessKeyGetRequest() :
RpcServiceRequest("cms", "2017-03-01", "AccessKeyGet")
RpcServiceRequest("cms", "2018-03-08", "AccessKeyGet")
{}
AccessKeyGetRequest::~AccessKeyGetRequest()

View File

@@ -40,48 +40,48 @@ void AccessKeyGetResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["UserId"].isNull())
userId_ = std::stol(value["UserId"].asString());
if(!value["AccessKey"].isNull())
accessKey_ = value["AccessKey"].asString();
if(!value["SecretKey"].isNull())
secretKey_ = value["SecretKey"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["UserId"].isNull())
userId_ = std::stol(value["UserId"].asString());
if(!value["AccessKey"].isNull())
accessKey_ = value["AccessKey"].asString();
if(!value["SecretKey"].isNull())
secretKey_ = value["SecretKey"].asString();
}
std::string AccessKeyGetResult::getSecretKey()const
{
return secretKey_;
}
long AccessKeyGetResult::getUserId()const
{
return userId_;
}
int AccessKeyGetResult::getErrorCode()const
{
return errorCode_;
}
std::string AccessKeyGetResult::getAccessKey()const
{
return accessKey_;
}
std::string AccessKeyGetResult::getErrorMessage()const
{
return errorMessage_;
}
bool AccessKeyGetResult::getSuccess()const
{
return success_;
}
std::string AccessKeyGetResult::getSecretKey()const
{
return secretKey_;
}
long AccessKeyGetResult::getUserId()const
{
return userId_;
}
int AccessKeyGetResult::getErrorCode()const
{
return errorCode_;
}
std::string AccessKeyGetResult::getAccessKey()const
{
return accessKey_;
}
std::string AccessKeyGetResult::getErrorMessage()const
{
return errorMessage_;
}
bool AccessKeyGetResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::AddMyGroupInstancesRequest;
AddMyGroupInstancesRequest::AddMyGroupInstancesRequest() :
RpcServiceRequest("cms", "2017-03-01", "AddMyGroupInstances")
RpcServiceRequest("cms", "2018-03-08", "AddMyGroupInstances")
{}
AddMyGroupInstancesRequest::~AddMyGroupInstancesRequest()

View File

@@ -40,27 +40,27 @@ void AddMyGroupInstancesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
int AddMyGroupInstancesResult::getErrorCode()const
{
return errorCode_;
}
std::string AddMyGroupInstancesResult::getErrorMessage()const
{
return errorMessage_;
}
bool AddMyGroupInstancesResult::getSuccess()const
{
return success_;
}
int AddMyGroupInstancesResult::getErrorCode()const
{
return errorCode_;
}
std::string AddMyGroupInstancesResult::getErrorMessage()const
{
return errorMessage_;
}
bool AddMyGroupInstancesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,115 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ApplyMonitoringTemplateRequest.h>
using AlibabaCloud::Cms::Model::ApplyMonitoringTemplateRequest;
ApplyMonitoringTemplateRequest::ApplyMonitoringTemplateRequest() :
RpcServiceRequest("cms", "2018-03-08", "ApplyMonitoringTemplate")
{}
ApplyMonitoringTemplateRequest::~ApplyMonitoringTemplateRequest()
{}
long ApplyMonitoringTemplateRequest::getEnableStartTime()const
{
return enableStartTime_;
}
void ApplyMonitoringTemplateRequest::setEnableStartTime(long enableStartTime)
{
enableStartTime_ = enableStartTime;
setParameter("EnableStartTime", std::to_string(enableStartTime));
}
std::string ApplyMonitoringTemplateRequest::getApplyMode()const
{
return applyMode_;
}
void ApplyMonitoringTemplateRequest::setApplyMode(const std::string& applyMode)
{
applyMode_ = applyMode;
setParameter("ApplyMode", applyMode);
}
std::string ApplyMonitoringTemplateRequest::getWebhook()const
{
return webhook_;
}
void ApplyMonitoringTemplateRequest::setWebhook(const std::string& webhook)
{
webhook_ = webhook;
setParameter("Webhook", webhook);
}
std::string ApplyMonitoringTemplateRequest::getTemplateIds()const
{
return templateIds_;
}
void ApplyMonitoringTemplateRequest::setTemplateIds(const std::string& templateIds)
{
templateIds_ = templateIds;
setParameter("TemplateIds", templateIds);
}
long ApplyMonitoringTemplateRequest::getEnableEndTime()const
{
return enableEndTime_;
}
void ApplyMonitoringTemplateRequest::setEnableEndTime(long enableEndTime)
{
enableEndTime_ = enableEndTime;
setParameter("EnableEndTime", std::to_string(enableEndTime));
}
long ApplyMonitoringTemplateRequest::getGroupId()const
{
return groupId_;
}
void ApplyMonitoringTemplateRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
long ApplyMonitoringTemplateRequest::getNotifyLevel()const
{
return notifyLevel_;
}
void ApplyMonitoringTemplateRequest::setNotifyLevel(long notifyLevel)
{
notifyLevel_ = notifyLevel;
setParameter("NotifyLevel", std::to_string(notifyLevel));
}
long ApplyMonitoringTemplateRequest::getSilenceTime()const
{
return silenceTime_;
}
void ApplyMonitoringTemplateRequest::setSilenceTime(long silenceTime)
{
silenceTime_ = silenceTime;
setParameter("SilenceTime", std::to_string(silenceTime));
}

View File

@@ -0,0 +1,110 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ApplyMonitoringTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ApplyMonitoringTemplateResult::ApplyMonitoringTemplateResult() :
ServiceResult()
{}
ApplyMonitoringTemplateResult::ApplyMonitoringTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ApplyMonitoringTemplateResult::~ApplyMonitoringTemplateResult()
{}
void ApplyMonitoringTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resourceNode = value["Resource"];
if(!resourceNode["GroupId"].isNull())
resource_.groupId = std::stol(resourceNode["GroupId"].asString());
auto allEventResults = value["EventResults"]["Result"];
for (auto value : allEventResults)
{
Resource::Result resultObject;
if(!value["GroupId"].isNull())
resultObject.groupId = std::stol(value["GroupId"].asString());
if(!value["Name"].isNull())
resultObject.name = value["Name"].asString();
if(!value["Message"].isNull())
resultObject.message = value["Message"].asString();
if(!value["DisplayName"].isNull())
resultObject.displayName = value["DisplayName"].asString();
if(!value["Code"].isNull())
resultObject.code = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
resultObject.success = value["Success"].asString() == "true";
resource_.eventResults.push_back(resultObject);
}
auto allAlertResults = value["AlertResults"]["Result"];
for (auto value : allAlertResults)
{
Resource::Result resultObject;
if(!value["GroupId"].isNull())
resultObject.groupId = std::stol(value["GroupId"].asString());
if(!value["Name"].isNull())
resultObject.name = value["Name"].asString();
if(!value["Message"].isNull())
resultObject.message = value["Message"].asString();
if(!value["DisplayName"].isNull())
resultObject.displayName = value["DisplayName"].asString();
if(!value["Code"].isNull())
resultObject.code = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
resultObject.success = value["Success"].asString() == "true";
resource_.alertResults.push_back(resultObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
ApplyMonitoringTemplateResult::Resource ApplyMonitoringTemplateResult::getResource()const
{
return resource_;
}
int ApplyMonitoringTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string ApplyMonitoringTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool ApplyMonitoringTemplateResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ApplyTemplateRequest.h>
using AlibabaCloud::Cms::Model::ApplyTemplateRequest;
ApplyTemplateRequest::ApplyTemplateRequest() :
RpcServiceRequest("cms", "2018-03-08", "ApplyTemplate")
{}
ApplyTemplateRequest::~ApplyTemplateRequest()
{}
long ApplyTemplateRequest::getEnableStartTime()const
{
return enableStartTime_;
}
void ApplyTemplateRequest::setEnableStartTime(long enableStartTime)
{
enableStartTime_ = enableStartTime;
setParameter("EnableStartTime", std::to_string(enableStartTime));
}
std::string ApplyTemplateRequest::getApplyMode()const
{
return applyMode_;
}
void ApplyTemplateRequest::setApplyMode(const std::string& applyMode)
{
applyMode_ = applyMode;
setParameter("ApplyMode", applyMode);
}
std::string ApplyTemplateRequest::getTemplateIds()const
{
return templateIds_;
}
void ApplyTemplateRequest::setTemplateIds(const std::string& templateIds)
{
templateIds_ = templateIds;
setParameter("TemplateIds", templateIds);
}
long ApplyTemplateRequest::getEnableEndTime()const
{
return enableEndTime_;
}
void ApplyTemplateRequest::setEnableEndTime(long enableEndTime)
{
enableEndTime_ = enableEndTime;
setParameter("EnableEndTime", std::to_string(enableEndTime));
}
long ApplyTemplateRequest::getGroupId()const
{
return groupId_;
}
void ApplyTemplateRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
long ApplyTemplateRequest::getNotifyLevel()const
{
return notifyLevel_;
}
void ApplyTemplateRequest::setNotifyLevel(long notifyLevel)
{
notifyLevel_ = notifyLevel;
setParameter("NotifyLevel", std::to_string(notifyLevel));
}
long ApplyTemplateRequest::getSilenceTime()const
{
return silenceTime_;
}
void ApplyTemplateRequest::setSilenceTime(long silenceTime)
{
silenceTime_ = silenceTime;
setParameter("SilenceTime", std::to_string(silenceTime));
}

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ApplyTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ApplyTemplateResult::ApplyTemplateResult() :
ServiceResult()
{}
ApplyTemplateResult::ApplyTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ApplyTemplateResult::~ApplyTemplateResult()
{}
void ApplyTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resourceNode = value["Resource"];
auto allCreateAlertResults = value["CreateAlertResults"]["AlertResult"];
for (auto value : allCreateAlertResults)
{
Resource::AlertResult alertResultObject;
if(!value["Name"].isNull())
alertResultObject.name = value["Name"].asString();
if(!value["DisplayName"].isNull())
alertResultObject.displayName = value["DisplayName"].asString();
if(!value["MetricNamespace"].isNull())
alertResultObject.metricNamespace = value["MetricNamespace"].asString();
if(!value["MetricName"].isNull())
alertResultObject.metricName = value["MetricName"].asString();
if(!value["Message"].isNull())
alertResultObject.message = value["Message"].asString();
if(!value["Success"].isNull())
alertResultObject.success = value["Success"].asString();
resource_.createAlertResults.push_back(alertResultObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
ApplyTemplateResult::Resource ApplyTemplateResult::getResource()const
{
return resource_;
}
int ApplyTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string ApplyTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool ApplyTemplateResult::getSuccess()const
{
return success_;
}

View File

@@ -19,23 +19,12 @@
using AlibabaCloud::Cms::Model::CreateAlarmRequest;
CreateAlarmRequest::CreateAlarmRequest() :
RpcServiceRequest("cms", "2017-03-01", "CreateAlarm")
RpcServiceRequest("cms", "2018-03-08", "CreateAlarm")
{}
CreateAlarmRequest::~CreateAlarmRequest()
{}
std::string CreateAlarmRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void CreateAlarmRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
int CreateAlarmRequest::getPeriod()const
{
return period_;
@@ -58,6 +47,17 @@ void CreateAlarmRequest::setWebhook(const std::string& webhook)
setParameter("Webhook", webhook);
}
bool CreateAlarmRequest::getDryRun()const
{
return dryRun_;
}
void CreateAlarmRequest::setDryRun(bool dryRun)
{
dryRun_ = dryRun;
setParameter("DryRun", dryRun ? "true" : "false");
}
std::string CreateAlarmRequest::getContactGroups()const
{
return contactGroups_;

View File

@@ -40,34 +40,34 @@ void CreateAlarmResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string CreateAlarmResult::getMessage()const
{
return message_;
}
std::string CreateAlarmResult::getData()const
{
return data_;
}
std::string CreateAlarmResult::getCode()const
{
return code_;
}
bool CreateAlarmResult::getSuccess()const
{
return success_;
}
std::string CreateAlarmResult::getMessage()const
{
return message_;
}
std::string CreateAlarmResult::getData()const
{
return data_;
}
std::string CreateAlarmResult::getCode()const
{
return code_;
}
bool CreateAlarmResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateMonitoringTemplateRequest.h>
using AlibabaCloud::Cms::Model::CreateMonitoringTemplateRequest;
CreateMonitoringTemplateRequest::CreateMonitoringTemplateRequest() :
RpcServiceRequest("cms", "2018-03-08", "CreateMonitoringTemplate")
{}
CreateMonitoringTemplateRequest::~CreateMonitoringTemplateRequest()
{}
std::string CreateMonitoringTemplateRequest::getEventRuleTemplatesJson()const
{
return eventRuleTemplatesJson_;
}
void CreateMonitoringTemplateRequest::setEventRuleTemplatesJson(const std::string& eventRuleTemplatesJson)
{
eventRuleTemplatesJson_ = eventRuleTemplatesJson;
setParameter("EventRuleTemplatesJson", eventRuleTemplatesJson);
}
std::string CreateMonitoringTemplateRequest::getName()const
{
return name_;
}
void CreateMonitoringTemplateRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateMonitoringTemplateRequest::get_Namespace()const
{
return _namespace_;
}
void CreateMonitoringTemplateRequest::set_Namespace(const std::string& _namespace)
{
_namespace_ = _namespace;
setParameter("_Namespace", _namespace);
}
std::string CreateMonitoringTemplateRequest::getDescription()const
{
return description_;
}
void CreateMonitoringTemplateRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateMonitoringTemplateRequest::getAlertTemplatesJson()const
{
return alertTemplatesJson_;
}
void CreateMonitoringTemplateRequest::setAlertTemplatesJson(const std::string& alertTemplatesJson)
{
alertTemplatesJson_ = alertTemplatesJson;
setParameter("AlertTemplatesJson", alertTemplatesJson);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateMonitoringTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
CreateMonitoringTemplateResult::CreateMonitoringTemplateResult() :
ServiceResult()
{}
CreateMonitoringTemplateResult::CreateMonitoringTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateMonitoringTemplateResult::~CreateMonitoringTemplateResult()
{}
void CreateMonitoringTemplateResult::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";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Id"].isNull())
id_ = std::stol(value["Id"].asString());
}
int CreateMonitoringTemplateResult::getErrorCode()const
{
return errorCode_;
}
long CreateMonitoringTemplateResult::getId()const
{
return id_;
}
std::string CreateMonitoringTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateMonitoringTemplateResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateMyGroupAlertBatchRequest.h>
using AlibabaCloud::Cms::Model::CreateMyGroupAlertBatchRequest;
CreateMyGroupAlertBatchRequest::CreateMyGroupAlertBatchRequest() :
RpcServiceRequest("cms", "2018-03-08", "CreateMyGroupAlertBatch")
{}
CreateMyGroupAlertBatchRequest::~CreateMyGroupAlertBatchRequest()
{}
long CreateMyGroupAlertBatchRequest::getGroupId()const
{
return groupId_;
}
void CreateMyGroupAlertBatchRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string CreateMyGroupAlertBatchRequest::getGroupAlertJsonArray()const
{
return groupAlertJsonArray_;
}
void CreateMyGroupAlertBatchRequest::setGroupAlertJsonArray(const std::string& groupAlertJsonArray)
{
groupAlertJsonArray_ = groupAlertJsonArray;
setParameter("GroupAlertJsonArray", groupAlertJsonArray);
}

View File

@@ -0,0 +1,93 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateMyGroupAlertBatchResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
CreateMyGroupAlertBatchResult::CreateMyGroupAlertBatchResult() :
ServiceResult()
{}
CreateMyGroupAlertBatchResult::CreateMyGroupAlertBatchResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateMyGroupAlertBatchResult::~CreateMyGroupAlertBatchResult()
{}
void CreateMyGroupAlertBatchResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResources = value["Resources"]["AlertResult"];
for (auto value : allResources)
{
AlertResult resourcesObject;
if(!value["AlertName"].isNull())
resourcesObject.alertName = value["AlertName"].asString();
if(!value["DisplayName"].isNull())
resourcesObject.displayName = value["DisplayName"].asString();
if(!value["MetricNamespace"].isNull())
resourcesObject.metricNamespace = value["MetricNamespace"].asString();
if(!value["MetricName"].isNull())
resourcesObject.metricName = value["MetricName"].asString();
if(!value["Message"].isNull())
resourcesObject.message = value["Message"].asString();
if(!value["Code"].isNull())
resourcesObject.code = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
resourcesObject.success = value["Success"].asString() == "true";
if(!value["GroupId"].isNull())
resourcesObject.groupId = std::stol(value["GroupId"].asString());
resources_.push_back(resourcesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<CreateMyGroupAlertBatchResult::AlertResult> CreateMyGroupAlertBatchResult::getResources()const
{
return resources_;
}
int CreateMyGroupAlertBatchResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateMyGroupAlertBatchResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateMyGroupAlertBatchResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::CreateMyGroupsRequest;
CreateMyGroupsRequest::CreateMyGroupsRequest() :
RpcServiceRequest("cms", "2017-03-01", "CreateMyGroups")
RpcServiceRequest("cms", "2018-03-08", "CreateMyGroups")
{}
CreateMyGroupsRequest::~CreateMyGroupsRequest()
@@ -36,15 +36,15 @@ void CreateMyGroupsRequest::setContactGroups(const std::string& contactGroups)
setParameter("ContactGroups", contactGroups);
}
long CreateMyGroupsRequest::getServiceId()const
std::string CreateMyGroupsRequest::getOptions()const
{
return serviceId_;
return options_;
}
void CreateMyGroupsRequest::setServiceId(long serviceId)
void CreateMyGroupsRequest::setOptions(const std::string& options)
{
serviceId_ = serviceId;
setParameter("ServiceId", std::to_string(serviceId));
options_ = options;
setParameter("Options", options);
}
std::string CreateMyGroupsRequest::getType()const
@@ -58,6 +58,17 @@ void CreateMyGroupsRequest::setType(const std::string& type)
setParameter("Type", type);
}
long CreateMyGroupsRequest::getServiceId()const
{
return serviceId_;
}
void CreateMyGroupsRequest::setServiceId(long serviceId)
{
serviceId_ = serviceId;
setParameter("ServiceId", std::to_string(serviceId));
}
std::string CreateMyGroupsRequest::getGroupName()const
{
return groupName_;

View File

@@ -40,34 +40,34 @@ void CreateMyGroupsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["GroupId"].isNull())
groupId_ = std::stol(value["GroupId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["GroupId"].isNull())
groupId_ = std::stol(value["GroupId"].asString());
}
int CreateMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateMyGroupsResult::getSuccess()const
{
return success_;
}
long CreateMyGroupsResult::getGroupId()const
{
return groupId_;
}
int CreateMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateMyGroupsResult::getSuccess()const
{
return success_;
}
long CreateMyGroupsResult::getGroupId()const
{
return groupId_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::CreateNotifyPolicyRequest;
CreateNotifyPolicyRequest::CreateNotifyPolicyRequest() :
RpcServiceRequest("cms", "2017-03-01", "CreateNotifyPolicy")
RpcServiceRequest("cms", "2018-03-08", "CreateNotifyPolicy")
{}
CreateNotifyPolicyRequest::~CreateNotifyPolicyRequest()
@@ -47,6 +47,17 @@ void CreateNotifyPolicyRequest::setAlertName(const std::string& alertName)
setParameter("AlertName", alertName);
}
std::string CreateNotifyPolicyRequest::getGroupId()const
{
return groupId_;
}
void CreateNotifyPolicyRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
long CreateNotifyPolicyRequest::getEndTime()const
{
return endTime_;

View File

@@ -40,41 +40,34 @@ void CreateNotifyPolicyResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["code"].isNull())
code_ = value["code"].asString();
if(!value["message"].isNull())
message_ = value["message"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString();
if(!value["traceId"].isNull())
traceId_ = value["traceId"].asString();
if(!value["result"].isNull())
result_ = std::stoi(value["result"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Result"].isNull())
result_ = std::stoi(value["Result"].asString());
}
std::string CreateNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string CreateNotifyPolicyResult::getTraceId()const
{
return traceId_;
}
std::string CreateNotifyPolicyResult::getCode()const
{
return code_;
}
std::string CreateNotifyPolicyResult::getSuccess()const
{
return success_;
}
int CreateNotifyPolicyResult::getResult()const
{
return result_;
}
std::string CreateNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string CreateNotifyPolicyResult::getCode()const
{
return code_;
}
std::string CreateNotifyPolicyResult::getSuccess()const
{
return success_;
}
int CreateNotifyPolicyResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,126 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateTaskRequest.h>
using AlibabaCloud::Cms::Model::CreateTaskRequest;
CreateTaskRequest::CreateTaskRequest() :
RpcServiceRequest("cms", "2018-03-08", "CreateTask")
{}
CreateTaskRequest::~CreateTaskRequest()
{}
std::string CreateTaskRequest::getCaller()const
{
return caller_;
}
void CreateTaskRequest::setCaller(const std::string& caller)
{
caller_ = caller;
setParameter("Caller", caller);
}
std::string CreateTaskRequest::getAddress()const
{
return address_;
}
void CreateTaskRequest::setAddress(const std::string& address)
{
address_ = address;
setParameter("Address", address);
}
std::string CreateTaskRequest::getTaskType()const
{
return taskType_;
}
void CreateTaskRequest::setTaskType(const std::string& taskType)
{
taskType_ = taskType;
setParameter("TaskType", taskType);
}
std::string CreateTaskRequest::getIspCity()const
{
return ispCity_;
}
void CreateTaskRequest::setIspCity(const std::string& ispCity)
{
ispCity_ = ispCity;
setParameter("IspCity", ispCity);
}
std::string CreateTaskRequest::getAlertIds()const
{
return alertIds_;
}
void CreateTaskRequest::setAlertIds(const std::string& alertIds)
{
alertIds_ = alertIds;
setParameter("AlertIds", alertIds);
}
std::string CreateTaskRequest::getOptions()const
{
return options_;
}
void CreateTaskRequest::setOptions(const std::string& options)
{
options_ = options;
setParameter("Options", options);
}
std::string CreateTaskRequest::getTaskName()const
{
return taskName_;
}
void CreateTaskRequest::setTaskName(const std::string& taskName)
{
taskName_ = taskName;
setParameter("TaskName", taskName);
}
std::string CreateTaskRequest::getInterval()const
{
return interval_;
}
void CreateTaskRequest::setInterval(const std::string& interval)
{
interval_ = interval;
setParameter("Interval", interval);
}
std::string CreateTaskRequest::getAlertRule()const
{
return alertRule_;
}
void CreateTaskRequest::setAlertRule(const std::string& alertRule)
{
alertRule_ = alertRule;
setParameter("AlertRule", alertRule);
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/CreateTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
CreateTaskResult::CreateTaskResult() :
ServiceResult()
{}
CreateTaskResult::CreateTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateTaskResult::~CreateTaskResult()
{}
void CreateTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["AlertRule"].isNull())
alertRule_ = value["AlertRule"].asString();
}
std::string CreateTaskResult::getMessage()const
{
return message_;
}
std::string CreateTaskResult::getData()const
{
return data_;
}
std::string CreateTaskResult::getCode()const
{
return code_;
}
std::string CreateTaskResult::getSuccess()const
{
return success_;
}
std::string CreateTaskResult::getAlertRule()const
{
return alertRule_;
}

View File

@@ -19,23 +19,12 @@
using AlibabaCloud::Cms::Model::DeleteAlarmRequest;
DeleteAlarmRequest::DeleteAlarmRequest() :
RpcServiceRequest("cms", "2017-03-01", "DeleteAlarm")
RpcServiceRequest("cms", "2018-03-08", "DeleteAlarm")
{}
DeleteAlarmRequest::~DeleteAlarmRequest()
{}
std::string DeleteAlarmRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void DeleteAlarmRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
std::string DeleteAlarmRequest::getId()const
{
return id_;

View File

@@ -40,27 +40,27 @@ void DeleteAlarmResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DeleteAlarmResult::getMessage()const
{
return message_;
}
std::string DeleteAlarmResult::getCode()const
{
return code_;
}
bool DeleteAlarmResult::getSuccess()const
{
return success_;
}
std::string DeleteAlarmResult::getMessage()const
{
return message_;
}
std::string DeleteAlarmResult::getCode()const
{
return code_;
}
bool DeleteAlarmResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DeleteCustomMetricRequest;
DeleteCustomMetricRequest::DeleteCustomMetricRequest() :
RpcServiceRequest("cms", "2017-03-01", "DeleteCustomMetric")
RpcServiceRequest("cms", "2018-03-08", "DeleteCustomMetric")
{}
DeleteCustomMetricRequest::~DeleteCustomMetricRequest()

View File

@@ -40,27 +40,27 @@ void DeleteCustomMetricResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Result"].isNull())
result_ = value["Result"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Result"].isNull())
result_ = value["Result"].asString();
}
std::string DeleteCustomMetricResult::getMessage()const
{
return message_;
}
std::string DeleteCustomMetricResult::getCode()const
{
return code_;
}
std::string DeleteCustomMetricResult::getResult()const
{
return result_;
}
std::string DeleteCustomMetricResult::getMessage()const
{
return message_;
}
std::string DeleteCustomMetricResult::getCode()const
{
return code_;
}
std::string DeleteCustomMetricResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteEventRuleRequest.h>
using AlibabaCloud::Cms::Model::DeleteEventRuleRequest;
DeleteEventRuleRequest::DeleteEventRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "DeleteEventRule")
{}
DeleteEventRuleRequest::~DeleteEventRuleRequest()
{}
std::vector<std::string> DeleteEventRuleRequest::getRuleNames()const
{
return ruleNames_;
}
void DeleteEventRuleRequest::setRuleNames(const std::vector<std::string>& ruleNames)
{
ruleNames_ = ruleNames;
for(int i = 0; i!= ruleNames.size(); i++)
setParameter("RuleNames."+ std::to_string(i), ruleNames.at(i));
}
std::string DeleteEventRuleRequest::getRuleName()const
{
return ruleName_;
}
void DeleteEventRuleRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -14,53 +14,53 @@
* limitations under the License.
*/
#include <alibabacloud/cms/model/PutMetricDataResult.h>
#include <alibabacloud/cms/model/DeleteEventRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
PutMetricDataResult::PutMetricDataResult() :
DeleteEventRuleResult::DeleteEventRuleResult() :
ServiceResult()
{}
PutMetricDataResult::PutMetricDataResult(const std::string &payload) :
DeleteEventRuleResult::DeleteEventRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PutMetricDataResult::~PutMetricDataResult()
DeleteEventRuleResult::~DeleteEventRuleResult()
{}
void PutMetricDataResult::parse(const std::string &payload)
void DeleteEventRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string PutMetricDataResult::getMessage()const
{
return message_;
}
std::string PutMetricDataResult::getCode()const
{
return code_;
}
bool PutMetricDataResult::getSuccess()const
{
return success_;
}
std::string DeleteEventRuleResult::getMessage()const
{
return message_;
}
std::string DeleteEventRuleResult::getCode()const
{
return code_;
}
bool DeleteEventRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteEventTargetsRequest.h>
using AlibabaCloud::Cms::Model::DeleteEventTargetsRequest;
DeleteEventTargetsRequest::DeleteEventTargetsRequest() :
RpcServiceRequest("cms", "2018-03-08", "DeleteEventTargets")
{}
DeleteEventTargetsRequest::~DeleteEventTargetsRequest()
{}
std::vector<std::string> DeleteEventTargetsRequest::getIds()const
{
return ids_;
}
void DeleteEventTargetsRequest::setIds(const std::vector<std::string>& ids)
{
ids_ = ids;
for(int i = 0; i!= ids.size(); i++)
setParameter("Ids."+ std::to_string(i), ids.at(i));
}
std::string DeleteEventTargetsRequest::getRuleName()const
{
return ruleName_;
}
void DeleteEventTargetsRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -14,53 +14,53 @@
* limitations under the License.
*/
#include <alibabacloud/cms/model/DisableActiceAlertResult.h>
#include <alibabacloud/cms/model/DeleteEventTargetsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DisableActiceAlertResult::DisableActiceAlertResult() :
DeleteEventTargetsResult::DeleteEventTargetsResult() :
ServiceResult()
{}
DisableActiceAlertResult::DisableActiceAlertResult(const std::string &payload) :
DeleteEventTargetsResult::DeleteEventTargetsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableActiceAlertResult::~DisableActiceAlertResult()
DeleteEventTargetsResult::~DeleteEventTargetsResult()
{}
void DisableActiceAlertResult::parse(const std::string &payload)
void DeleteEventTargetsResult::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";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DisableActiceAlertResult::getMessage()const
{
return message_;
}
std::string DisableActiceAlertResult::getCode()const
{
return code_;
}
bool DisableActiceAlertResult::getSuccess()const
{
return success_;
}
std::string DeleteEventTargetsResult::getMessage()const
{
return message_;
}
std::string DeleteEventTargetsResult::getCode()const
{
return code_;
}
bool DeleteEventTargetsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteGroupDynamicRuleRequest.h>
using AlibabaCloud::Cms::Model::DeleteGroupDynamicRuleRequest;
DeleteGroupDynamicRuleRequest::DeleteGroupDynamicRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "DeleteGroupDynamicRule")
{}
DeleteGroupDynamicRuleRequest::~DeleteGroupDynamicRuleRequest()
{}
long DeleteGroupDynamicRuleRequest::getGroupId()const
{
return groupId_;
}
void DeleteGroupDynamicRuleRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string DeleteGroupDynamicRuleRequest::getCategory()const
{
return category_;
}
void DeleteGroupDynamicRuleRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteGroupDynamicRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DeleteGroupDynamicRuleResult::DeleteGroupDynamicRuleResult() :
ServiceResult()
{}
DeleteGroupDynamicRuleResult::DeleteGroupDynamicRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteGroupDynamicRuleResult::~DeleteGroupDynamicRuleResult()
{}
void DeleteGroupDynamicRuleResult::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";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
int DeleteGroupDynamicRuleResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteGroupDynamicRuleResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteGroupDynamicRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -14,25 +14,25 @@
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListProductOfActiceAlertRequest.h>
#include <alibabacloud/cms/model/DeleteMonitoringTemplateRequest.h>
using AlibabaCloud::Cms::Model::ListProductOfActiceAlertRequest;
using AlibabaCloud::Cms::Model::DeleteMonitoringTemplateRequest;
ListProductOfActiceAlertRequest::ListProductOfActiceAlertRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListProductOfActiceAlert")
DeleteMonitoringTemplateRequest::DeleteMonitoringTemplateRequest() :
RpcServiceRequest("cms", "2018-03-08", "DeleteMonitoringTemplate")
{}
ListProductOfActiceAlertRequest::~ListProductOfActiceAlertRequest()
DeleteMonitoringTemplateRequest::~DeleteMonitoringTemplateRequest()
{}
std::string ListProductOfActiceAlertRequest::getUserId()const
std::string DeleteMonitoringTemplateRequest::getId()const
{
return userId_;
return id_;
}
void ListProductOfActiceAlertRequest::setUserId(const std::string& userId)
void DeleteMonitoringTemplateRequest::setId(const std::string& id)
{
userId_ = userId;
setParameter("UserId", userId);
id_ = id;
setParameter("Id", id);
}

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteMonitoringTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DeleteMonitoringTemplateResult::DeleteMonitoringTemplateResult() :
ServiceResult()
{}
DeleteMonitoringTemplateResult::DeleteMonitoringTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteMonitoringTemplateResult::~DeleteMonitoringTemplateResult()
{}
void DeleteMonitoringTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resourceNode = value["Resource"];
if(!resourceNode["Name"].isNull())
resource_.name = resourceNode["Name"].asString();
if(!resourceNode["Id"].isNull())
resource_.id = resourceNode["Id"].asString();
if(!resourceNode["RestVersion"].isNull())
resource_.restVersion = resourceNode["RestVersion"].asString();
if(!resourceNode["Namespace"].isNull())
resource_._namespace = resourceNode["Namespace"].asString();
if(!resourceNode["Description"].isNull())
resource_.description = resourceNode["Description"].asString();
if(!resourceNode["AlertTemplatesJson"].isNull())
resource_.alertTemplatesJson = resourceNode["AlertTemplatesJson"].asString();
if(!resourceNode["EventRuleTemplatesJson"].isNull())
resource_.eventRuleTemplatesJson = resourceNode["EventRuleTemplatesJson"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
DeleteMonitoringTemplateResult::Resource DeleteMonitoringTemplateResult::getResource()const
{
return resource_;
}
int DeleteMonitoringTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteMonitoringTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteMonitoringTemplateResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DeleteMyGroupInstancesRequest;
DeleteMyGroupInstancesRequest::DeleteMyGroupInstancesRequest() :
RpcServiceRequest("cms", "2017-03-01", "DeleteMyGroupInstances")
RpcServiceRequest("cms", "2018-03-08", "DeleteMyGroupInstances")
{}
DeleteMyGroupInstancesRequest::~DeleteMyGroupInstancesRequest()
@@ -36,6 +36,17 @@ void DeleteMyGroupInstancesRequest::setInstanceIds(const std::string& instanceId
setParameter("InstanceIds", instanceIds);
}
std::string DeleteMyGroupInstancesRequest::getInstanceIdList()const
{
return instanceIdList_;
}
void DeleteMyGroupInstancesRequest::setInstanceIdList(const std::string& instanceIdList)
{
instanceIdList_ = instanceIdList;
setParameter("InstanceIdList", instanceIdList);
}
long DeleteMyGroupInstancesRequest::getGroupId()const
{
return groupId_;
@@ -47,3 +58,14 @@ void DeleteMyGroupInstancesRequest::setGroupId(long groupId)
setParameter("GroupId", std::to_string(groupId));
}
std::string DeleteMyGroupInstancesRequest::getCategory()const
{
return category_;
}
void DeleteMyGroupInstancesRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}

View File

@@ -40,27 +40,27 @@ void DeleteMyGroupInstancesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
int DeleteMyGroupInstancesResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteMyGroupInstancesResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteMyGroupInstancesResult::getSuccess()const
{
return success_;
}
int DeleteMyGroupInstancesResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteMyGroupInstancesResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteMyGroupInstancesResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DeleteMyGroupsRequest;
DeleteMyGroupsRequest::DeleteMyGroupsRequest() :
RpcServiceRequest("cms", "2017-03-01", "DeleteMyGroups")
RpcServiceRequest("cms", "2018-03-08", "DeleteMyGroups")
{}
DeleteMyGroupsRequest::~DeleteMyGroupsRequest()

View File

@@ -40,56 +40,51 @@ void DeleteMyGroupsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allGroup = value["Group"];
for (auto value : allGroup)
{
Group groupObject;
if(!value["GroupId"].isNull())
groupObject.groupId = std::stol(value["GroupId"].asString());
if(!value["GroupName"].isNull())
groupObject.groupName = value["GroupName"].asString();
if(!value["ServiceId"].isNull())
groupObject.serviceId = value["ServiceId"].asString();
if(!value["BindUrls"].isNull())
groupObject.bindUrls = value["BindUrls"].asString();
if(!value["Type"].isNull())
groupObject.type = value["Type"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
{
Group::ContactGroup contactGroupObject;
if(!value["Name"].isNull())
contactGroupObject.name = value["Name"].asString();
groupObject.contactGroups.push_back(contactGroupObject);
}
group_.push_back(groupObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
auto groupNode = value["Group"];
if(!groupNode["GroupId"].isNull())
group_.groupId = std::stol(groupNode["GroupId"].asString());
if(!groupNode["GroupName"].isNull())
group_.groupName = groupNode["GroupName"].asString();
if(!groupNode["ServiceId"].isNull())
group_.serviceId = groupNode["ServiceId"].asString();
if(!groupNode["BindUrls"].isNull())
group_.bindUrls = groupNode["BindUrls"].asString();
if(!groupNode["Type"].isNull())
group_.type = groupNode["Type"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
{
Group::ContactGroup contactGroupObject;
if(!value["Name"].isNull())
contactGroupObject.name = value["Name"].asString();
group_.contactGroups.push_back(contactGroupObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<DeleteMyGroupsResult::Group> DeleteMyGroupsResult::getGroup()const
{
return group_;
}
int DeleteMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteMyGroupsResult::getSuccess()const
{
return success_;
}
DeleteMyGroupsResult::Group DeleteMyGroupsResult::getGroup()const
{
return group_;
}
int DeleteMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteMyGroupsResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DeleteNotifyPolicyRequest;
DeleteNotifyPolicyRequest::DeleteNotifyPolicyRequest() :
RpcServiceRequest("cms", "2017-03-01", "DeleteNotifyPolicy")
RpcServiceRequest("cms", "2018-03-08", "DeleteNotifyPolicy")
{}
DeleteNotifyPolicyRequest::~DeleteNotifyPolicyRequest()
@@ -47,6 +47,17 @@ void DeleteNotifyPolicyRequest::setAlertName(const std::string& alertName)
setParameter("AlertName", alertName);
}
std::string DeleteNotifyPolicyRequest::getGroupId()const
{
return groupId_;
}
void DeleteNotifyPolicyRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string DeleteNotifyPolicyRequest::getId()const
{
return id_;

View File

@@ -40,41 +40,34 @@ void DeleteNotifyPolicyResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["code"].isNull())
code_ = value["code"].asString();
if(!value["message"].isNull())
message_ = value["message"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString();
if(!value["traceId"].isNull())
traceId_ = value["traceId"].asString();
if(!value["result"].isNull())
result_ = std::stoi(value["result"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Result"].isNull())
result_ = std::stoi(value["Result"].asString());
}
std::string DeleteNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string DeleteNotifyPolicyResult::getTraceId()const
{
return traceId_;
}
std::string DeleteNotifyPolicyResult::getCode()const
{
return code_;
}
std::string DeleteNotifyPolicyResult::getSuccess()const
{
return success_;
}
int DeleteNotifyPolicyResult::getResult()const
{
return result_;
}
std::string DeleteNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string DeleteNotifyPolicyResult::getCode()const
{
return code_;
}
std::string DeleteNotifyPolicyResult::getSuccess()const
{
return success_;
}
int DeleteNotifyPolicyResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteTasksRequest.h>
using AlibabaCloud::Cms::Model::DeleteTasksRequest;
DeleteTasksRequest::DeleteTasksRequest() :
RpcServiceRequest("cms", "2018-03-08", "DeleteTasks")
{}
DeleteTasksRequest::~DeleteTasksRequest()
{}
int DeleteTasksRequest::getIsDeleteAlarms()const
{
return isDeleteAlarms_;
}
void DeleteTasksRequest::setIsDeleteAlarms(int isDeleteAlarms)
{
isDeleteAlarms_ = isDeleteAlarms;
setParameter("IsDeleteAlarms", std::to_string(isDeleteAlarms));
}
std::string DeleteTasksRequest::getTaskIds()const
{
return taskIds_;
}
void DeleteTasksRequest::setTaskIds(const std::string& taskIds)
{
taskIds_ = taskIds;
setParameter("TaskIds", taskIds);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DeleteTasksResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DeleteTasksResult::DeleteTasksResult() :
ServiceResult()
{}
DeleteTasksResult::DeleteTasksResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTasksResult::~DeleteTasksResult()
{}
void DeleteTasksResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string DeleteTasksResult::getMessage()const
{
return message_;
}
std::string DeleteTasksResult::getData()const
{
return data_;
}
std::string DeleteTasksResult::getCode()const
{
return code_;
}
std::string DeleteTasksResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DescribeAlarmHistoryRequest;
DescribeAlarmHistoryRequest::DescribeAlarmHistoryRequest() :
RpcServiceRequest("cms", "2017-03-01", "DescribeAlarmHistory")
RpcServiceRequest("cms", "2018-03-08", "DescribeAlarmHistory")
{}
DescribeAlarmHistoryRequest::~DescribeAlarmHistoryRequest()
@@ -88,7 +88,7 @@ bool DescribeAlarmHistoryRequest::getAscending()const
void DescribeAlarmHistoryRequest::setAscending(bool ascending)
{
ascending_ = ascending;
setParameter("Ascending", std::to_string(ascending));
setParameter("Ascending", ascending ? "true" : "false");
}
std::string DescribeAlarmHistoryRequest::getAccessKeyId()const
@@ -110,7 +110,7 @@ bool DescribeAlarmHistoryRequest::getOnlyCount()const
void DescribeAlarmHistoryRequest::setOnlyCount(bool onlyCount)
{
onlyCount_ = onlyCount;
setParameter("OnlyCount", std::to_string(onlyCount));
setParameter("OnlyCount", onlyCount ? "true" : "false");
}
std::string DescribeAlarmHistoryRequest::get_Namespace()const

View File

@@ -40,96 +40,98 @@ void DescribeAlarmHistoryResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAlarmHistoryList = value["AlarmHistoryList"]["AlarmHistory"];
for (auto value : allAlarmHistoryList)
{
AlarmHistory alarmHistoryListObject;
if(!value["Id"].isNull())
alarmHistoryListObject.id = value["Id"].asString();
if(!value["AlertName"].isNull())
alarmHistoryListObject.alertName = value["AlertName"].asString();
if(!value["GroupId"].isNull())
alarmHistoryListObject.groupId = value["GroupId"].asString();
if(!value["Namespace"].isNull())
alarmHistoryListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmHistoryListObject.metricName = value["MetricName"].asString();
if(!value["Dimensions"].isNull())
alarmHistoryListObject.dimensions = value["Dimensions"].asString();
if(!value["Expression"].isNull())
alarmHistoryListObject.expression = value["Expression"].asString();
if(!value["EvaluationCount"].isNull())
alarmHistoryListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["Value"].isNull())
alarmHistoryListObject.value = value["Value"].asString();
if(!value["AlertTime"].isNull())
alarmHistoryListObject.alertTime = std::stol(value["AlertTime"].asString());
if(!value["LastTime"].isNull())
alarmHistoryListObject.lastTime = std::stol(value["LastTime"].asString());
if(!value["Level"].isNull())
alarmHistoryListObject.level = value["Level"].asString();
if(!value["PreLevel"].isNull())
alarmHistoryListObject.preLevel = value["PreLevel"].asString();
if(!value["ruleName"].isNull())
alarmHistoryListObject.ruleName = value["ruleName"].asString();
if(!value["State"].isNull())
alarmHistoryListObject.state = value["State"].asString();
if(!value["Status"].isNull())
alarmHistoryListObject.status = std::stoi(value["Status"].asString());
if(!value["UserId"].isNull())
alarmHistoryListObject.userId = value["UserId"].asString();
if(!value["Webhooks"].isNull())
alarmHistoryListObject.webhooks = value["Webhooks"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
alarmHistoryListObject.contactGroups.push_back(value.asString());
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
alarmHistoryListObject.contacts.push_back(value.asString());
auto allContactALIIMs = value["ContactALIIMs"]["ContactALIIM"];
for (auto value : allContactALIIMs)
alarmHistoryListObject.contactALIIMs.push_back(value.asString());
auto allContactSmses = value["ContactSmses"]["ContactSms"];
for (auto value : allContactSmses)
alarmHistoryListObject.contactSmses.push_back(value.asString());
auto allContactMails = value["ContactMails"]["ContactMail"];
for (auto value : allContactMails)
alarmHistoryListObject.contactMails.push_back(value.asString());
alarmHistoryList_.push_back(alarmHistoryListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Total"].isNull())
total_ = value["Total"].asString();
auto allAlarmHistoryList = value["AlarmHistoryList"]["AlarmHistory"];
for (auto value : allAlarmHistoryList)
{
AlarmHistory alarmHistoryListObject;
if(!value["Id"].isNull())
alarmHistoryListObject.id = value["Id"].asString();
if(!value["AlertName"].isNull())
alarmHistoryListObject.alertName = value["AlertName"].asString();
if(!value["GroupId"].isNull())
alarmHistoryListObject.groupId = value["GroupId"].asString();
if(!value["Namespace"].isNull())
alarmHistoryListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmHistoryListObject.metricName = value["MetricName"].asString();
if(!value["Dimensions"].isNull())
alarmHistoryListObject.dimensions = value["Dimensions"].asString();
if(!value["Expression"].isNull())
alarmHistoryListObject.expression = value["Expression"].asString();
if(!value["EvaluationCount"].isNull())
alarmHistoryListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["Value"].isNull())
alarmHistoryListObject.value = value["Value"].asString();
if(!value["AlertTime"].isNull())
alarmHistoryListObject.alertTime = std::stol(value["AlertTime"].asString());
if(!value["LastTime"].isNull())
alarmHistoryListObject.lastTime = std::stol(value["LastTime"].asString());
if(!value["Level"].isNull())
alarmHistoryListObject.level = value["Level"].asString();
if(!value["PreLevel"].isNull())
alarmHistoryListObject.preLevel = value["PreLevel"].asString();
if(!value["RuleName"].isNull())
alarmHistoryListObject.ruleName = value["RuleName"].asString();
if(!value["State"].isNull())
alarmHistoryListObject.state = value["State"].asString();
if(!value["Status"].isNull())
alarmHistoryListObject.status = std::stoi(value["Status"].asString());
if(!value["UserId"].isNull())
alarmHistoryListObject.userId = value["UserId"].asString();
if(!value["Webhooks"].isNull())
alarmHistoryListObject.webhooks = value["Webhooks"].asString();
if(!value["InstanceName"].isNull())
alarmHistoryListObject.instanceName = value["InstanceName"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
alarmHistoryListObject.contactGroups.push_back(value.asString());
auto allContacts = value["Contacts"]["Contact"];
for (auto value : allContacts)
alarmHistoryListObject.contacts.push_back(value.asString());
auto allContactALIIMs = value["ContactALIIMs"]["ContactALIIM"];
for (auto value : allContactALIIMs)
alarmHistoryListObject.contactALIIMs.push_back(value.asString());
auto allContactSmses = value["ContactSmses"]["ContactSms"];
for (auto value : allContactSmses)
alarmHistoryListObject.contactSmses.push_back(value.asString());
auto allContactMails = value["ContactMails"]["ContactMail"];
for (auto value : allContactMails)
alarmHistoryListObject.contactMails.push_back(value.asString());
alarmHistoryList_.push_back(alarmHistoryListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Total"].isNull())
total_ = value["Total"].asString();
}
std::vector<DescribeAlarmHistoryResult::AlarmHistory> DescribeAlarmHistoryResult::getAlarmHistoryList()const
{
return alarmHistoryList_;
}
std::string DescribeAlarmHistoryResult::getMessage()const
{
return message_;
}
std::string DescribeAlarmHistoryResult::getTotal()const
{
return total_;
}
std::string DescribeAlarmHistoryResult::getCode()const
{
return code_;
}
bool DescribeAlarmHistoryResult::getSuccess()const
{
return success_;
}
std::vector<DescribeAlarmHistoryResult::AlarmHistory> DescribeAlarmHistoryResult::getAlarmHistoryList()const
{
return alarmHistoryList_;
}
std::string DescribeAlarmHistoryResult::getMessage()const
{
return message_;
}
std::string DescribeAlarmHistoryResult::getTotal()const
{
return total_;
}
std::string DescribeAlarmHistoryResult::getCode()const
{
return code_;
}
bool DescribeAlarmHistoryResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,115 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeAlarmsForResourcesRequest.h>
using AlibabaCloud::Cms::Model::DescribeAlarmsForResourcesRequest;
DescribeAlarmsForResourcesRequest::DescribeAlarmsForResourcesRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeAlarmsForResources")
{}
DescribeAlarmsForResourcesRequest::~DescribeAlarmsForResourcesRequest()
{}
bool DescribeAlarmsForResourcesRequest::getEnableState()const
{
return enableState_;
}
void DescribeAlarmsForResourcesRequest::setEnableState(bool enableState)
{
enableState_ = enableState;
setParameter("EnableState", enableState ? "true" : "false");
}
std::string DescribeAlarmsForResourcesRequest::getGroupId()const
{
return groupId_;
}
void DescribeAlarmsForResourcesRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string DescribeAlarmsForResourcesRequest::get_Namespace()const
{
return _namespace_;
}
void DescribeAlarmsForResourcesRequest::set_Namespace(const std::string& _namespace)
{
_namespace_ = _namespace;
setParameter("_Namespace", _namespace);
}
std::string DescribeAlarmsForResourcesRequest::getPageSize()const
{
return pageSize_;
}
void DescribeAlarmsForResourcesRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", pageSize);
}
std::string DescribeAlarmsForResourcesRequest::getAlertState()const
{
return alertState_;
}
void DescribeAlarmsForResourcesRequest::setAlertState(const std::string& alertState)
{
alertState_ = alertState;
setParameter("AlertState", alertState);
}
std::string DescribeAlarmsForResourcesRequest::getPage()const
{
return page_;
}
void DescribeAlarmsForResourcesRequest::setPage(const std::string& page)
{
page_ = page;
setParameter("Page", page);
}
std::string DescribeAlarmsForResourcesRequest::getMetricName()const
{
return metricName_;
}
void DescribeAlarmsForResourcesRequest::setMetricName(const std::string& metricName)
{
metricName_ = metricName;
setParameter("MetricName", metricName);
}
std::string DescribeAlarmsForResourcesRequest::getDimensions()const
{
return dimensions_;
}
void DescribeAlarmsForResourcesRequest::setDimensions(const std::string& dimensions)
{
dimensions_ = dimensions;
setParameter("Dimensions", dimensions);
}

View File

@@ -0,0 +1,170 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeAlarmsForResourcesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeAlarmsForResourcesResult::DescribeAlarmsForResourcesResult() :
ServiceResult()
{}
DescribeAlarmsForResourcesResult::DescribeAlarmsForResourcesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeAlarmsForResourcesResult::~DescribeAlarmsForResourcesResult()
{}
void DescribeAlarmsForResourcesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDatapoints = value["Datapoints"]["Alarm"];
for (auto value : allDatapoints)
{
Alarm datapointsObject;
if(!value["Uuid"].isNull())
datapointsObject.uuid = value["Uuid"].asString();
if(!value["Name"].isNull())
datapointsObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
datapointsObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
datapointsObject.metricName = value["MetricName"].asString();
if(!value["Period"].isNull())
datapointsObject.period = value["Period"].asString();
if(!value["EvaluationCount"].isNull())
datapointsObject.evaluationCount = value["EvaluationCount"].asString();
if(!value["EffectiveInterval"].isNull())
datapointsObject.effectiveInterval = value["EffectiveInterval"].asString();
if(!value["NoEffectiveInterval"].isNull())
datapointsObject.noEffectiveInterval = value["NoEffectiveInterval"].asString();
if(!value["SilenceTime"].isNull())
datapointsObject.silenceTime = value["SilenceTime"].asString();
if(!value["Enable"].isNull())
datapointsObject.enable = value["Enable"].asString() == "true";
if(!value["State"].isNull())
datapointsObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
datapointsObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
datapointsObject.webhook = value["Webhook"].asString();
if(!value["Subject"].isNull())
datapointsObject.subject = value["Subject"].asString();
if(!value["DisplayName"].isNull())
datapointsObject.displayName = value["DisplayName"].asString();
if(!value["Resources"].isNull())
datapointsObject.resources = value["Resources"].asString();
if(!value["Level"].isNull())
datapointsObject.level = value["Level"].asString();
if(!value["GroupId"].isNull())
datapointsObject.groupId = value["GroupId"].asString();
if(!value["GroupName"].isNull())
datapointsObject.groupName = value["GroupName"].asString();
if(!value["Statistics"].isNull())
datapointsObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
datapointsObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
datapointsObject.threshold = value["Threshold"].asString();
auto escalationsNode = value["Escalations"];
auto infoNode = escalationsNode["Info"];
if(!infoNode["ComparisonOperator"].isNull())
datapointsObject.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
if(!infoNode["Statistics"].isNull())
datapointsObject.escalations.info.statistics = infoNode["Statistics"].asString();
if(!infoNode["Threshold"].isNull())
datapointsObject.escalations.info.threshold = infoNode["Threshold"].asString();
if(!infoNode["Times"].isNull())
datapointsObject.escalations.info.times = infoNode["Times"].asString();
auto warnNode = escalationsNode["Warn"];
if(!warnNode["ComparisonOperator"].isNull())
datapointsObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
if(!warnNode["Statistics"].isNull())
datapointsObject.escalations.warn.statistics = warnNode["Statistics"].asString();
if(!warnNode["Threshold"].isNull())
datapointsObject.escalations.warn.threshold = warnNode["Threshold"].asString();
if(!warnNode["Times"].isNull())
datapointsObject.escalations.warn.times = warnNode["Times"].asString();
auto criticalNode = escalationsNode["Critical"];
if(!criticalNode["ComparisonOperator"].isNull())
datapointsObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
if(!criticalNode["Statistics"].isNull())
datapointsObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
if(!criticalNode["Threshold"].isNull())
datapointsObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
if(!criticalNode["Times"].isNull())
datapointsObject.escalations.critical.times = criticalNode["Times"].asString();
datapoints_.push_back(datapointsObject);
}
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Total"].isNull())
total_ = value["Total"].asString();
if(!value["Dimensions"].isNull())
dimensions_ = value["Dimensions"].asString();
}
std::string DescribeAlarmsForResourcesResult::getMessage()const
{
return message_;
}
std::string DescribeAlarmsForResourcesResult::getTotal()const
{
return total_;
}
std::string DescribeAlarmsForResourcesResult::getTraceId()const
{
return traceId_;
}
std::string DescribeAlarmsForResourcesResult::getDimensions()const
{
return dimensions_;
}
std::vector<DescribeAlarmsForResourcesResult::Alarm> DescribeAlarmsForResourcesResult::getDatapoints()const
{
return datapoints_;
}
int DescribeAlarmsForResourcesResult::getCode()const
{
return code_;
}
bool DescribeAlarmsForResourcesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,148 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeAlarmsRequest.h>
using AlibabaCloud::Cms::Model::DescribeAlarmsRequest;
DescribeAlarmsRequest::DescribeAlarmsRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeAlarms")
{}
DescribeAlarmsRequest::~DescribeAlarmsRequest()
{}
bool DescribeAlarmsRequest::getEnableState()const
{
return enableState_;
}
void DescribeAlarmsRequest::setEnableState(bool enableState)
{
enableState_ = enableState;
setParameter("EnableState", enableState ? "true" : "false");
}
std::string DescribeAlarmsRequest::getNames()const
{
return names_;
}
void DescribeAlarmsRequest::setNames(const std::string& names)
{
names_ = names;
setParameter("Names", names);
}
std::string DescribeAlarmsRequest::getDisplayName()const
{
return displayName_;
}
void DescribeAlarmsRequest::setDisplayName(const std::string& displayName)
{
displayName_ = displayName;
setParameter("DisplayName", displayName);
}
std::string DescribeAlarmsRequest::getGroupId()const
{
return groupId_;
}
void DescribeAlarmsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string DescribeAlarmsRequest::get_Namespace()const
{
return _namespace_;
}
void DescribeAlarmsRequest::set_Namespace(const std::string& _namespace)
{
_namespace_ = _namespace;
setParameter("_Namespace", _namespace);
}
std::string DescribeAlarmsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeAlarmsRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", pageSize);
}
std::string DescribeAlarmsRequest::getAlertState()const
{
return alertState_;
}
void DescribeAlarmsRequest::setAlertState(const std::string& alertState)
{
alertState_ = alertState;
setParameter("AlertState", alertState);
}
std::string DescribeAlarmsRequest::getNameKeyword()const
{
return nameKeyword_;
}
void DescribeAlarmsRequest::setNameKeyword(const std::string& nameKeyword)
{
nameKeyword_ = nameKeyword;
setParameter("NameKeyword", nameKeyword);
}
std::string DescribeAlarmsRequest::getGroupBy()const
{
return groupBy_;
}
void DescribeAlarmsRequest::setGroupBy(const std::string& groupBy)
{
groupBy_ = groupBy;
setParameter("GroupBy", groupBy);
}
std::string DescribeAlarmsRequest::getPage()const
{
return page_;
}
void DescribeAlarmsRequest::setPage(const std::string& page)
{
page_ = page;
setParameter("Page", page);
}
std::string DescribeAlarmsRequest::getMetricName()const
{
return metricName_;
}
void DescribeAlarmsRequest::setMetricName(const std::string& metricName)
{
metricName_ = metricName;
setParameter("MetricName", metricName);
}

View File

@@ -0,0 +1,167 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeAlarmsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeAlarmsResult::DescribeAlarmsResult() :
ServiceResult()
{}
DescribeAlarmsResult::DescribeAlarmsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeAlarmsResult::~DescribeAlarmsResult()
{}
void DescribeAlarmsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDatapoints = value["Datapoints"]["Alarm"];
for (auto value : allDatapoints)
{
Alarm datapointsObject;
if(!value["Uuid"].isNull())
datapointsObject.uuid = value["Uuid"].asString();
if(!value["Name"].isNull())
datapointsObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
datapointsObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
datapointsObject.metricName = value["MetricName"].asString();
if(!value["Period"].isNull())
datapointsObject.period = value["Period"].asString();
if(!value["EvaluationCount"].isNull())
datapointsObject.evaluationCount = value["EvaluationCount"].asString();
if(!value["EffectiveInterval"].isNull())
datapointsObject.effectiveInterval = value["EffectiveInterval"].asString();
if(!value["NoEffectiveInterval"].isNull())
datapointsObject.noEffectiveInterval = value["NoEffectiveInterval"].asString();
if(!value["SilenceTime"].isNull())
datapointsObject.silenceTime = value["SilenceTime"].asString();
if(!value["Enable"].isNull())
datapointsObject.enable = value["Enable"].asString() == "true";
if(!value["State"].isNull())
datapointsObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
datapointsObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
datapointsObject.webhook = value["Webhook"].asString();
if(!value["Subject"].isNull())
datapointsObject.subject = value["Subject"].asString();
if(!value["RuleName"].isNull())
datapointsObject.ruleName = value["RuleName"].asString();
if(!value["Resources"].isNull())
datapointsObject.resources = value["Resources"].asString();
if(!value["Level"].isNull())
datapointsObject.level = value["Level"].asString();
if(!value["GroupId"].isNull())
datapointsObject.groupId = value["GroupId"].asString();
if(!value["GroupName"].isNull())
datapointsObject.groupName = value["GroupName"].asString();
if(!value["Dimensions"].isNull())
datapointsObject.dimensions = value["Dimensions"].asString();
if(!value["Statistics"].isNull())
datapointsObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
datapointsObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
datapointsObject.threshold = value["Threshold"].asString();
if(!value["DisplayName"].isNull())
datapointsObject.displayName = value["DisplayName"].asString();
auto escalationsNode = value["Escalations"];
auto infoNode = escalationsNode["Info"];
if(!infoNode["ComparisonOperator"].isNull())
datapointsObject.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
if(!infoNode["Statistics"].isNull())
datapointsObject.escalations.info.statistics = infoNode["Statistics"].asString();
if(!infoNode["Threshold"].isNull())
datapointsObject.escalations.info.threshold = infoNode["Threshold"].asString();
if(!infoNode["Times"].isNull())
datapointsObject.escalations.info.times = infoNode["Times"].asString();
auto warnNode = escalationsNode["Warn"];
if(!warnNode["ComparisonOperator"].isNull())
datapointsObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
if(!warnNode["Statistics"].isNull())
datapointsObject.escalations.warn.statistics = warnNode["Statistics"].asString();
if(!warnNode["Threshold"].isNull())
datapointsObject.escalations.warn.threshold = warnNode["Threshold"].asString();
if(!warnNode["Times"].isNull())
datapointsObject.escalations.warn.times = warnNode["Times"].asString();
auto criticalNode = escalationsNode["Critical"];
if(!criticalNode["ComparisonOperator"].isNull())
datapointsObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
if(!criticalNode["Statistics"].isNull())
datapointsObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
if(!criticalNode["Threshold"].isNull())
datapointsObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
if(!criticalNode["Times"].isNull())
datapointsObject.escalations.critical.times = criticalNode["Times"].asString();
datapoints_.push_back(datapointsObject);
}
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Total"].isNull())
total_ = value["Total"].asString();
}
std::string DescribeAlarmsResult::getMessage()const
{
return message_;
}
std::string DescribeAlarmsResult::getTotal()const
{
return total_;
}
std::string DescribeAlarmsResult::getTraceId()const
{
return traceId_;
}
std::vector<DescribeAlarmsResult::Alarm> DescribeAlarmsResult::getDatapoints()const
{
return datapoints_;
}
int DescribeAlarmsResult::getCode()const
{
return code_;
}
bool DescribeAlarmsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeContactRequest.h>
using AlibabaCloud::Cms::Model::DescribeContactRequest;
DescribeContactRequest::DescribeContactRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeContact")
{}
DescribeContactRequest::~DescribeContactRequest()
{}
std::string DescribeContactRequest::getContactName()const
{
return contactName_;
}
void DescribeContactRequest::setContactName(const std::string& contactName)
{
contactName_ = contactName;
setParameter("ContactName", contactName);
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeContactResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeContactResult::DescribeContactResult() :
ServiceResult()
{}
DescribeContactResult::DescribeContactResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeContactResult::~DescribeContactResult()
{}
void DescribeContactResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto datapointsNode = value["Datapoints"];
if(!datapointsNode["Name"].isNull())
datapoints_.name = datapointsNode["Name"].asString();
auto allChannels = value["Channels"]["Channel"];
for (auto value : allChannels)
{
Datapoints::Channel channelObject;
if(!value["Type"].isNull())
channelObject.type = value["Type"].asString();
if(!value["Value"].isNull())
channelObject.value = value["Value"].asString();
datapoints_.channels.push_back(channelObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DescribeContactResult::getMessage()const
{
return message_;
}
DescribeContactResult::Datapoints DescribeContactResult::getDatapoints()const
{
return datapoints_;
}
int DescribeContactResult::getCode()const
{
return code_;
}
bool DescribeContactResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeEventRuleRequest.h>
using AlibabaCloud::Cms::Model::DescribeEventRuleRequest;
DescribeEventRuleRequest::DescribeEventRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeEventRule")
{}
DescribeEventRuleRequest::~DescribeEventRuleRequest()
{}
std::string DescribeEventRuleRequest::getRuleName()const
{
return ruleName_;
}
void DescribeEventRuleRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -0,0 +1,94 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeEventRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeEventRuleResult::DescribeEventRuleResult() :
ServiceResult()
{}
DescribeEventRuleResult::DescribeEventRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeEventRuleResult::~DescribeEventRuleResult()
{}
void DescribeEventRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["EventType"].isNull())
result_.eventType = resultNode["EventType"].asString();
if(!resultNode["GroupId"].isNull())
result_.groupId = resultNode["GroupId"].asString();
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
auto eventPatternNode = resultNode["EventPattern"];
if(!eventPatternNode["Product"].isNull())
result_.eventPattern.product = eventPatternNode["Product"].asString();
auto allNameList = eventPatternNode["NameList"]["NameList"];
for (auto value : allNameList)
result_.eventPattern.nameList.push_back(value.asString());
auto allStatusList = eventPatternNode["StatusList"]["StatusList"];
for (auto value : allStatusList)
result_.eventPattern.statusList.push_back(value.asString());
auto allLevelList = eventPatternNode["LevelList"]["LevelList"];
for (auto value : allLevelList)
result_.eventPattern.levelList.push_back(value.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DescribeEventRuleResult::getMessage()const
{
return message_;
}
std::string DescribeEventRuleResult::getCode()const
{
return code_;
}
bool DescribeEventRuleResult::getSuccess()const
{
return success_;
}
DescribeEventRuleResult::Result DescribeEventRuleResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeISPAreaCityRequest.h>
using AlibabaCloud::Cms::Model::DescribeISPAreaCityRequest;
DescribeISPAreaCityRequest::DescribeISPAreaCityRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeISPAreaCity")
{}
DescribeISPAreaCityRequest::~DescribeISPAreaCityRequest()
{}
std::string DescribeISPAreaCityRequest::getCity()const
{
return city_;
}
void DescribeISPAreaCityRequest::setCity(const std::string& city)
{
city_ = city;
setParameter("City", city);
}
std::string DescribeISPAreaCityRequest::getIsp()const
{
return isp_;
}
void DescribeISPAreaCityRequest::setIsp(const std::string& isp)
{
isp_ = isp;
setParameter("Isp", isp);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeISPAreaCityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeISPAreaCityResult::DescribeISPAreaCityResult() :
ServiceResult()
{}
DescribeISPAreaCityResult::DescribeISPAreaCityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeISPAreaCityResult::~DescribeISPAreaCityResult()
{}
void DescribeISPAreaCityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string DescribeISPAreaCityResult::getMessage()const
{
return message_;
}
std::string DescribeISPAreaCityResult::getData()const
{
return data_;
}
std::string DescribeISPAreaCityResult::getCode()const
{
return code_;
}
std::string DescribeISPAreaCityResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeTaskDetailRequest.h>
using AlibabaCloud::Cms::Model::DescribeTaskDetailRequest;
DescribeTaskDetailRequest::DescribeTaskDetailRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeTaskDetail")
{}
DescribeTaskDetailRequest::~DescribeTaskDetailRequest()
{}
std::string DescribeTaskDetailRequest::getTaskId()const
{
return taskId_;
}
void DescribeTaskDetailRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeTaskDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeTaskDetailResult::DescribeTaskDetailResult() :
ServiceResult()
{}
DescribeTaskDetailResult::DescribeTaskDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeTaskDetailResult::~DescribeTaskDetailResult()
{}
void DescribeTaskDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string DescribeTaskDetailResult::getMessage()const
{
return message_;
}
std::string DescribeTaskDetailResult::getData()const
{
return data_;
}
std::string DescribeTaskDetailResult::getCode()const
{
return code_;
}
std::string DescribeTaskDetailResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeTasksRequest.h>
using AlibabaCloud::Cms::Model::DescribeTasksRequest;
DescribeTasksRequest::DescribeTasksRequest() :
RpcServiceRequest("cms", "2018-03-08", "DescribeTasks")
{}
DescribeTasksRequest::~DescribeTasksRequest()
{}
std::string DescribeTasksRequest::getTaskType()const
{
return taskType_;
}
void DescribeTasksRequest::setTaskType(const std::string& taskType)
{
taskType_ = taskType;
setParameter("TaskType", taskType);
}
int DescribeTasksRequest::getPageSize()const
{
return pageSize_;
}
void DescribeTasksRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int DescribeTasksRequest::getPage()const
{
return page_;
}
void DescribeTasksRequest::setPage(int page)
{
page_ = page;
setParameter("Page", std::to_string(page));
}
std::string DescribeTasksRequest::getKeyword()const
{
return keyword_;
}
void DescribeTasksRequest::setKeyword(const std::string& keyword)
{
keyword_ = keyword;
setParameter("Keyword", keyword);
}
std::string DescribeTasksRequest::getTaskId()const
{
return taskId_;
}
void DescribeTasksRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}

View File

@@ -0,0 +1,94 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeTasksResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeTasksResult::DescribeTasksResult() :
ServiceResult()
{}
DescribeTasksResult::DescribeTasksResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeTasksResult::~DescribeTasksResult()
{}
void DescribeTasksResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int DescribeTasksResult::getTotalCount()const
{
return totalCount_;
}
std::string DescribeTasksResult::getMessage()const
{
return message_;
}
int DescribeTasksResult::getPageSize()const
{
return pageSize_;
}
int DescribeTasksResult::getPageNumber()const
{
return pageNumber_;
}
std::string DescribeTasksResult::getData()const
{
return data_;
}
std::string DescribeTasksResult::getCode()const
{
return code_;
}
std::string DescribeTasksResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::DisableActiveAlertRequest;
DisableActiveAlertRequest::DisableActiveAlertRequest() :
RpcServiceRequest("cms", "2017-03-01", "DisableActiveAlert")
RpcServiceRequest("cms", "2018-03-08", "DisableActiveAlert")
{}
DisableActiveAlertRequest::~DisableActiveAlertRequest()

View File

@@ -40,27 +40,27 @@ void DisableActiveAlertResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DisableActiveAlertResult::getMessage()const
{
return message_;
}
std::string DisableActiveAlertResult::getCode()const
{
return code_;
}
bool DisableActiveAlertResult::getSuccess()const
{
return success_;
}
std::string DisableActiveAlertResult::getMessage()const
{
return message_;
}
std::string DisableActiveAlertResult::getCode()const
{
return code_;
}
bool DisableActiveAlertResult::getSuccess()const
{
return success_;
}

View File

@@ -19,23 +19,12 @@
using AlibabaCloud::Cms::Model::DisableAlarmRequest;
DisableAlarmRequest::DisableAlarmRequest() :
RpcServiceRequest("cms", "2017-03-01", "DisableAlarm")
RpcServiceRequest("cms", "2018-03-08", "DisableAlarm")
{}
DisableAlarmRequest::~DisableAlarmRequest()
{}
std::string DisableAlarmRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void DisableAlarmRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
std::string DisableAlarmRequest::getId()const
{
return id_;

View File

@@ -40,27 +40,27 @@ void DisableAlarmResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DisableAlarmResult::getMessage()const
{
return message_;
}
std::string DisableAlarmResult::getCode()const
{
return code_;
}
bool DisableAlarmResult::getSuccess()const
{
return success_;
}
std::string DisableAlarmResult::getMessage()const
{
return message_;
}
std::string DisableAlarmResult::getCode()const
{
return code_;
}
bool DisableAlarmResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DisableEventRuleRequest.h>
using AlibabaCloud::Cms::Model::DisableEventRuleRequest;
DisableEventRuleRequest::DisableEventRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "DisableEventRule")
{}
DisableEventRuleRequest::~DisableEventRuleRequest()
{}
std::vector<std::string> DisableEventRuleRequest::getRuleNames()const
{
return ruleNames_;
}
void DisableEventRuleRequest::setRuleNames(const std::vector<std::string>& ruleNames)
{
ruleNames_ = ruleNames;
for(int i = 0; i!= ruleNames.size(); i++)
setParameter("RuleNames."+ std::to_string(i), ruleNames.at(i));
}
std::string DisableEventRuleRequest::getRuleName()const
{
return ruleName_;
}
void DisableEventRuleRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -14,53 +14,53 @@
* limitations under the License.
*/
#include <alibabacloud/cms/model/EnableActiceAlertResult.h>
#include <alibabacloud/cms/model/DisableEventRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
EnableActiceAlertResult::EnableActiceAlertResult() :
DisableEventRuleResult::DisableEventRuleResult() :
ServiceResult()
{}
EnableActiceAlertResult::EnableActiceAlertResult(const std::string &payload) :
DisableEventRuleResult::DisableEventRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableActiceAlertResult::~EnableActiceAlertResult()
DisableEventRuleResult::~DisableEventRuleResult()
{}
void EnableActiceAlertResult::parse(const std::string &payload)
void DisableEventRuleResult::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";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string EnableActiceAlertResult::getMessage()const
{
return message_;
}
std::string EnableActiceAlertResult::getCode()const
{
return code_;
}
bool EnableActiceAlertResult::getSuccess()const
{
return success_;
}
std::string DisableEventRuleResult::getMessage()const
{
return message_;
}
std::string DisableEventRuleResult::getCode()const
{
return code_;
}
bool DisableEventRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -1,49 +0,0 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/EnableActiceAlertRequest.h>
using AlibabaCloud::Cms::Model::EnableActiceAlertRequest;
EnableActiceAlertRequest::EnableActiceAlertRequest() :
RpcServiceRequest("cms", "2017-03-01", "EnableActiceAlert")
{}
EnableActiceAlertRequest::~EnableActiceAlertRequest()
{}
std::string EnableActiceAlertRequest::getProduct()const
{
return product_;
}
void EnableActiceAlertRequest::setProduct(const std::string& product)
{
product_ = product;
setParameter("Product", product);
}
std::string EnableActiceAlertRequest::getUserId()const
{
return userId_;
}
void EnableActiceAlertRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::EnableActiveAlertRequest;
EnableActiveAlertRequest::EnableActiveAlertRequest() :
RpcServiceRequest("cms", "2017-03-01", "EnableActiveAlert")
RpcServiceRequest("cms", "2018-03-08", "EnableActiveAlert")
{}
EnableActiveAlertRequest::~EnableActiveAlertRequest()

View File

@@ -40,27 +40,27 @@ void EnableActiveAlertResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string EnableActiveAlertResult::getMessage()const
{
return message_;
}
std::string EnableActiveAlertResult::getCode()const
{
return code_;
}
bool EnableActiveAlertResult::getSuccess()const
{
return success_;
}
std::string EnableActiveAlertResult::getMessage()const
{
return message_;
}
std::string EnableActiveAlertResult::getCode()const
{
return code_;
}
bool EnableActiveAlertResult::getSuccess()const
{
return success_;
}

View File

@@ -19,23 +19,12 @@
using AlibabaCloud::Cms::Model::EnableAlarmRequest;
EnableAlarmRequest::EnableAlarmRequest() :
RpcServiceRequest("cms", "2017-03-01", "EnableAlarm")
RpcServiceRequest("cms", "2018-03-08", "EnableAlarm")
{}
EnableAlarmRequest::~EnableAlarmRequest()
{}
std::string EnableAlarmRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void EnableAlarmRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
std::string EnableAlarmRequest::getId()const
{
return id_;

View File

@@ -40,27 +40,27 @@ void EnableAlarmResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string EnableAlarmResult::getMessage()const
{
return message_;
}
std::string EnableAlarmResult::getCode()const
{
return code_;
}
bool EnableAlarmResult::getSuccess()const
{
return success_;
}
std::string EnableAlarmResult::getMessage()const
{
return message_;
}
std::string EnableAlarmResult::getCode()const
{
return code_;
}
bool EnableAlarmResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/EnableEventRuleRequest.h>
using AlibabaCloud::Cms::Model::EnableEventRuleRequest;
EnableEventRuleRequest::EnableEventRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "EnableEventRule")
{}
EnableEventRuleRequest::~EnableEventRuleRequest()
{}
std::vector<std::string> EnableEventRuleRequest::getRuleNames()const
{
return ruleNames_;
}
void EnableEventRuleRequest::setRuleNames(const std::vector<std::string>& ruleNames)
{
ruleNames_ = ruleNames;
for(int i = 0; i!= ruleNames.size(); i++)
setParameter("RuleNames."+ std::to_string(i), ruleNames.at(i));
}
std::string EnableEventRuleRequest::getRuleName()const
{
return ruleName_;
}
void EnableEventRuleRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/EnableEventRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
EnableEventRuleResult::EnableEventRuleResult() :
ServiceResult()
{}
EnableEventRuleResult::EnableEventRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableEventRuleResult::~EnableEventRuleResult()
{}
void EnableEventRuleResult::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";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string EnableEventRuleResult::getMessage()const
{
return message_;
}
std::string EnableEventRuleResult::getCode()const
{
return code_;
}
bool EnableEventRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -14,25 +14,25 @@
* limitations under the License.
*/
#include <alibabacloud/cms/model/PutSystemEventRequest.h>
#include <alibabacloud/cms/model/GetContactsRequest.h>
using AlibabaCloud::Cms::Model::PutSystemEventRequest;
using AlibabaCloud::Cms::Model::GetContactsRequest;
PutSystemEventRequest::PutSystemEventRequest() :
RpcServiceRequest("cms", "2017-03-01", "PutSystemEvent")
GetContactsRequest::GetContactsRequest() :
RpcServiceRequest("cms", "2018-03-08", "GetContacts")
{}
PutSystemEventRequest::~PutSystemEventRequest()
GetContactsRequest::~GetContactsRequest()
{}
std::string PutSystemEventRequest::getEventInfo()const
std::string GetContactsRequest::getGroupName()const
{
return eventInfo_;
return groupName_;
}
void PutSystemEventRequest::setEventInfo(const std::string& eventInfo)
void GetContactsRequest::setGroupName(const std::string& groupName)
{
eventInfo_ = eventInfo;
setParameter("EventInfo", eventInfo);
groupName_ = groupName;
setParameter("GroupName", groupName);
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/GetContactsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
GetContactsResult::GetContactsResult() :
ServiceResult()
{}
GetContactsResult::GetContactsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetContactsResult::~GetContactsResult()
{}
void GetContactsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto datapointsNode = value["Datapoints"];
if(!datapointsNode["Name"].isNull())
datapoints_.name = datapointsNode["Name"].asString();
auto allContacts = datapointsNode["Contacts"]["Contact"];
for (auto value : allContacts)
datapoints_.contacts.push_back(value.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string GetContactsResult::getMessage()const
{
return message_;
}
int GetContactsResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
GetContactsResult::Datapoints GetContactsResult::getDatapoints()const
{
return datapoints_;
}
int GetContactsResult::getCode()const
{
return code_;
}
bool GetContactsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/GetMonitoringTemplateRequest.h>
using AlibabaCloud::Cms::Model::GetMonitoringTemplateRequest;
GetMonitoringTemplateRequest::GetMonitoringTemplateRequest() :
RpcServiceRequest("cms", "2018-03-08", "GetMonitoringTemplate")
{}
GetMonitoringTemplateRequest::~GetMonitoringTemplateRequest()
{}
std::string GetMonitoringTemplateRequest::getName()const
{
return name_;
}
void GetMonitoringTemplateRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string GetMonitoringTemplateRequest::getId()const
{
return id_;
}
void GetMonitoringTemplateRequest::setId(const std::string& id)
{
id_ = id;
setParameter("Id", id);
}

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/GetMonitoringTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
GetMonitoringTemplateResult::GetMonitoringTemplateResult() :
ServiceResult()
{}
GetMonitoringTemplateResult::GetMonitoringTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMonitoringTemplateResult::~GetMonitoringTemplateResult()
{}
void GetMonitoringTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resourceNode = value["Resource"];
if(!resourceNode["Name"].isNull())
resource_.name = resourceNode["Name"].asString();
if(!resourceNode["Id"].isNull())
resource_.id = resourceNode["Id"].asString();
if(!resourceNode["RestVersion"].isNull())
resource_.restVersion = resourceNode["RestVersion"].asString();
if(!resourceNode["Namespace"].isNull())
resource_._namespace = resourceNode["Namespace"].asString();
if(!resourceNode["Description"].isNull())
resource_.description = resourceNode["Description"].asString();
if(!resourceNode["AlertTemplatesJson"].isNull())
resource_.alertTemplatesJson = resourceNode["AlertTemplatesJson"].asString();
if(!resourceNode["EventRuleTemplatesJson"].isNull())
resource_.eventRuleTemplatesJson = resourceNode["EventRuleTemplatesJson"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
GetMonitoringTemplateResult::Resource GetMonitoringTemplateResult::getResource()const
{
return resource_;
}
int GetMonitoringTemplateResult::getErrorCode()const
{
return errorCode_;
}
std::string GetMonitoringTemplateResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetMonitoringTemplateResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/GetMyGroupAlertRequest.h>
using AlibabaCloud::Cms::Model::GetMyGroupAlertRequest;
GetMyGroupAlertRequest::GetMyGroupAlertRequest() :
RpcServiceRequest("cms", "2018-03-08", "GetMyGroupAlert")
{}
GetMyGroupAlertRequest::~GetMyGroupAlertRequest()
{}
long GetMyGroupAlertRequest::getGroupId()const
{
return groupId_;
}
void GetMyGroupAlertRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string GetMyGroupAlertRequest::getAlertName()const
{
return alertName_;
}
void GetMyGroupAlertRequest::setAlertName(const std::string& alertName)
{
alertName_ = alertName;
setParameter("AlertName", alertName);
}

View File

@@ -0,0 +1,132 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/GetMyGroupAlertResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
GetMyGroupAlertResult::GetMyGroupAlertResult() :
ServiceResult()
{}
GetMyGroupAlertResult::GetMyGroupAlertResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMyGroupAlertResult::~GetMyGroupAlertResult()
{}
void GetMyGroupAlertResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto groupAlertNode = value["GroupAlert"];
if(!groupAlertNode["GroupId"].isNull())
groupAlert_.groupId = groupAlertNode["GroupId"].asString();
if(!groupAlertNode["AlertName"].isNull())
groupAlert_.alertName = groupAlertNode["AlertName"].asString();
if(!groupAlertNode["DisplayName"].isNull())
groupAlert_.displayName = groupAlertNode["DisplayName"].asString();
if(!groupAlertNode["Subject"].isNull())
groupAlert_.subject = groupAlertNode["Subject"].asString();
if(!groupAlertNode["Webhook"].isNull())
groupAlert_.webhook = groupAlertNode["Webhook"].asString();
if(!groupAlertNode["Category"].isNull())
groupAlert_.category = groupAlertNode["Category"].asString();
if(!groupAlertNode["Namespace"].isNull())
groupAlert_._namespace = groupAlertNode["Namespace"].asString();
if(!groupAlertNode["MetricName"].isNull())
groupAlert_.metricName = groupAlertNode["MetricName"].asString();
if(!groupAlertNode["Period"].isNull())
groupAlert_.period = std::stoi(groupAlertNode["Period"].asString());
if(!groupAlertNode["State"].isNull())
groupAlert_.state = groupAlertNode["State"].asString();
if(!groupAlertNode["Description"].isNull())
groupAlert_.description = groupAlertNode["Description"].asString();
if(!groupAlertNode["Enable"].isNull())
groupAlert_.enable = groupAlertNode["Enable"].asString() == "true";
if(!groupAlertNode["SilenceTime"].isNull())
groupAlert_.silenceTime = std::stoi(groupAlertNode["SilenceTime"].asString());
if(!groupAlertNode["EnableEndTime"].isNull())
groupAlert_.enableEndTime = groupAlertNode["EnableEndTime"].asString();
if(!groupAlertNode["EnableStartTime"].isNull())
groupAlert_.enableStartTime = groupAlertNode["EnableStartTime"].asString();
if(!groupAlertNode["Selector"].isNull())
groupAlert_.selector = groupAlertNode["Selector"].asString();
auto escalationsNode = groupAlertNode["Escalations"];
auto infoNode = escalationsNode["Info"];
if(!infoNode["Statistics"].isNull())
groupAlert_.escalations.info.statistics = infoNode["Statistics"].asString();
if(!infoNode["ComparisonOperator"].isNull())
groupAlert_.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
if(!infoNode["Threshold"].isNull())
groupAlert_.escalations.info.threshold = infoNode["Threshold"].asString();
if(!infoNode["Times"].isNull())
groupAlert_.escalations.info.times = std::stoi(infoNode["Times"].asString());
auto warnNode = escalationsNode["Warn"];
if(!warnNode["Statistics"].isNull())
groupAlert_.escalations.warn.statistics = warnNode["Statistics"].asString();
if(!warnNode["ComparisonOperator"].isNull())
groupAlert_.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
if(!warnNode["Threshold"].isNull())
groupAlert_.escalations.warn.threshold = warnNode["Threshold"].asString();
if(!warnNode["Times"].isNull())
groupAlert_.escalations.warn.times = std::stoi(warnNode["Times"].asString());
auto criticalNode = escalationsNode["Critical"];
if(!criticalNode["Statistics"].isNull())
groupAlert_.escalations.critical.statistics = criticalNode["Statistics"].asString();
if(!criticalNode["ComparisonOperator"].isNull())
groupAlert_.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
if(!criticalNode["Threshold"].isNull())
groupAlert_.escalations.critical.threshold = criticalNode["Threshold"].asString();
if(!criticalNode["Times"].isNull())
groupAlert_.escalations.critical.times = std::stoi(criticalNode["Times"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
GetMyGroupAlertResult::GroupAlert GetMyGroupAlertResult::getGroupAlert()const
{
return groupAlert_;
}
int GetMyGroupAlertResult::getErrorCode()const
{
return errorCode_;
}
std::string GetMyGroupAlertResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetMyGroupAlertResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::GetMyGroupsRequest;
GetMyGroupsRequest::GetMyGroupsRequest() :
RpcServiceRequest("cms", "2017-03-01", "GetMyGroups")
RpcServiceRequest("cms", "2018-03-08", "GetMyGroups")
{}
GetMyGroupsRequest::~GetMyGroupsRequest()
@@ -33,7 +33,7 @@ bool GetMyGroupsRequest::getSelectContactGroups()const
void GetMyGroupsRequest::setSelectContactGroups(bool selectContactGroups)
{
selectContactGroups_ = selectContactGroups;
setParameter("SelectContactGroups", std::to_string(selectContactGroups));
setParameter("SelectContactGroups", selectContactGroups ? "true" : "false");
}
std::string GetMyGroupsRequest::getInstanceId()const

View File

@@ -40,56 +40,51 @@ void GetMyGroupsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allGroup = value["Group"];
for (auto value : allGroup)
{
Group groupObject;
if(!value["GroupId"].isNull())
groupObject.groupId = std::stol(value["GroupId"].asString());
if(!value["GroupName"].isNull())
groupObject.groupName = value["GroupName"].asString();
if(!value["ServiceId"].isNull())
groupObject.serviceId = std::stol(value["ServiceId"].asString());
if(!value["BindUrl"].isNull())
groupObject.bindUrl = value["BindUrl"].asString();
if(!value["Type"].isNull())
groupObject.type = value["Type"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
{
Group::ContactGroup contactGroupObject;
if(!value["Name"].isNull())
contactGroupObject.name = value["Name"].asString();
groupObject.contactGroups.push_back(contactGroupObject);
}
group_.push_back(groupObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
auto groupNode = value["Group"];
if(!groupNode["GroupId"].isNull())
group_.groupId = std::stol(groupNode["GroupId"].asString());
if(!groupNode["GroupName"].isNull())
group_.groupName = groupNode["GroupName"].asString();
if(!groupNode["ServiceId"].isNull())
group_.serviceId = std::stol(groupNode["ServiceId"].asString());
if(!groupNode["BindUrl"].isNull())
group_.bindUrl = groupNode["BindUrl"].asString();
if(!groupNode["Type"].isNull())
group_.type = groupNode["Type"].asString();
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (auto value : allContactGroups)
{
Group::ContactGroup contactGroupObject;
if(!value["Name"].isNull())
contactGroupObject.name = value["Name"].asString();
group_.contactGroups.push_back(contactGroupObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<GetMyGroupsResult::Group> GetMyGroupsResult::getGroup()const
{
return group_;
}
int GetMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string GetMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetMyGroupsResult::getSuccess()const
{
return success_;
}
GetMyGroupsResult::Group GetMyGroupsResult::getGroup()const
{
return group_;
}
int GetMyGroupsResult::getErrorCode()const
{
return errorCode_;
}
std::string GetMyGroupsResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetMyGroupsResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::GetNotifyPolicyRequest;
GetNotifyPolicyRequest::GetNotifyPolicyRequest() :
RpcServiceRequest("cms", "2017-03-01", "GetNotifyPolicy")
RpcServiceRequest("cms", "2018-03-08", "GetNotifyPolicy")
{}
GetNotifyPolicyRequest::~GetNotifyPolicyRequest()
@@ -47,6 +47,17 @@ void GetNotifyPolicyRequest::setAlertName(const std::string& alertName)
setParameter("AlertName", alertName);
}
std::string GetNotifyPolicyRequest::getGroupId()const
{
return groupId_;
}
void GetNotifyPolicyRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string GetNotifyPolicyRequest::getId()const
{
return id_;

View File

@@ -40,57 +40,47 @@ void GetNotifyPolicyResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResult = value["Result"];
for (auto value : allResult)
{
Result resultObject;
if(!value["AlertName"].isNull())
resultObject.alertName = value["AlertName"].asString();
if(!value["Dimensions"].isNull())
resultObject.dimensions = value["Dimensions"].asString();
if(!value["Type"].isNull())
resultObject.type = value["Type"].asString();
if(!value["Id"].isNull())
resultObject.id = value["Id"].asString();
if(!value["StartTime"].isNull())
resultObject.startTime = std::stol(value["StartTime"].asString());
if(!value["EndTime"].isNull())
resultObject.endTime = std::stol(value["EndTime"].asString());
result_.push_back(resultObject);
}
if(!value["code"].isNull())
code_ = value["code"].asString();
if(!value["message"].isNull())
message_ = value["message"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString();
if(!value["traceId"].isNull())
traceId_ = value["traceId"].asString();
auto resultNode = value["Result"];
if(!resultNode["AlertName"].isNull())
result_.alertName = resultNode["AlertName"].asString();
if(!resultNode["Dimensions"].isNull())
result_.dimensions = resultNode["Dimensions"].asString();
if(!resultNode["Type"].isNull())
result_.type = resultNode["Type"].asString();
if(!resultNode["Id"].isNull())
result_.id = resultNode["Id"].asString();
if(!resultNode["StartTime"].isNull())
result_.startTime = std::stol(resultNode["StartTime"].asString());
if(!resultNode["EndTime"].isNull())
result_.endTime = std::stol(resultNode["EndTime"].asString());
if(!resultNode["GroupId"].isNull())
result_.groupId = resultNode["GroupId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
}
std::string GetNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string GetNotifyPolicyResult::getTraceId()const
{
return traceId_;
}
std::string GetNotifyPolicyResult::getCode()const
{
return code_;
}
std::string GetNotifyPolicyResult::getSuccess()const
{
return success_;
}
std::vector<GetNotifyPolicyResult::Result> GetNotifyPolicyResult::getResult()const
{
return result_;
}
std::string GetNotifyPolicyResult::getMessage()const
{
return message_;
}
std::string GetNotifyPolicyResult::getCode()const
{
return code_;
}
std::string GetNotifyPolicyResult::getSuccess()const
{
return success_;
}
GetNotifyPolicyResult::Result GetNotifyPolicyResult::getResult()const
{
return result_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListActiveAlertRuleRequest;
ListActiveAlertRuleRequest::ListActiveAlertRuleRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListActiveAlertRule")
RpcServiceRequest("cms", "2018-03-08", "ListActiveAlertRule")
{}
ListActiveAlertRuleRequest::~ListActiveAlertRuleRequest()

View File

@@ -40,74 +40,74 @@ void ListActiveAlertRuleResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDatapoints = value["Datapoints"]["Alarm"];
for (auto value : allDatapoints)
{
Alarm datapointsObject;
if(!value["Uuid"].isNull())
datapointsObject.uuid = value["Uuid"].asString();
if(!value["Name"].isNull())
datapointsObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
datapointsObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
datapointsObject.metricName = value["MetricName"].asString();
if(!value["Period"].isNull())
datapointsObject.period = value["Period"].asString();
if(!value["Statistics"].isNull())
datapointsObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
datapointsObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
datapointsObject.threshold = value["Threshold"].asString();
if(!value["EvaluationCount"].isNull())
datapointsObject.evaluationCount = value["EvaluationCount"].asString();
if(!value["StartTime"].isNull())
datapointsObject.startTime = value["StartTime"].asString();
if(!value["EndTime"].isNull())
datapointsObject.endTime = value["EndTime"].asString();
if(!value["SilenceTime"].isNull())
datapointsObject.silenceTime = value["SilenceTime"].asString();
if(!value["NotifyType"].isNull())
datapointsObject.notifyType = value["NotifyType"].asString();
if(!value["Enable"].isNull())
datapointsObject.enable = value["Enable"].asString();
if(!value["State"].isNull())
datapointsObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
datapointsObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
datapointsObject.webhook = value["Webhook"].asString();
if(!value["RuleName"].isNull())
datapointsObject.ruleName = value["RuleName"].asString();
datapoints_.push_back(datapointsObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
auto allDatapoints = value["Datapoints"]["Alarm"];
for (auto value : allDatapoints)
{
Alarm datapointsObject;
if(!value["Uuid"].isNull())
datapointsObject.uuid = value["Uuid"].asString();
if(!value["Name"].isNull())
datapointsObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
datapointsObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
datapointsObject.metricName = value["MetricName"].asString();
if(!value["Period"].isNull())
datapointsObject.period = value["Period"].asString();
if(!value["Statistics"].isNull())
datapointsObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
datapointsObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
datapointsObject.threshold = value["Threshold"].asString();
if(!value["EvaluationCount"].isNull())
datapointsObject.evaluationCount = value["EvaluationCount"].asString();
if(!value["StartTime"].isNull())
datapointsObject.startTime = value["StartTime"].asString();
if(!value["EndTime"].isNull())
datapointsObject.endTime = value["EndTime"].asString();
if(!value["SilenceTime"].isNull())
datapointsObject.silenceTime = value["SilenceTime"].asString();
if(!value["NotifyType"].isNull())
datapointsObject.notifyType = value["NotifyType"].asString();
if(!value["Enable"].isNull())
datapointsObject.enable = value["Enable"].asString();
if(!value["State"].isNull())
datapointsObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
datapointsObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
datapointsObject.webhook = value["Webhook"].asString();
if(!value["RuleName"].isNull())
datapointsObject.ruleName = value["RuleName"].asString();
datapoints_.push_back(datapointsObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListActiveAlertRuleResult::getMessage()const
{
return message_;
}
std::vector<ListActiveAlertRuleResult::Alarm> ListActiveAlertRuleResult::getDatapoints()const
{
return datapoints_;
}
std::string ListActiveAlertRuleResult::getCode()const
{
return code_;
}
bool ListActiveAlertRuleResult::getSuccess()const
{
return success_;
}
std::string ListActiveAlertRuleResult::getMessage()const
{
return message_;
}
std::vector<ListActiveAlertRuleResult::Alarm> ListActiveAlertRuleResult::getDatapoints()const
{
return datapoints_;
}
std::string ListActiveAlertRuleResult::getCode()const
{
return code_;
}
bool ListActiveAlertRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListAlarmHistoryRequest;
ListAlarmHistoryRequest::ListAlarmHistoryRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListAlarmHistory")
RpcServiceRequest("cms", "2018-03-08", "ListAlarmHistory")
{}
ListAlarmHistoryRequest::~ListAlarmHistoryRequest()
@@ -36,17 +36,6 @@ void ListAlarmHistoryRequest::setCursor(const std::string& cursor)
setParameter("Cursor", cursor);
}
std::string ListAlarmHistoryRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void ListAlarmHistoryRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
int ListAlarmHistoryRequest::getSize()const
{
return size_;

View File

@@ -40,69 +40,71 @@ void ListAlarmHistoryResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAlarmHistoryList = value["AlarmHistoryList"]["AlarmHistory"];
for (auto value : allAlarmHistoryList)
{
AlarmHistory alarmHistoryListObject;
if(!value["Id"].isNull())
alarmHistoryListObject.id = value["Id"].asString();
if(!value["Name"].isNull())
alarmHistoryListObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
alarmHistoryListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmHistoryListObject.metricName = value["MetricName"].asString();
if(!value["Dimension"].isNull())
alarmHistoryListObject.dimension = value["Dimension"].asString();
if(!value["EvaluationCount"].isNull())
alarmHistoryListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["Value"].isNull())
alarmHistoryListObject.value = value["Value"].asString();
if(!value["AlarmTime"].isNull())
alarmHistoryListObject.alarmTime = std::stol(value["AlarmTime"].asString());
if(!value["LastTime"].isNull())
alarmHistoryListObject.lastTime = std::stol(value["LastTime"].asString());
if(!value["State"].isNull())
alarmHistoryListObject.state = value["State"].asString();
if(!value["Status"].isNull())
alarmHistoryListObject.status = std::stoi(value["Status"].asString());
if(!value["ContactGroups"].isNull())
alarmHistoryListObject.contactGroups = value["ContactGroups"].asString();
alarmHistoryList_.push_back(alarmHistoryListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Cursor"].isNull())
cursor_ = value["Cursor"].asString();
auto allAlarmHistoryList = value["AlarmHistoryList"]["AlarmHistory"];
for (auto value : allAlarmHistoryList)
{
AlarmHistory alarmHistoryListObject;
if(!value["Id"].isNull())
alarmHistoryListObject.id = value["Id"].asString();
if(!value["Name"].isNull())
alarmHistoryListObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
alarmHistoryListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmHistoryListObject.metricName = value["MetricName"].asString();
if(!value["Dimension"].isNull())
alarmHistoryListObject.dimension = value["Dimension"].asString();
if(!value["EvaluationCount"].isNull())
alarmHistoryListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["Value"].isNull())
alarmHistoryListObject.value = value["Value"].asString();
if(!value["AlarmTime"].isNull())
alarmHistoryListObject.alarmTime = std::stol(value["AlarmTime"].asString());
if(!value["LastTime"].isNull())
alarmHistoryListObject.lastTime = std::stol(value["LastTime"].asString());
if(!value["State"].isNull())
alarmHistoryListObject.state = value["State"].asString();
if(!value["Status"].isNull())
alarmHistoryListObject.status = std::stoi(value["Status"].asString());
if(!value["ContactGroups"].isNull())
alarmHistoryListObject.contactGroups = value["ContactGroups"].asString();
if(!value["InstanceName"].isNull())
alarmHistoryListObject.instanceName = value["InstanceName"].asString();
alarmHistoryList_.push_back(alarmHistoryListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Cursor"].isNull())
cursor_ = value["Cursor"].asString();
}
std::vector<ListAlarmHistoryResult::AlarmHistory> ListAlarmHistoryResult::getAlarmHistoryList()const
{
return alarmHistoryList_;
}
std::string ListAlarmHistoryResult::getMessage()const
{
return message_;
}
std::string ListAlarmHistoryResult::getCursor()const
{
return cursor_;
}
std::string ListAlarmHistoryResult::getCode()const
{
return code_;
}
bool ListAlarmHistoryResult::getSuccess()const
{
return success_;
}
std::vector<ListAlarmHistoryResult::AlarmHistory> ListAlarmHistoryResult::getAlarmHistoryList()const
{
return alarmHistoryList_;
}
std::string ListAlarmHistoryResult::getMessage()const
{
return message_;
}
std::string ListAlarmHistoryResult::getCursor()const
{
return cursor_;
}
std::string ListAlarmHistoryResult::getCode()const
{
return code_;
}
bool ListAlarmHistoryResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListAlarmRequest;
ListAlarmRequest::ListAlarmRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListAlarm")
RpcServiceRequest("cms", "2018-03-08", "ListAlarm")
{}
ListAlarmRequest::~ListAlarmRequest()
@@ -33,18 +33,7 @@ bool ListAlarmRequest::getIsEnable()const
void ListAlarmRequest::setIsEnable(bool isEnable)
{
isEnable_ = isEnable;
setParameter("IsEnable", std::to_string(isEnable));
}
std::string ListAlarmRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void ListAlarmRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
setParameter("IsEnable", isEnable ? "true" : "false");
}
std::string ListAlarmRequest::getName()const

View File

@@ -40,88 +40,88 @@ void ListAlarmResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allAlarmList = value["AlarmList"]["Alarm"];
for (auto value : allAlarmList)
{
Alarm alarmListObject;
if(!value["Id"].isNull())
alarmListObject.id = value["Id"].asString();
if(!value["Name"].isNull())
alarmListObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
alarmListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmListObject.metricName = value["MetricName"].asString();
if(!value["Dimensions"].isNull())
alarmListObject.dimensions = value["Dimensions"].asString();
if(!value["Period"].isNull())
alarmListObject.period = std::stoi(value["Period"].asString());
if(!value["Statistics"].isNull())
alarmListObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
alarmListObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
alarmListObject.threshold = value["Threshold"].asString();
if(!value["EvaluationCount"].isNull())
alarmListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["StartTime"].isNull())
alarmListObject.startTime = std::stoi(value["StartTime"].asString());
if(!value["EndTime"].isNull())
alarmListObject.endTime = std::stoi(value["EndTime"].asString());
if(!value["SilenceTime"].isNull())
alarmListObject.silenceTime = std::stoi(value["SilenceTime"].asString());
if(!value["NotifyType"].isNull())
alarmListObject.notifyType = std::stoi(value["NotifyType"].asString());
if(!value["Enable"].isNull())
alarmListObject.enable = value["Enable"].asString() == "true";
if(!value["State"].isNull())
alarmListObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
alarmListObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
alarmListObject.webhook = value["Webhook"].asString();
alarmList_.push_back(alarmListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["NextToken"].isNull())
nextToken_ = std::stoi(value["NextToken"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
auto allAlarmList = value["AlarmList"]["Alarm"];
for (auto value : allAlarmList)
{
Alarm alarmListObject;
if(!value["Id"].isNull())
alarmListObject.id = value["Id"].asString();
if(!value["Name"].isNull())
alarmListObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
alarmListObject._namespace = value["Namespace"].asString();
if(!value["MetricName"].isNull())
alarmListObject.metricName = value["MetricName"].asString();
if(!value["Dimensions"].isNull())
alarmListObject.dimensions = value["Dimensions"].asString();
if(!value["Period"].isNull())
alarmListObject.period = std::stoi(value["Period"].asString());
if(!value["Statistics"].isNull())
alarmListObject.statistics = value["Statistics"].asString();
if(!value["ComparisonOperator"].isNull())
alarmListObject.comparisonOperator = value["ComparisonOperator"].asString();
if(!value["Threshold"].isNull())
alarmListObject.threshold = value["Threshold"].asString();
if(!value["EvaluationCount"].isNull())
alarmListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
if(!value["StartTime"].isNull())
alarmListObject.startTime = std::stoi(value["StartTime"].asString());
if(!value["EndTime"].isNull())
alarmListObject.endTime = std::stoi(value["EndTime"].asString());
if(!value["SilenceTime"].isNull())
alarmListObject.silenceTime = std::stoi(value["SilenceTime"].asString());
if(!value["NotifyType"].isNull())
alarmListObject.notifyType = std::stoi(value["NotifyType"].asString());
if(!value["Enable"].isNull())
alarmListObject.enable = value["Enable"].asString() == "true";
if(!value["State"].isNull())
alarmListObject.state = value["State"].asString();
if(!value["ContactGroups"].isNull())
alarmListObject.contactGroups = value["ContactGroups"].asString();
if(!value["Webhook"].isNull())
alarmListObject.webhook = value["Webhook"].asString();
alarmList_.push_back(alarmListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["NextToken"].isNull())
nextToken_ = std::stoi(value["NextToken"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
std::string ListAlarmResult::getMessage()const
{
return message_;
}
int ListAlarmResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListAlarmResult::Alarm> ListAlarmResult::getAlarmList()const
{
return alarmList_;
}
int ListAlarmResult::getTotal()const
{
return total_;
}
std::string ListAlarmResult::getCode()const
{
return code_;
}
bool ListAlarmResult::getSuccess()const
{
return success_;
}
std::string ListAlarmResult::getMessage()const
{
return message_;
}
int ListAlarmResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListAlarmResult::Alarm> ListAlarmResult::getAlarmList()const
{
return alarmList_;
}
int ListAlarmResult::getTotal()const
{
return total_;
}
std::string ListAlarmResult::getCode()const
{
return code_;
}
bool ListAlarmResult::getSuccess()const
{
return success_;
}

View File

@@ -19,23 +19,12 @@
using AlibabaCloud::Cms::Model::ListContactGroupRequest;
ListContactGroupRequest::ListContactGroupRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListContactGroup")
RpcServiceRequest("cms", "2018-03-08", "ListContactGroup")
{}
ListContactGroupRequest::~ListContactGroupRequest()
{}
std::string ListContactGroupRequest::getCallby_cms_owner()const
{
return callby_cms_owner_;
}
void ListContactGroupRequest::setCallby_cms_owner(const std::string& callby_cms_owner)
{
callby_cms_owner_ = callby_cms_owner;
setParameter("Callby_cms_owner", callby_cms_owner);
}
int ListContactGroupRequest::getPageSize()const
{
return pageSize_;

View File

@@ -40,49 +40,49 @@ void ListContactGroupResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (const auto &item : allContactGroups)
contactGroups_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["NextToken"].isNull())
nextToken_ = std::stoi(value["NextToken"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
for (const auto &item : allContactGroups)
contactGroups_.push_back(item.asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["NextToken"].isNull())
nextToken_ = std::stoi(value["NextToken"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
std::vector<std::string> ListContactGroupResult::getContactGroups()const
{
return contactGroups_;
}
std::string ListContactGroupResult::getMessage()const
{
return message_;
}
int ListContactGroupResult::getNextToken()const
{
return nextToken_;
}
int ListContactGroupResult::getTotal()const
{
return total_;
}
std::string ListContactGroupResult::getCode()const
{
return code_;
}
bool ListContactGroupResult::getSuccess()const
{
return success_;
}
std::vector<std::string> ListContactGroupResult::getContactGroups()const
{
return contactGroups_;
}
std::string ListContactGroupResult::getMessage()const
{
return message_;
}
int ListContactGroupResult::getNextToken()const
{
return nextToken_;
}
int ListContactGroupResult::getTotal()const
{
return total_;
}
std::string ListContactGroupResult::getCode()const
{
return code_;
}
bool ListContactGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListEventRulesRequest.h>
using AlibabaCloud::Cms::Model::ListEventRulesRequest;
ListEventRulesRequest::ListEventRulesRequest() :
RpcServiceRequest("cms", "2018-03-08", "ListEventRules")
{}
ListEventRulesRequest::~ListEventRulesRequest()
{}
std::string ListEventRulesRequest::getGroupId()const
{
return groupId_;
}
void ListEventRulesRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string ListEventRulesRequest::getPageSize()const
{
return pageSize_;
}
void ListEventRulesRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", pageSize);
}
std::string ListEventRulesRequest::getNamePrefix()const
{
return namePrefix_;
}
void ListEventRulesRequest::setNamePrefix(const std::string& namePrefix)
{
namePrefix_ = namePrefix;
setParameter("NamePrefix", namePrefix);
}
std::string ListEventRulesRequest::getPage()const
{
return page_;
}
void ListEventRulesRequest::setPage(const std::string& page)
{
page_ = page;
setParameter("Page", page);
}

View File

@@ -0,0 +1,128 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListEventRulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ListEventRulesResult::ListEventRulesResult() :
ServiceResult()
{}
ListEventRulesResult::ListEventRulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListEventRulesResult::~ListEventRulesResult()
{}
void ListEventRulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDatapoints = value["Datapoints"]["EventRule"];
for (auto value : allDatapoints)
{
EventRule datapointsObject;
if(!value["Name"].isNull())
datapointsObject.name = value["Name"].asString();
if(!value["GroupId"].isNull())
datapointsObject.groupId = value["GroupId"].asString();
if(!value["EventType"].isNull())
datapointsObject.eventType = value["EventType"].asString();
if(!value["State"].isNull())
datapointsObject.state = value["State"].asString();
if(!value["Description"].isNull())
datapointsObject.description = value["Description"].asString();
auto allEventPattern = value["EventPattern"]["EventPatternItem"];
for (auto value : allEventPattern)
{
EventRule::EventPatternItem eventPatternObject;
if(!value["Product"].isNull())
eventPatternObject.product = value["Product"].asString();
auto allNameList = value["NameList"]["NameList"];
for (auto value : allNameList)
eventPatternObject.nameList.push_back(value.asString());
auto allStatusList = value["StatusList"]["StatusList"];
for (auto value : allStatusList)
eventPatternObject.statusList.push_back(value.asString());
auto allLevelList = value["LevelList"]["LevelList"];
for (auto value : allLevelList)
eventPatternObject.levelList.push_back(value.asString());
auto allEventTypeList = value["EventTypeList"]["EventTypeList"];
for (auto value : allEventTypeList)
eventPatternObject.eventTypeList.push_back(value.asString());
datapointsObject.eventPattern.push_back(eventPatternObject);
}
datapoints_.push_back(datapointsObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
if(!value["CurrentPage"].isNull())
currentPage_ = std::stoi(value["CurrentPage"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListEventRulesResult::getMessage()const
{
return message_;
}
std::string ListEventRulesResult::getNextToken()const
{
return nextToken_;
}
int ListEventRulesResult::getCurrentPage()const
{
return currentPage_;
}
int ListEventRulesResult::getTotal()const
{
return total_;
}
std::vector<ListEventRulesResult::EventRule> ListEventRulesResult::getDatapoints()const
{
return datapoints_;
}
std::string ListEventRulesResult::getCode()const
{
return code_;
}
bool ListEventRulesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListEventTargetsByRuleRequest.h>
using AlibabaCloud::Cms::Model::ListEventTargetsByRuleRequest;
ListEventTargetsByRuleRequest::ListEventTargetsByRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "ListEventTargetsByRule")
{}
ListEventTargetsByRuleRequest::~ListEventTargetsByRuleRequest()
{}
std::string ListEventTargetsByRuleRequest::getRuleName()const
{
return ruleName_;
}
void ListEventTargetsByRuleRequest::setRuleName(const std::string& ruleName)
{
ruleName_ = ruleName;
setParameter("RuleName", ruleName);
}

View File

@@ -0,0 +1,157 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListEventTargetsByRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ListEventTargetsByRuleResult::ListEventTargetsByRuleResult() :
ServiceResult()
{}
ListEventTargetsByRuleResult::ListEventTargetsByRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListEventTargetsByRuleResult::~ListEventTargetsByRuleResult()
{}
void ListEventTargetsByRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allContactParameters = value["ContactParameters"]["ContactParameter"];
for (auto value : allContactParameters)
{
ContactParameter contactParametersObject;
if(!value["ContactGroupName"].isNull())
contactParametersObject.contactGroupName = value["ContactGroupName"].asString();
if(!value["Level"].isNull())
contactParametersObject.level = value["Level"].asString();
if(!value["Id"].isNull())
contactParametersObject.id = value["Id"].asString();
contactParameters_.push_back(contactParametersObject);
}
auto allFcParameters = value["FcParameters"]["FCParameter"];
for (auto value : allFcParameters)
{
FCParameter fcParametersObject;
if(!value["Region"].isNull())
fcParametersObject.region = value["Region"].asString();
if(!value["ServiceName"].isNull())
fcParametersObject.serviceName = value["ServiceName"].asString();
if(!value["FunctionName"].isNull())
fcParametersObject.functionName = value["FunctionName"].asString();
if(!value["Id"].isNull())
fcParametersObject.id = value["Id"].asString();
fcParameters_.push_back(fcParametersObject);
}
auto allMnsParameters = value["MnsParameters"]["MnsParameter"];
for (auto value : allMnsParameters)
{
MnsParameter mnsParametersObject;
if(!value["Region"].isNull())
mnsParametersObject.region = value["Region"].asString();
if(!value["Queue"].isNull())
mnsParametersObject.queue = value["Queue"].asString();
if(!value["Id"].isNull())
mnsParametersObject.id = value["Id"].asString();
mnsParameters_.push_back(mnsParametersObject);
}
auto allWebhookParameters = value["WebhookParameters"]["WebhookParameter"];
for (auto value : allWebhookParameters)
{
WebhookParameter webhookParametersObject;
if(!value["Id"].isNull())
webhookParametersObject.id = value["Id"].asString();
if(!value["Protocol"].isNull())
webhookParametersObject.protocol = value["Protocol"].asString();
if(!value["Method"].isNull())
webhookParametersObject.method = value["Method"].asString();
if(!value["Url"].isNull())
webhookParametersObject.url = value["Url"].asString();
webhookParameters_.push_back(webhookParametersObject);
}
auto allSlsParameters = value["SlsParameters"]["SlsParameter"];
for (auto value : allSlsParameters)
{
SlsParameter slsParametersObject;
if(!value["Id"].isNull())
slsParametersObject.id = value["Id"].asString();
if(!value["Region"].isNull())
slsParametersObject.region = value["Region"].asString();
if(!value["Project"].isNull())
slsParametersObject.project = value["Project"].asString();
if(!value["LogStore"].isNull())
slsParametersObject.logStore = value["LogStore"].asString();
slsParameters_.push_back(slsParametersObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["ParameterCount"].isNull())
parameterCount_ = std::stoi(value["ParameterCount"].asString());
}
int ListEventTargetsByRuleResult::getParameterCount()const
{
return parameterCount_;
}
std::vector<ListEventTargetsByRuleResult::ContactParameter> ListEventTargetsByRuleResult::getContactParameters()const
{
return contactParameters_;
}
std::string ListEventTargetsByRuleResult::getMessage()const
{
return message_;
}
std::vector<ListEventTargetsByRuleResult::SlsParameter> ListEventTargetsByRuleResult::getSlsParameters()const
{
return slsParameters_;
}
std::vector<ListEventTargetsByRuleResult::WebhookParameter> ListEventTargetsByRuleResult::getWebhookParameters()const
{
return webhookParameters_;
}
std::vector<ListEventTargetsByRuleResult::FCParameter> ListEventTargetsByRuleResult::getFcParameters()const
{
return fcParameters_;
}
std::string ListEventTargetsByRuleResult::getCode()const
{
return code_;
}
std::vector<ListEventTargetsByRuleResult::MnsParameter> ListEventTargetsByRuleResult::getMnsParameters()const
{
return mnsParameters_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListGroupDynamicRuleRequest.h>
using AlibabaCloud::Cms::Model::ListGroupDynamicRuleRequest;
ListGroupDynamicRuleRequest::ListGroupDynamicRuleRequest() :
RpcServiceRequest("cms", "2018-03-08", "ListGroupDynamicRule")
{}
ListGroupDynamicRuleRequest::~ListGroupDynamicRuleRequest()
{}
long ListGroupDynamicRuleRequest::getGroupId()const
{
return groupId_;
}
void ListGroupDynamicRuleRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}

View File

@@ -0,0 +1,116 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListGroupDynamicRuleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ListGroupDynamicRuleResult::ListGroupDynamicRuleResult() :
ServiceResult()
{}
ListGroupDynamicRuleResult::ListGroupDynamicRuleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListGroupDynamicRuleResult::~ListGroupDynamicRuleResult()
{}
void ListGroupDynamicRuleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResource = value["Resource"]["ResourceItem"];
for (auto value : allResource)
{
ResourceItem resourceObject;
if(!value["GroupId"].isNull())
resourceObject.groupId = std::stol(value["GroupId"].asString());
if(!value["Category"].isNull())
resourceObject.category = value["Category"].asString();
if(!value["FilterRelation"].isNull())
resourceObject.filterRelation = value["FilterRelation"].asString();
auto allFilters = value["Filters"]["Filter"];
for (auto value : allFilters)
{
ResourceItem::Filter filtersObject;
if(!value["Function"].isNull())
filtersObject.function = value["Function"].asString();
if(!value["Name"].isNull())
filtersObject.name = value["Name"].asString();
if(!value["Value"].isNull())
filtersObject.value = value["Value"].asString();
resourceObject.filters.push_back(filtersObject);
}
resource_.push_back(resourceObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int ListGroupDynamicRuleResult::getPageSize()const
{
return pageSize_;
}
int ListGroupDynamicRuleResult::getPageNumber()const
{
return pageNumber_;
}
int ListGroupDynamicRuleResult::getTotal()const
{
return total_;
}
std::vector<ListGroupDynamicRuleResult::ResourceItem> ListGroupDynamicRuleResult::getResource()const
{
return resource_;
}
int ListGroupDynamicRuleResult::getErrorCode()const
{
return errorCode_;
}
std::string ListGroupDynamicRuleResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListGroupDynamicRuleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListMonitoringTemplatesRequest.h>
using AlibabaCloud::Cms::Model::ListMonitoringTemplatesRequest;
ListMonitoringTemplatesRequest::ListMonitoringTemplatesRequest() :
RpcServiceRequest("cms", "2018-03-08", "ListMonitoringTemplates")
{}
ListMonitoringTemplatesRequest::~ListMonitoringTemplatesRequest()
{}
bool ListMonitoringTemplatesRequest::getTotal()const
{
return total_;
}
void ListMonitoringTemplatesRequest::setTotal(bool total)
{
total_ = total;
setParameter("Total", total ? "true" : "false");
}
std::string ListMonitoringTemplatesRequest::getName()const
{
return name_;
}
void ListMonitoringTemplatesRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
long ListMonitoringTemplatesRequest::getPageSize()const
{
return pageSize_;
}
void ListMonitoringTemplatesRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListMonitoringTemplatesRequest::getId()const
{
return id_;
}
void ListMonitoringTemplatesRequest::setId(long id)
{
id_ = id;
setParameter("Id", std::to_string(id));
}
bool ListMonitoringTemplatesRequest::getHistory()const
{
return history_;
}
void ListMonitoringTemplatesRequest::setHistory(bool history)
{
history_ = history;
setParameter("History", history ? "true" : "false");
}
std::string ListMonitoringTemplatesRequest::getKeyword()const
{
return keyword_;
}
void ListMonitoringTemplatesRequest::setKeyword(const std::string& keyword)
{
keyword_ = keyword;
setParameter("Keyword", keyword);
}
long ListMonitoringTemplatesRequest::getPageNumber()const
{
return pageNumber_;
}
void ListMonitoringTemplatesRequest::setPageNumber(long pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,128 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/ListMonitoringTemplatesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
ListMonitoringTemplatesResult::ListMonitoringTemplatesResult() :
ServiceResult()
{}
ListMonitoringTemplatesResult::ListMonitoringTemplatesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListMonitoringTemplatesResult::~ListMonitoringTemplatesResult()
{}
void ListMonitoringTemplatesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResources = value["Resources"]["Resource"];
for (auto value : allResources)
{
Resource resourcesObject;
if(!value["Name"].isNull())
resourcesObject.name = value["Name"].asString();
if(!value["Namespace"].isNull())
resourcesObject._namespace = value["Namespace"].asString();
if(!value["Description"].isNull())
resourcesObject.description = value["Description"].asString();
if(!value["AlertTemplatesJson"].isNull())
resourcesObject.alertTemplatesJson = value["AlertTemplatesJson"].asString();
if(!value["RestVersion"].isNull())
resourcesObject.restVersion = std::stol(value["RestVersion"].asString());
if(!value["Id"].isNull())
resourcesObject.id = std::stol(value["Id"].asString());
if(!value["GmtCreate"].isNull())
resourcesObject.gmtCreate = std::stol(value["GmtCreate"].asString());
if(!value["GmtModified"].isNull())
resourcesObject.gmtModified = std::stol(value["GmtModified"].asString());
if(!value["EventRuleTemplatesJson"].isNull())
resourcesObject.eventRuleTemplatesJson = value["EventRuleTemplatesJson"].asString();
auto allApplyHistories = value["ApplyHistories"]["ApplyHistory"];
for (auto value : allApplyHistories)
{
Resource::ApplyHistory applyHistoriesObject;
if(!value["GroupId"].isNull())
applyHistoriesObject.groupId = std::stol(value["GroupId"].asString());
if(!value["GroupName"].isNull())
applyHistoriesObject.groupName = value["GroupName"].asString();
if(!value["ApplyTime"].isNull())
applyHistoriesObject.applyTime = std::stol(value["ApplyTime"].asString());
resourcesObject.applyHistories.push_back(applyHistoriesObject);
}
resources_.push_back(resourcesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stol(value["PageNumber"].asString());
if(!value["Total"].isNull())
total_ = std::stol(value["Total"].asString());
}
long ListMonitoringTemplatesResult::getPageSize()const
{
return pageSize_;
}
long ListMonitoringTemplatesResult::getPageNumber()const
{
return pageNumber_;
}
long ListMonitoringTemplatesResult::getTotal()const
{
return total_;
}
std::vector<ListMonitoringTemplatesResult::Resource> ListMonitoringTemplatesResult::getResources()const
{
return resources_;
}
int ListMonitoringTemplatesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMonitoringTemplatesResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMonitoringTemplatesResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListMyGroupCategoriesRequest;
ListMyGroupCategoriesRequest::ListMyGroupCategoriesRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListMyGroupCategories")
RpcServiceRequest("cms", "2018-03-08", "ListMyGroupCategories")
{}
ListMyGroupCategoriesRequest::~ListMyGroupCategoriesRequest()

View File

@@ -40,50 +40,45 @@ void ListMyGroupCategoriesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCategory = value["Category"];
for (auto value : allCategory)
{
Category categoryObject;
if(!value["GroupId"].isNull())
categoryObject.groupId = std::stol(value["GroupId"].asString());
auto allCategoryItems = value["CategoryItems"]["CategoryItem"];
for (auto value : allCategoryItems)
{
Category::CategoryItem categoryItemObject;
if(!value["Category"].isNull())
categoryItemObject.category = value["Category"].asString();
if(!value["Count"].isNull())
categoryItemObject.count = std::stoi(value["Count"].asString());
categoryObject.categoryItems.push_back(categoryItemObject);
}
category_.push_back(categoryObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
auto categoryNode = value["Category"];
if(!categoryNode["GroupId"].isNull())
category_.groupId = std::stol(categoryNode["GroupId"].asString());
auto allCategoryItems = value["CategoryItems"]["CategoryItem"];
for (auto value : allCategoryItems)
{
Category::CategoryItem categoryItemObject;
if(!value["Category"].isNull())
categoryItemObject.category = value["Category"].asString();
if(!value["Count"].isNull())
categoryItemObject.count = std::stoi(value["Count"].asString());
category_.categoryItems.push_back(categoryItemObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::vector<ListMyGroupCategoriesResult::Category> ListMyGroupCategoriesResult::getCategory()const
{
return category_;
}
int ListMyGroupCategoriesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMyGroupCategoriesResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMyGroupCategoriesResult::getSuccess()const
{
return success_;
}
ListMyGroupCategoriesResult::Category ListMyGroupCategoriesResult::getCategory()const
{
return category_;
}
int ListMyGroupCategoriesResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMyGroupCategoriesResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMyGroupCategoriesResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListMyGroupInstancesDetailsRequest;
ListMyGroupInstancesDetailsRequest::ListMyGroupInstancesDetailsRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListMyGroupInstancesDetails")
RpcServiceRequest("cms", "2018-03-08", "ListMyGroupInstancesDetails")
{}
ListMyGroupInstancesDetailsRequest::~ListMyGroupInstancesDetailsRequest()
@@ -33,7 +33,18 @@ bool ListMyGroupInstancesDetailsRequest::getTotal()const
void ListMyGroupInstancesDetailsRequest::setTotal(bool total)
{
total_ = total;
setParameter("Total", std::to_string(total));
setParameter("Total", total ? "true" : "false");
}
std::string ListMyGroupInstancesDetailsRequest::getInstanceIds()const
{
return instanceIds_;
}
void ListMyGroupInstancesDetailsRequest::setInstanceIds(const std::string& instanceIds)
{
instanceIds_ = instanceIds;
setParameter("InstanceIds", instanceIds);
}
long ListMyGroupInstancesDetailsRequest::getGroupId()const
@@ -69,6 +80,17 @@ void ListMyGroupInstancesDetailsRequest::setCategory(const std::string& category
setParameter("Category", category);
}
std::string ListMyGroupInstancesDetailsRequest::getKeyword()const
{
return keyword_;
}
void ListMyGroupInstancesDetailsRequest::setKeyword(const std::string& keyword)
{
keyword_ = keyword;
setParameter("Keyword", keyword);
}
int ListMyGroupInstancesDetailsRequest::getPageNumber()const
{
return pageNumber_;

View File

@@ -40,101 +40,93 @@ void ListMyGroupInstancesDetailsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResources = value["Resources"]["Resource"];
for (auto value : allResources)
{
Resource resourcesObject;
if(!value["AliUid"].isNull())
resourcesObject.aliUid = std::stol(value["AliUid"].asString());
if(!value["InstanceName"].isNull())
resourcesObject.instanceName = value["InstanceName"].asString();
if(!value["InstanceId"].isNull())
resourcesObject.instanceId = value["InstanceId"].asString();
if(!value["Desc"].isNull())
resourcesObject.desc = value["Desc"].asString();
if(!value["NetworkType"].isNull())
resourcesObject.networkType = value["NetworkType"].asString();
if(!value["Category"].isNull())
resourcesObject.category = value["Category"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
Resource::Tag tagsObject;
if(!value["Key"].isNull())
tagsObject.key = value["Key"].asString();
if(!value["Value"].isNull())
tagsObject.value = value["Value"].asString();
resourcesObject.tags.push_back(tagsObject);
}
auto allRegion = value["Region"];
for (auto value : allRegion)
{
Resource::Region regionObject;
if(!value["RegionId"].isNull())
regionObject.regionId = value["RegionId"].asString();
if(!value["AvailabilityZone"].isNull())
regionObject.availabilityZone = value["AvailabilityZone"].asString();
resourcesObject.region.push_back(regionObject);
}
auto allVpc = value["Vpc"];
for (auto value : allVpc)
{
Resource::Vpc vpcObject;
if(!value["VpcInstanceId"].isNull())
vpcObject.vpcInstanceId = value["VpcInstanceId"].asString();
if(!value["VswitchInstanceId"].isNull())
vpcObject.vswitchInstanceId = value["VswitchInstanceId"].asString();
resourcesObject.vpc.push_back(vpcObject);
}
resources_.push_back(resourcesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
auto allResources = value["Resources"]["Resource"];
for (auto value : allResources)
{
Resource resourcesObject;
if(!value["AliUid"].isNull())
resourcesObject.aliUid = std::stol(value["AliUid"].asString());
if(!value["InstanceName"].isNull())
resourcesObject.instanceName = value["InstanceName"].asString();
if(!value["InstanceId"].isNull())
resourcesObject.instanceId = value["InstanceId"].asString();
if(!value["Desc"].isNull())
resourcesObject.desc = value["Desc"].asString();
if(!value["NetworkType"].isNull())
resourcesObject.networkType = value["NetworkType"].asString();
if(!value["Category"].isNull())
resourcesObject.category = value["Category"].asString();
if(!value["Dimension"].isNull())
resourcesObject.dimension = value["Dimension"].asString();
auto allTags = value["Tags"]["Tag"];
for (auto value : allTags)
{
Resource::Tag tagsObject;
if(!value["Key"].isNull())
tagsObject.key = value["Key"].asString();
if(!value["Value"].isNull())
tagsObject.value = value["Value"].asString();
resourcesObject.tags.push_back(tagsObject);
}
auto regionNode = value["Region"];
if(!regionNode["RegionId"].isNull())
resourcesObject.region.regionId = regionNode["RegionId"].asString();
if(!regionNode["AvailabilityZone"].isNull())
resourcesObject.region.availabilityZone = regionNode["AvailabilityZone"].asString();
auto vpcNode = value["Vpc"];
if(!vpcNode["VpcInstanceId"].isNull())
resourcesObject.vpc.vpcInstanceId = vpcNode["VpcInstanceId"].asString();
if(!vpcNode["VswitchInstanceId"].isNull())
resourcesObject.vpc.vswitchInstanceId = vpcNode["VswitchInstanceId"].asString();
resources_.push_back(resourcesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["Total"].isNull())
total_ = std::stoi(value["Total"].asString());
}
int ListMyGroupInstancesDetailsResult::getPageSize()const
{
return pageSize_;
}
int ListMyGroupInstancesDetailsResult::getPageNumber()const
{
return pageNumber_;
}
int ListMyGroupInstancesDetailsResult::getTotal()const
{
return total_;
}
std::vector<ListMyGroupInstancesDetailsResult::Resource> ListMyGroupInstancesDetailsResult::getResources()const
{
return resources_;
}
int ListMyGroupInstancesDetailsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMyGroupInstancesDetailsResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMyGroupInstancesDetailsResult::getSuccess()const
{
return success_;
}
int ListMyGroupInstancesDetailsResult::getPageSize()const
{
return pageSize_;
}
int ListMyGroupInstancesDetailsResult::getPageNumber()const
{
return pageNumber_;
}
int ListMyGroupInstancesDetailsResult::getTotal()const
{
return total_;
}
std::vector<ListMyGroupInstancesDetailsResult::Resource> ListMyGroupInstancesDetailsResult::getResources()const
{
return resources_;
}
int ListMyGroupInstancesDetailsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListMyGroupInstancesDetailsResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListMyGroupInstancesDetailsResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Cms::Model::ListMyGroupInstancesRequest;
ListMyGroupInstancesRequest::ListMyGroupInstancesRequest() :
RpcServiceRequest("cms", "2017-03-01", "ListMyGroupInstances")
RpcServiceRequest("cms", "2018-03-08", "ListMyGroupInstances")
{}
ListMyGroupInstancesRequest::~ListMyGroupInstancesRequest()
@@ -33,7 +33,18 @@ bool ListMyGroupInstancesRequest::getTotal()const
void ListMyGroupInstancesRequest::setTotal(bool total)
{
total_ = total;
setParameter("Total", std::to_string(total));
setParameter("Total", total ? "true" : "false");
}
std::string ListMyGroupInstancesRequest::getInstanceIds()const
{
return instanceIds_;
}
void ListMyGroupInstancesRequest::setInstanceIds(const std::string& instanceIds)
{
instanceIds_ = instanceIds;
setParameter("InstanceIds", instanceIds);
}
long ListMyGroupInstancesRequest::getGroupId()const
@@ -69,6 +80,17 @@ void ListMyGroupInstancesRequest::setCategory(const std::string& category)
setParameter("Category", category);
}
std::string ListMyGroupInstancesRequest::getKeyword()const
{
return keyword_;
}
void ListMyGroupInstancesRequest::setKeyword(const std::string& keyword)
{
keyword_ = keyword;
setParameter("Keyword", keyword);
}
int ListMyGroupInstancesRequest::getPageNumber()const
{
return pageNumber_;

Some files were not shown because too many files have changed in this diff Show More