Add Dynamic Tag API.

This commit is contained in:
sdk-team
2020-01-13 14:29:43 +08:00
parent c4b8a5b9de
commit 7b50b232ab
29 changed files with 1352 additions and 49 deletions

View File

@@ -123,6 +123,42 @@ CmsClient::ApplyMetricRuleTemplateOutcomeCallable CmsClient::applyMetricRuleTemp
return task->get_future();
}
CmsClient::CreateDynamicTagGroupOutcome CmsClient::createDynamicTagGroup(const CreateDynamicTagGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDynamicTagGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDynamicTagGroupOutcome(CreateDynamicTagGroupResult(outcome.result()));
else
return CreateDynamicTagGroupOutcome(outcome.error());
}
void CmsClient::createDynamicTagGroupAsync(const CreateDynamicTagGroupRequest& request, const CreateDynamicTagGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDynamicTagGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CmsClient::CreateDynamicTagGroupOutcomeCallable CmsClient::createDynamicTagGroupCallable(const CreateDynamicTagGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDynamicTagGroupOutcome()>>(
[this, request]()
{
return this->createDynamicTagGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CmsClient::CreateGroupMetricRulesOutcome CmsClient::createGroupMetricRules(const CreateGroupMetricRulesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -627,6 +663,42 @@ CmsClient::DeleteCustomMetricOutcomeCallable CmsClient::deleteCustomMetricCallab
return task->get_future();
}
CmsClient::DeleteDynamicTagGroupOutcome CmsClient::deleteDynamicTagGroup(const DeleteDynamicTagGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteDynamicTagGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteDynamicTagGroupOutcome(DeleteDynamicTagGroupResult(outcome.result()));
else
return DeleteDynamicTagGroupOutcome(outcome.error());
}
void CmsClient::deleteDynamicTagGroupAsync(const DeleteDynamicTagGroupRequest& request, const DeleteDynamicTagGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteDynamicTagGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CmsClient::DeleteDynamicTagGroupOutcomeCallable CmsClient::deleteDynamicTagGroupCallable(const DeleteDynamicTagGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteDynamicTagGroupOutcome()>>(
[this, request]()
{
return this->deleteDynamicTagGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CmsClient::DeleteEventRuleTargetsOutcome CmsClient::deleteEventRuleTargets(const DeleteEventRuleTargetsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1491,6 +1563,42 @@ CmsClient::DescribeCustomMetricListOutcomeCallable CmsClient::describeCustomMetr
return task->get_future();
}
CmsClient::DescribeDynamicTagRuleListOutcome CmsClient::describeDynamicTagRuleList(const DescribeDynamicTagRuleListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDynamicTagRuleListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDynamicTagRuleListOutcome(DescribeDynamicTagRuleListResult(outcome.result()));
else
return DescribeDynamicTagRuleListOutcome(outcome.error());
}
void CmsClient::describeDynamicTagRuleListAsync(const DescribeDynamicTagRuleListRequest& request, const DescribeDynamicTagRuleListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDynamicTagRuleList(request), context);
};
asyncExecute(new Runnable(fn));
}
CmsClient::DescribeDynamicTagRuleListOutcomeCallable CmsClient::describeDynamicTagRuleListCallable(const DescribeDynamicTagRuleListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDynamicTagRuleListOutcome()>>(
[this, request]()
{
return this->describeDynamicTagRuleList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CmsClient::DescribeEventRuleAttributeOutcome CmsClient::describeEventRuleAttribute(const DescribeEventRuleAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2463,6 +2571,42 @@ CmsClient::DescribeMonitoringConfigOutcomeCallable CmsClient::describeMonitoring
return task->get_future();
}
CmsClient::DescribeProductResourceTagKeyListOutcome CmsClient::describeProductResourceTagKeyList(const DescribeProductResourceTagKeyListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeProductResourceTagKeyListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeProductResourceTagKeyListOutcome(DescribeProductResourceTagKeyListResult(outcome.result()));
else
return DescribeProductResourceTagKeyListOutcome(outcome.error());
}
void CmsClient::describeProductResourceTagKeyListAsync(const DescribeProductResourceTagKeyListRequest& request, const DescribeProductResourceTagKeyListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeProductResourceTagKeyList(request), context);
};
asyncExecute(new Runnable(fn));
}
CmsClient::DescribeProductResourceTagKeyListOutcomeCallable CmsClient::describeProductResourceTagKeyListCallable(const DescribeProductResourceTagKeyListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeProductResourceTagKeyListOutcome()>>(
[this, request]()
{
return this->describeProductResourceTagKeyList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CmsClient::DescribeProductsOfActiveMetricRuleOutcome CmsClient::describeProductsOfActiveMetricRule(const DescribeProductsOfActiveMetricRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,127 @@
/*
* 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/CreateDynamicTagGroupRequest.h>
using AlibabaCloud::Cms::Model::CreateDynamicTagGroupRequest;
CreateDynamicTagGroupRequest::CreateDynamicTagGroupRequest() :
RpcServiceRequest("cms", "2019-01-01", "CreateDynamicTagGroup")
{
setMethod(HttpRequest::Method::Post);
}
CreateDynamicTagGroupRequest::~CreateDynamicTagGroupRequest()
{}
bool CreateDynamicTagGroupRequest::getEnableSubscribeEvent()const
{
return enableSubscribeEvent_;
}
void CreateDynamicTagGroupRequest::setEnableSubscribeEvent(bool enableSubscribeEvent)
{
enableSubscribeEvent_ = enableSubscribeEvent;
setCoreParameter("EnableSubscribeEvent", enableSubscribeEvent ? "true" : "false");
}
std::string CreateDynamicTagGroupRequest::getMatchExpressFilterRelation()const
{
return matchExpressFilterRelation_;
}
void CreateDynamicTagGroupRequest::setMatchExpressFilterRelation(const std::string& matchExpressFilterRelation)
{
matchExpressFilterRelation_ = matchExpressFilterRelation;
setCoreParameter("MatchExpressFilterRelation", matchExpressFilterRelation);
}
bool CreateDynamicTagGroupRequest::getEnableInstallAgent()const
{
return enableInstallAgent_;
}
void CreateDynamicTagGroupRequest::setEnableInstallAgent(bool enableInstallAgent)
{
enableInstallAgent_ = enableInstallAgent;
setCoreParameter("EnableInstallAgent", enableInstallAgent ? "true" : "false");
}
std::string CreateDynamicTagGroupRequest::getRegionId()const
{
return regionId_;
}
void CreateDynamicTagGroupRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::vector<CreateDynamicTagGroupRequest::MatchExpress> CreateDynamicTagGroupRequest::getMatchExpress()const
{
return matchExpress_;
}
void CreateDynamicTagGroupRequest::setMatchExpress(const std::vector<MatchExpress>& matchExpress)
{
matchExpress_ = matchExpress;
for(int dep1 = 0; dep1!= matchExpress.size(); dep1++) {
auto matchExpressObj = matchExpress.at(dep1);
std::string matchExpressObjStr = "MatchExpress." + std::to_string(dep1);
setCoreParameter(matchExpressObjStr + ".TagName", matchExpressObj.tagName);
setCoreParameter(matchExpressObjStr + ".TagValue", matchExpressObj.tagValue);
setCoreParameter(matchExpressObjStr + ".TagValueMatchFunction", matchExpressObj.tagValueMatchFunction);
}
}
std::vector<std::string> CreateDynamicTagGroupRequest::getContactGroupList()const
{
return contactGroupList_;
}
void CreateDynamicTagGroupRequest::setContactGroupList(const std::vector<std::string>& contactGroupList)
{
contactGroupList_ = contactGroupList;
for(int dep1 = 0; dep1!= contactGroupList.size(); dep1++) {
setCoreParameter("ContactGroupList."+ std::to_string(dep1), contactGroupList.at(dep1));
}
}
std::vector<std::string> CreateDynamicTagGroupRequest::getTemplateIdList()const
{
return templateIdList_;
}
void CreateDynamicTagGroupRequest::setTemplateIdList(const std::vector<std::string>& templateIdList)
{
templateIdList_ = templateIdList;
for(int dep1 = 0; dep1!= templateIdList.size(); dep1++) {
setCoreParameter("TemplateIdList."+ std::to_string(dep1), templateIdList.at(dep1));
}
}
std::string CreateDynamicTagGroupRequest::getTagKey()const
{
return tagKey_;
}
void CreateDynamicTagGroupRequest::setTagKey(const std::string& tagKey)
{
tagKey_ = tagKey;
setCoreParameter("TagKey", tagKey);
}

View File

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

View File

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

View File

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

View File

@@ -27,17 +27,6 @@ DescribeAlertHistoryListRequest::DescribeAlertHistoryListRequest() :
DescribeAlertHistoryListRequest::~DescribeAlertHistoryListRequest()
{}
std::string DescribeAlertHistoryListRequest::getAlertStatus()const
{
return alertStatus_;
}
void DescribeAlertHistoryListRequest::setAlertStatus(const std::string& alertStatus)
{
alertStatus_ = alertStatus;
setCoreParameter("AlertStatus", alertStatus);
}
std::string DescribeAlertHistoryListRequest::getRuleName()const
{
return ruleName_;
@@ -159,3 +148,14 @@ void DescribeAlertHistoryListRequest::setRuleId(const std::string& ruleId)
setCoreParameter("RuleId", ruleId);
}
std::string DescribeAlertHistoryListRequest::getStatus()const
{
return status_;
}
void DescribeAlertHistoryListRequest::setStatus(const std::string& status)
{
status_ = status;
setCoreParameter("Status", status);
}

View File

@@ -43,10 +43,10 @@ void DescribeAlertHistoryListResult::parse(const std::string &payload)
for (auto valueAlarmHistoryListAlarmHistory : allAlarmHistoryListNode)
{
AlarmHistory alarmHistoryListObject;
if(!valueAlarmHistoryListAlarmHistory["Id"].isNull())
alarmHistoryListObject.id = valueAlarmHistoryListAlarmHistory["Id"].asString();
if(!valueAlarmHistoryListAlarmHistory["RuleId"].isNull())
alarmHistoryListObject.ruleId = valueAlarmHistoryListAlarmHistory["RuleId"].asString();
if(!valueAlarmHistoryListAlarmHistory["AlertName"].isNull())
alarmHistoryListObject.alertName = valueAlarmHistoryListAlarmHistory["AlertName"].asString();
if(!valueAlarmHistoryListAlarmHistory["GroupId"].isNull())
alarmHistoryListObject.groupId = valueAlarmHistoryListAlarmHistory["GroupId"].asString();
if(!valueAlarmHistoryListAlarmHistory["Namespace"].isNull())
@@ -67,10 +67,12 @@ void DescribeAlertHistoryListResult::parse(const std::string &payload)
alarmHistoryListObject.lastTime = std::stol(valueAlarmHistoryListAlarmHistory["LastTime"].asString());
if(!valueAlarmHistoryListAlarmHistory["Level"].isNull())
alarmHistoryListObject.level = valueAlarmHistoryListAlarmHistory["Level"].asString();
if(!valueAlarmHistoryListAlarmHistory["PreLevel"].isNull())
alarmHistoryListObject.preLevel = valueAlarmHistoryListAlarmHistory["PreLevel"].asString();
if(!valueAlarmHistoryListAlarmHistory["RuleName"].isNull())
alarmHistoryListObject.ruleName = valueAlarmHistoryListAlarmHistory["RuleName"].asString();
if(!valueAlarmHistoryListAlarmHistory["AlertState"].isNull())
alarmHistoryListObject.alertState = valueAlarmHistoryListAlarmHistory["AlertState"].asString();
if(!valueAlarmHistoryListAlarmHistory["State"].isNull())
alarmHistoryListObject.state = valueAlarmHistoryListAlarmHistory["State"].asString();
if(!valueAlarmHistoryListAlarmHistory["Status"].isNull())
alarmHistoryListObject.status = std::stoi(valueAlarmHistoryListAlarmHistory["Status"].asString());
if(!valueAlarmHistoryListAlarmHistory["Webhooks"].isNull())

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cms/model/DescribeDynamicTagRuleListRequest.h>
using AlibabaCloud::Cms::Model::DescribeDynamicTagRuleListRequest;
DescribeDynamicTagRuleListRequest::DescribeDynamicTagRuleListRequest() :
RpcServiceRequest("cms", "2019-01-01", "DescribeDynamicTagRuleList")
{
setMethod(HttpRequest::Method::Put);
}
DescribeDynamicTagRuleListRequest::~DescribeDynamicTagRuleListRequest()
{}
std::string DescribeDynamicTagRuleListRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDynamicTagRuleListRequest::setPageNumber(const std::string& pageNumber)
{
pageNumber_ = pageNumber;
setCoreParameter("PageNumber", pageNumber);
}
std::string DescribeDynamicTagRuleListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDynamicTagRuleListRequest::setPageSize(const std::string& pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", pageSize);
}
std::string DescribeDynamicTagRuleListRequest::getTagKey()const
{
return tagKey_;
}
void DescribeDynamicTagRuleListRequest::setTagKey(const std::string& tagKey)
{
tagKey_ = tagKey;
setCoreParameter("TagKey", tagKey);
}

View File

@@ -0,0 +1,122 @@
/*
* 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/DescribeDynamicTagRuleListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeDynamicTagRuleListResult::DescribeDynamicTagRuleListResult() :
ServiceResult()
{}
DescribeDynamicTagRuleListResult::DescribeDynamicTagRuleListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDynamicTagRuleListResult::~DescribeDynamicTagRuleListResult()
{}
void DescribeDynamicTagRuleListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagGroupListNode = value["TagGroupList"]["TagGroup"];
for (auto valueTagGroupListTagGroup : allTagGroupListNode)
{
TagGroup tagGroupListObject;
if(!valueTagGroupListTagGroup["DynamicTagGroupId"].isNull())
tagGroupListObject.dynamicTagGroupId = valueTagGroupListTagGroup["DynamicTagGroupId"].asString();
if(!valueTagGroupListTagGroup["TagKey"].isNull())
tagGroupListObject.tagKey = valueTagGroupListTagGroup["TagKey"].asString();
if(!valueTagGroupListTagGroup["RegionId"].isNull())
tagGroupListObject.regionId = valueTagGroupListTagGroup["RegionId"].asString();
if(!valueTagGroupListTagGroup["MatchExpressFilterRelation"].isNull())
tagGroupListObject.matchExpressFilterRelation = valueTagGroupListTagGroup["MatchExpressFilterRelation"].asString();
if(!valueTagGroupListTagGroup["Status"].isNull())
tagGroupListObject.status = valueTagGroupListTagGroup["Status"].asString();
auto allMatchExpressNode = allTagGroupListNode["MatchExpress"]["MatchExpressItem"];
for (auto allTagGroupListNodeMatchExpressMatchExpressItem : allMatchExpressNode)
{
TagGroup::MatchExpressItem matchExpressObject;
if(!allTagGroupListNodeMatchExpressMatchExpressItem["TagName"].isNull())
matchExpressObject.tagName = allTagGroupListNodeMatchExpressMatchExpressItem["TagName"].asString();
if(!allTagGroupListNodeMatchExpressMatchExpressItem["TagValueMatchFunction"].isNull())
matchExpressObject.tagValueMatchFunction = allTagGroupListNodeMatchExpressMatchExpressItem["TagValueMatchFunction"].asString();
if(!allTagGroupListNodeMatchExpressMatchExpressItem["TagValue"].isNull())
matchExpressObject.tagValue = allTagGroupListNodeMatchExpressMatchExpressItem["TagValue"].asString();
tagGroupListObject.matchExpress.push_back(matchExpressObject);
}
auto allTemplateIdList = value["TemplateIdList"]["TemplateIdList"];
for (auto value : allTemplateIdList)
tagGroupListObject.templateIdList.push_back(value.asString());
tagGroupList_.push_back(tagGroupListObject);
}
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["PageNumber"].isNull())
pageNumber_ = value["PageNumber"].asString();
if(!value["PageSize"].isNull())
pageSize_ = value["PageSize"].asString();
}
std::string DescribeDynamicTagRuleListResult::getMessage()const
{
return message_;
}
std::string DescribeDynamicTagRuleListResult::getPageSize()const
{
return pageSize_;
}
std::string DescribeDynamicTagRuleListResult::getPageNumber()const
{
return pageNumber_;
}
int DescribeDynamicTagRuleListResult::getTotal()const
{
return total_;
}
std::vector<DescribeDynamicTagRuleListResult::TagGroup> DescribeDynamicTagRuleListResult::getTagGroupList()const
{
return tagGroupList_;
}
std::string DescribeDynamicTagRuleListResult::getCode()const
{
return code_;
}
bool DescribeDynamicTagRuleListResult::getSuccess()const
{
return success_;
}

View File

@@ -60,17 +60,6 @@ void DescribeMonitorGroupsRequest::setType(const std::string& type)
setCoreParameter("Type", type);
}
std::string DescribeMonitorGroupsRequest::getGroupName()const
{
return groupName_;
}
void DescribeMonitorGroupsRequest::setGroupName(const std::string& groupName)
{
groupName_ = groupName;
setCoreParameter("GroupName", groupName);
}
int DescribeMonitorGroupsRequest::getPageNumber()const
{
return pageNumber_;
@@ -82,17 +71,6 @@ void DescribeMonitorGroupsRequest::setPageNumber(int pageNumber)
setCoreParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeMonitorGroupsRequest::getInstanceId()const
{
return instanceId_;
}
void DescribeMonitorGroupsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setCoreParameter("InstanceId", instanceId);
}
int DescribeMonitorGroupsRequest::getPageSize()const
{
return pageSize_;
@@ -131,3 +109,47 @@ void DescribeMonitorGroupsRequest::setKeyword(const std::string& keyword)
setCoreParameter("Keyword", keyword);
}
std::string DescribeMonitorGroupsRequest::getGroupId()const
{
return groupId_;
}
void DescribeMonitorGroupsRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setCoreParameter("GroupId", groupId);
}
std::string DescribeMonitorGroupsRequest::getGroupName()const
{
return groupName_;
}
void DescribeMonitorGroupsRequest::setGroupName(const std::string& groupName)
{
groupName_ = groupName;
setCoreParameter("GroupName", groupName);
}
std::string DescribeMonitorGroupsRequest::getInstanceId()const
{
return instanceId_;
}
void DescribeMonitorGroupsRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setCoreParameter("InstanceId", instanceId);
}
std::string DescribeMonitorGroupsRequest::getDynamicTagGroupId()const
{
return dynamicTagGroupId_;
}
void DescribeMonitorGroupsRequest::setDynamicTagGroupId(const std::string& dynamicTagGroupId)
{
dynamicTagGroupId_ = dynamicTagGroupId;
setCoreParameter("DynamicTagGroupId", dynamicTagGroupId);
}

View File

@@ -57,6 +57,8 @@ void DescribeMonitorGroupsResult::parse(const std::string &payload)
resourcesObject.gmtCreate = std::stol(valueResourcesResource["GmtCreate"].asString());
if(!valueResourcesResource["BindUrl"].isNull())
resourcesObject.bindUrl = valueResourcesResource["BindUrl"].asString();
if(!valueResourcesResource["DynamicTagGroupId"].isNull())
resourcesObject.dynamicTagGroupId = std::stol(valueResourcesResource["DynamicTagGroupId"].asString());
auto allContactGroupsNode = allResourcesNode["ContactGroups"]["ContactGroup"];
for (auto allResourcesNodeContactGroupsContactGroup : allContactGroupsNode)
{

View File

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

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/DescribeProductResourceTagKeyListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cms;
using namespace AlibabaCloud::Cms::Model;
DescribeProductResourceTagKeyListResult::DescribeProductResourceTagKeyListResult() :
ServiceResult()
{}
DescribeProductResourceTagKeyListResult::DescribeProductResourceTagKeyListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeProductResourceTagKeyListResult::~DescribeProductResourceTagKeyListResult()
{}
void DescribeProductResourceTagKeyListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagKeys = value["TagKeys"]["TagKey"];
for (const auto &item : allTagKeys)
tagKeys_.push_back(item.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["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string DescribeProductResourceTagKeyListResult::getMessage()const
{
return message_;
}
std::string DescribeProductResourceTagKeyListResult::getNextToken()const
{
return nextToken_;
}
std::string DescribeProductResourceTagKeyListResult::getCode()const
{
return code_;
}
std::vector<std::string> DescribeProductResourceTagKeyListResult::getTagKeys()const
{
return tagKeys_;
}
bool DescribeProductResourceTagKeyListResult::getSuccess()const
{
return success_;
}