Increase availability monitoring increase HTP header.
This commit is contained in:
@@ -123,6 +123,114 @@ CmsClient::ApplyMetricRuleTemplateOutcomeCallable CmsClient::applyMetricRuleTemp
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsCallNumOrderOutcome CmsClient::createCmsCallNumOrder(const CreateCmsCallNumOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateCmsCallNumOrderOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateCmsCallNumOrderOutcome(CreateCmsCallNumOrderResult(outcome.result()));
|
||||
else
|
||||
return CreateCmsCallNumOrderOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::createCmsCallNumOrderAsync(const CreateCmsCallNumOrderRequest& request, const CreateCmsCallNumOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createCmsCallNumOrder(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsCallNumOrderOutcomeCallable CmsClient::createCmsCallNumOrderCallable(const CreateCmsCallNumOrderRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateCmsCallNumOrderOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createCmsCallNumOrder(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsOrderOutcome CmsClient::createCmsOrder(const CreateCmsOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateCmsOrderOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateCmsOrderOutcome(CreateCmsOrderResult(outcome.result()));
|
||||
else
|
||||
return CreateCmsOrderOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::createCmsOrderAsync(const CreateCmsOrderRequest& request, const CreateCmsOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createCmsOrder(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsOrderOutcomeCallable CmsClient::createCmsOrderCallable(const CreateCmsOrderRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateCmsOrderOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createCmsOrder(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsSmspackageOrderOutcome CmsClient::createCmsSmspackageOrder(const CreateCmsSmspackageOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateCmsSmspackageOrderOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateCmsSmspackageOrderOutcome(CreateCmsSmspackageOrderResult(outcome.result()));
|
||||
else
|
||||
return CreateCmsSmspackageOrderOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::createCmsSmspackageOrderAsync(const CreateCmsSmspackageOrderRequest& request, const CreateCmsSmspackageOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createCmsSmspackageOrder(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::CreateCmsSmspackageOrderOutcomeCallable CmsClient::createCmsSmspackageOrderCallable(const CreateCmsSmspackageOrderRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateCmsSmspackageOrderOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createCmsSmspackageOrder(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateDynamicTagGroupOutcome CmsClient::createDynamicTagGroup(const CreateDynamicTagGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -411,6 +519,42 @@ CmsClient::CreateMonitorGroupOutcomeCallable CmsClient::createMonitorGroupCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateMonitorGroupByResourceGroupIdOutcome CmsClient::createMonitorGroupByResourceGroupId(const CreateMonitorGroupByResourceGroupIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateMonitorGroupByResourceGroupIdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateMonitorGroupByResourceGroupIdOutcome(CreateMonitorGroupByResourceGroupIdResult(outcome.result()));
|
||||
else
|
||||
return CreateMonitorGroupByResourceGroupIdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::createMonitorGroupByResourceGroupIdAsync(const CreateMonitorGroupByResourceGroupIdRequest& request, const CreateMonitorGroupByResourceGroupIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createMonitorGroupByResourceGroupId(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::CreateMonitorGroupByResourceGroupIdOutcomeCallable CmsClient::createMonitorGroupByResourceGroupIdCallable(const CreateMonitorGroupByResourceGroupIdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateMonitorGroupByResourceGroupIdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createMonitorGroupByResourceGroupId(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::CreateMonitorGroupInstancesOutcome CmsClient::createMonitorGroupInstances(const CreateMonitorGroupInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -915,6 +1059,42 @@ CmsClient::DeleteHostAvailabilityOutcomeCallable CmsClient::deleteHostAvailabili
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DeleteLogMonitorOutcome CmsClient::deleteLogMonitor(const DeleteLogMonitorRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteLogMonitorOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteLogMonitorOutcome(DeleteLogMonitorResult(outcome.result()));
|
||||
else
|
||||
return DeleteLogMonitorOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::deleteLogMonitorAsync(const DeleteLogMonitorRequest& request, const DeleteLogMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteLogMonitor(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DeleteLogMonitorOutcomeCallable CmsClient::deleteLogMonitorCallable(const DeleteLogMonitorRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteLogMonitorOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteLogMonitor(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DeleteMetricRuleResourcesOutcome CmsClient::deleteMetricRuleResources(const DeleteMetricRuleResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1347,6 +1527,114 @@ CmsClient::DescribeAlertHistoryListOutcomeCallable CmsClient::describeAlertHisto
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogCountOutcome CmsClient::describeAlertLogCount(const DescribeAlertLogCountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAlertLogCountOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAlertLogCountOutcome(DescribeAlertLogCountResult(outcome.result()));
|
||||
else
|
||||
return DescribeAlertLogCountOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeAlertLogCountAsync(const DescribeAlertLogCountRequest& request, const DescribeAlertLogCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAlertLogCount(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogCountOutcomeCallable CmsClient::describeAlertLogCountCallable(const DescribeAlertLogCountRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAlertLogCountOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAlertLogCount(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogHistogramOutcome CmsClient::describeAlertLogHistogram(const DescribeAlertLogHistogramRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAlertLogHistogramOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAlertLogHistogramOutcome(DescribeAlertLogHistogramResult(outcome.result()));
|
||||
else
|
||||
return DescribeAlertLogHistogramOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeAlertLogHistogramAsync(const DescribeAlertLogHistogramRequest& request, const DescribeAlertLogHistogramAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAlertLogHistogram(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogHistogramOutcomeCallable CmsClient::describeAlertLogHistogramCallable(const DescribeAlertLogHistogramRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAlertLogHistogramOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAlertLogHistogram(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogListOutcome CmsClient::describeAlertLogList(const DescribeAlertLogListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAlertLogListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAlertLogListOutcome(DescribeAlertLogListResult(outcome.result()));
|
||||
else
|
||||
return DescribeAlertLogListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeAlertLogListAsync(const DescribeAlertLogListRequest& request, const DescribeAlertLogListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAlertLogList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertLogListOutcomeCallable CmsClient::describeAlertLogListCallable(const DescribeAlertLogListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAlertLogListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAlertLogList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeAlertingMetricRuleResourcesOutcome CmsClient::describeAlertingMetricRuleResources(const DescribeAlertingMetricRuleResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1851,42 +2139,6 @@ CmsClient::DescribeExporterRuleListOutcomeCallable CmsClient::describeExporterRu
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeFolderListOutcome CmsClient::describeFolderList(const DescribeFolderListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeFolderListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeFolderListOutcome(DescribeFolderListResult(outcome.result()));
|
||||
else
|
||||
return DescribeFolderListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeFolderListAsync(const DescribeFolderListRequest& request, const DescribeFolderListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeFolderList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeFolderListOutcomeCallable CmsClient::describeFolderListCallable(const DescribeFolderListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeFolderListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeFolderList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeGroupMonitoringAgentProcessOutcome CmsClient::describeGroupMonitoringAgentProcess(const DescribeGroupMonitoringAgentProcessRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1959,6 +2211,78 @@ CmsClient::DescribeHostAvailabilityListOutcomeCallable CmsClient::describeHostAv
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeLogMonitorAttributeOutcome CmsClient::describeLogMonitorAttribute(const DescribeLogMonitorAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeLogMonitorAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeLogMonitorAttributeOutcome(DescribeLogMonitorAttributeResult(outcome.result()));
|
||||
else
|
||||
return DescribeLogMonitorAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeLogMonitorAttributeAsync(const DescribeLogMonitorAttributeRequest& request, const DescribeLogMonitorAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeLogMonitorAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeLogMonitorAttributeOutcomeCallable CmsClient::describeLogMonitorAttributeCallable(const DescribeLogMonitorAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeLogMonitorAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeLogMonitorAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeLogMonitorListOutcome CmsClient::describeLogMonitorList(const DescribeLogMonitorListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeLogMonitorListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeLogMonitorListOutcome(DescribeLogMonitorListResult(outcome.result()));
|
||||
else
|
||||
return DescribeLogMonitorListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeLogMonitorListAsync(const DescribeLogMonitorListRequest& request, const DescribeLogMonitorListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeLogMonitorList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeLogMonitorListOutcomeCallable CmsClient::describeLogMonitorListCallable(const DescribeLogMonitorListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeLogMonitorListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeLogMonitorList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeMetricDataOutcome CmsClient::describeMetricData(const DescribeMetricDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2535,6 +2859,42 @@ CmsClient::DescribeMonitorGroupsOutcomeCallable CmsClient::describeMonitorGroups
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeMonitorResourceQuotaAttributeOutcome CmsClient::describeMonitorResourceQuotaAttribute(const DescribeMonitorResourceQuotaAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeMonitorResourceQuotaAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeMonitorResourceQuotaAttributeOutcome(DescribeMonitorResourceQuotaAttributeResult(outcome.result()));
|
||||
else
|
||||
return DescribeMonitorResourceQuotaAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::describeMonitorResourceQuotaAttributeAsync(const DescribeMonitorResourceQuotaAttributeRequest& request, const DescribeMonitorResourceQuotaAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeMonitorResourceQuotaAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::DescribeMonitorResourceQuotaAttributeOutcomeCallable CmsClient::describeMonitorResourceQuotaAttributeCallable(const DescribeMonitorResourceQuotaAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeMonitorResourceQuotaAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeMonitorResourceQuotaAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::DescribeMonitoringAgentAccessKeyOutcome CmsClient::describeMonitoringAgentAccessKey(const DescribeMonitoringAgentAccessKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -3795,6 +4155,42 @@ CmsClient::ModifyHostAvailabilityOutcomeCallable CmsClient::modifyHostAvailabili
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::ModifyHostInfoOutcome CmsClient::modifyHostInfo(const ModifyHostInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyHostInfoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyHostInfoOutcome(ModifyHostInfoResult(outcome.result()));
|
||||
else
|
||||
return ModifyHostInfoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::modifyHostInfoAsync(const ModifyHostInfoRequest& request, const ModifyHostInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyHostInfo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::ModifyHostInfoOutcomeCallable CmsClient::modifyHostInfoCallable(const ModifyHostInfoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyHostInfoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyHostInfo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::ModifyMetricRuleTemplateOutcome CmsClient::modifyMetricRuleTemplate(const ModifyMetricRuleTemplateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -3939,6 +4335,42 @@ CmsClient::ModifySiteMonitorOutcomeCallable CmsClient::modifySiteMonitorCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::OpenCmsServiceOutcome CmsClient::openCmsService(const OpenCmsServiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return OpenCmsServiceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return OpenCmsServiceOutcome(OpenCmsServiceResult(outcome.result()));
|
||||
else
|
||||
return OpenCmsServiceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::openCmsServiceAsync(const OpenCmsServiceRequest& request, const OpenCmsServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, openCmsService(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::OpenCmsServiceOutcomeCallable CmsClient::openCmsServiceCallable(const OpenCmsServiceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<OpenCmsServiceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->openCmsService(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutContactOutcome CmsClient::putContact(const PutContactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -4047,6 +4479,42 @@ CmsClient::PutCustomEventOutcomeCallable CmsClient::putCustomEventCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutCustomEventRuleOutcome CmsClient::putCustomEventRule(const PutCustomEventRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PutCustomEventRuleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PutCustomEventRuleOutcome(PutCustomEventRuleResult(outcome.result()));
|
||||
else
|
||||
return PutCustomEventRuleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::putCustomEventRuleAsync(const PutCustomEventRuleRequest& request, const PutCustomEventRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, putCustomEventRule(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::PutCustomEventRuleOutcomeCallable CmsClient::putCustomEventRuleCallable(const PutCustomEventRuleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PutCustomEventRuleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->putCustomEventRule(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutCustomMetricOutcome CmsClient::putCustomMetric(const PutCustomMetricRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -4083,6 +4551,42 @@ CmsClient::PutCustomMetricOutcomeCallable CmsClient::putCustomMetricCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutCustomMetricRuleOutcome CmsClient::putCustomMetricRule(const PutCustomMetricRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PutCustomMetricRuleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PutCustomMetricRuleOutcome(PutCustomMetricRuleResult(outcome.result()));
|
||||
else
|
||||
return PutCustomMetricRuleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::putCustomMetricRuleAsync(const PutCustomMetricRuleRequest& request, const PutCustomMetricRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, putCustomMetricRule(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::PutCustomMetricRuleOutcomeCallable CmsClient::putCustomMetricRuleCallable(const PutCustomMetricRuleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PutCustomMetricRuleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->putCustomMetricRule(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutEventRuleOutcome CmsClient::putEventRule(const PutEventRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -4263,6 +4767,42 @@ CmsClient::PutGroupMetricRuleOutcomeCallable CmsClient::putGroupMetricRuleCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutLogMonitorOutcome CmsClient::putLogMonitor(const PutLogMonitorRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return PutLogMonitorOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return PutLogMonitorOutcome(PutLogMonitorResult(outcome.result()));
|
||||
else
|
||||
return PutLogMonitorOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CmsClient::putLogMonitorAsync(const PutLogMonitorRequest& request, const PutLogMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, putLogMonitor(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CmsClient::PutLogMonitorOutcomeCallable CmsClient::putLogMonitorCallable(const PutLogMonitorRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<PutLogMonitorOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->putLogMonitor(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CmsClient::PutMetricRuleTargetsOutcome CmsClient::putMetricRuleTargets(const PutMetricRuleTargetsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -46,8 +46,6 @@ void ApplyMetricRuleTemplateResult::parse(const std::string &payload)
|
||||
for (auto resourceNodeAlertResultsResult : allAlertResultsNode)
|
||||
{
|
||||
Resource::Result resultObject;
|
||||
if(!resourceNodeAlertResultsResult["GroupId"].isNull())
|
||||
resultObject.groupId = std::stol(resourceNodeAlertResultsResult["GroupId"].asString());
|
||||
if(!resourceNodeAlertResultsResult["RuleId"].isNull())
|
||||
resultObject.ruleId = resourceNodeAlertResultsResult["RuleId"].asString();
|
||||
if(!resourceNodeAlertResultsResult["Message"].isNull())
|
||||
|
||||
95
cms/src/model/CreateCmsCallNumOrderRequest.cc
Normal file
95
cms/src/model/CreateCmsCallNumOrderRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/CreateCmsCallNumOrderRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::CreateCmsCallNumOrderRequest;
|
||||
|
||||
CreateCmsCallNumOrderRequest::CreateCmsCallNumOrderRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "CreateCmsCallNumOrder")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCmsCallNumOrderRequest::~CreateCmsCallNumOrderRequest()
|
||||
{}
|
||||
|
||||
int CreateCmsCallNumOrderRequest::getAutoRenewPeriod()const
|
||||
{
|
||||
return autoRenewPeriod_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setAutoRenewPeriod(int autoRenewPeriod)
|
||||
{
|
||||
autoRenewPeriod_ = autoRenewPeriod;
|
||||
setParameter("AutoRenewPeriod", std::to_string(autoRenewPeriod));
|
||||
}
|
||||
|
||||
int CreateCmsCallNumOrderRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
bool CreateCmsCallNumOrderRequest::getAutoPay()const
|
||||
{
|
||||
return autoPay_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setAutoPay(bool autoPay)
|
||||
{
|
||||
autoPay_ = autoPay;
|
||||
setParameter("AutoPay", autoPay ? "true" : "false");
|
||||
}
|
||||
|
||||
bool CreateCmsCallNumOrderRequest::getAutoUseCoupon()const
|
||||
{
|
||||
return autoUseCoupon_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setAutoUseCoupon(bool autoUseCoupon)
|
||||
{
|
||||
autoUseCoupon_ = autoUseCoupon;
|
||||
setParameter("AutoUseCoupon", autoUseCoupon ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateCmsCallNumOrderRequest::getPeriodUnit()const
|
||||
{
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setPeriodUnit(const std::string& periodUnit)
|
||||
{
|
||||
periodUnit_ = periodUnit;
|
||||
setParameter("PeriodUnit", periodUnit);
|
||||
}
|
||||
|
||||
std::string CreateCmsCallNumOrderRequest::getPhoneCount()const
|
||||
{
|
||||
return phoneCount_;
|
||||
}
|
||||
|
||||
void CreateCmsCallNumOrderRequest::setPhoneCount(const std::string& phoneCount)
|
||||
{
|
||||
phoneCount_ = phoneCount;
|
||||
setParameter("PhoneCount", phoneCount);
|
||||
}
|
||||
|
||||
51
cms/src/model/CreateCmsCallNumOrderResult.cc
Normal file
51
cms/src/model/CreateCmsCallNumOrderResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/CreateCmsCallNumOrderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
CreateCmsCallNumOrderResult::CreateCmsCallNumOrderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCmsCallNumOrderResult::CreateCmsCallNumOrderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCmsCallNumOrderResult::~CreateCmsCallNumOrderResult()
|
||||
{}
|
||||
|
||||
void CreateCmsCallNumOrderResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCmsCallNumOrderResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
216
cms/src/model/CreateCmsOrderRequest.cc
Normal file
216
cms/src/model/CreateCmsOrderRequest.cc
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* 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/CreateCmsOrderRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::CreateCmsOrderRequest;
|
||||
|
||||
CreateCmsOrderRequest::CreateCmsOrderRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "CreateCmsOrder")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCmsOrderRequest::~CreateCmsOrderRequest()
|
||||
{}
|
||||
|
||||
std::string CreateCmsOrderRequest::getSmsCount()const
|
||||
{
|
||||
return smsCount_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setSmsCount(const std::string& smsCount)
|
||||
{
|
||||
smsCount_ = smsCount;
|
||||
setParameter("SmsCount", smsCount);
|
||||
}
|
||||
|
||||
bool CreateCmsOrderRequest::getAutoUseCoupon()const
|
||||
{
|
||||
return autoUseCoupon_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setAutoUseCoupon(bool autoUseCoupon)
|
||||
{
|
||||
autoUseCoupon_ = autoUseCoupon;
|
||||
setParameter("AutoUseCoupon", autoUseCoupon ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getLogMonitorStream()const
|
||||
{
|
||||
return logMonitorStream_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setLogMonitorStream(const std::string& logMonitorStream)
|
||||
{
|
||||
logMonitorStream_ = logMonitorStream;
|
||||
setParameter("LogMonitorStream", logMonitorStream);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getCustomTimeSeries()const
|
||||
{
|
||||
return customTimeSeries_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setCustomTimeSeries(const std::string& customTimeSeries)
|
||||
{
|
||||
customTimeSeries_ = customTimeSeries;
|
||||
setParameter("CustomTimeSeries", customTimeSeries);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getApiCount()const
|
||||
{
|
||||
return apiCount_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setApiCount(const std::string& apiCount)
|
||||
{
|
||||
apiCount_ = apiCount;
|
||||
setParameter("ApiCount", apiCount);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getPhoneCount()const
|
||||
{
|
||||
return phoneCount_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setPhoneCount(const std::string& phoneCount)
|
||||
{
|
||||
phoneCount_ = phoneCount;
|
||||
setParameter("PhoneCount", phoneCount);
|
||||
}
|
||||
|
||||
int CreateCmsOrderRequest::getAutoRenewPeriod()const
|
||||
{
|
||||
return autoRenewPeriod_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setAutoRenewPeriod(int autoRenewPeriod)
|
||||
{
|
||||
autoRenewPeriod_ = autoRenewPeriod;
|
||||
setParameter("AutoRenewPeriod", std::to_string(autoRenewPeriod));
|
||||
}
|
||||
|
||||
int CreateCmsOrderRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
bool CreateCmsOrderRequest::getAutoPay()const
|
||||
{
|
||||
return autoPay_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setAutoPay(bool autoPay)
|
||||
{
|
||||
autoPay_ = autoPay;
|
||||
setParameter("AutoPay", autoPay ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getSuggestType()const
|
||||
{
|
||||
return suggestType_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setSuggestType(const std::string& suggestType)
|
||||
{
|
||||
suggestType_ = suggestType;
|
||||
setParameter("SuggestType", suggestType);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getEventStoreNum()const
|
||||
{
|
||||
return eventStoreNum_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setEventStoreNum(const std::string& eventStoreNum)
|
||||
{
|
||||
eventStoreNum_ = eventStoreNum;
|
||||
setParameter("EventStoreNum", eventStoreNum);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getSiteTaskNum()const
|
||||
{
|
||||
return siteTaskNum_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setSiteTaskNum(const std::string& siteTaskNum)
|
||||
{
|
||||
siteTaskNum_ = siteTaskNum;
|
||||
setParameter("SiteTaskNum", siteTaskNum);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getPeriodUnit()const
|
||||
{
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setPeriodUnit(const std::string& periodUnit)
|
||||
{
|
||||
periodUnit_ = periodUnit;
|
||||
setParameter("PeriodUnit", periodUnit);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getSiteOperatorNum()const
|
||||
{
|
||||
return siteOperatorNum_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setSiteOperatorNum(const std::string& siteOperatorNum)
|
||||
{
|
||||
siteOperatorNum_ = siteOperatorNum;
|
||||
setParameter("SiteOperatorNum", siteOperatorNum);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getSiteEcsNum()const
|
||||
{
|
||||
return siteEcsNum_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setSiteEcsNum(const std::string& siteEcsNum)
|
||||
{
|
||||
siteEcsNum_ = siteEcsNum;
|
||||
setParameter("SiteEcsNum", siteEcsNum);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getEventStoreTime()const
|
||||
{
|
||||
return eventStoreTime_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setEventStoreTime(const std::string& eventStoreTime)
|
||||
{
|
||||
eventStoreTime_ = eventStoreTime;
|
||||
setParameter("EventStoreTime", eventStoreTime);
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderRequest::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
void CreateCmsOrderRequest::setPayType(const std::string& payType)
|
||||
{
|
||||
payType_ = payType;
|
||||
setParameter("PayType", payType);
|
||||
}
|
||||
|
||||
51
cms/src/model/CreateCmsOrderResult.cc
Normal file
51
cms/src/model/CreateCmsOrderResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/CreateCmsOrderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
CreateCmsOrderResult::CreateCmsOrderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCmsOrderResult::CreateCmsOrderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCmsOrderResult::~CreateCmsOrderResult()
|
||||
{}
|
||||
|
||||
void CreateCmsOrderResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCmsOrderResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
95
cms/src/model/CreateCmsSmspackageOrderRequest.cc
Normal file
95
cms/src/model/CreateCmsSmspackageOrderRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/CreateCmsSmspackageOrderRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::CreateCmsSmspackageOrderRequest;
|
||||
|
||||
CreateCmsSmspackageOrderRequest::CreateCmsSmspackageOrderRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "CreateCmsSmspackageOrder")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCmsSmspackageOrderRequest::~CreateCmsSmspackageOrderRequest()
|
||||
{}
|
||||
|
||||
int CreateCmsSmspackageOrderRequest::getAutoRenewPeriod()const
|
||||
{
|
||||
return autoRenewPeriod_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setAutoRenewPeriod(int autoRenewPeriod)
|
||||
{
|
||||
autoRenewPeriod_ = autoRenewPeriod;
|
||||
setParameter("AutoRenewPeriod", std::to_string(autoRenewPeriod));
|
||||
}
|
||||
|
||||
int CreateCmsSmspackageOrderRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
bool CreateCmsSmspackageOrderRequest::getAutoPay()const
|
||||
{
|
||||
return autoPay_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setAutoPay(bool autoPay)
|
||||
{
|
||||
autoPay_ = autoPay;
|
||||
setParameter("AutoPay", autoPay ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateCmsSmspackageOrderRequest::getSmsCount()const
|
||||
{
|
||||
return smsCount_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setSmsCount(const std::string& smsCount)
|
||||
{
|
||||
smsCount_ = smsCount;
|
||||
setParameter("SmsCount", smsCount);
|
||||
}
|
||||
|
||||
bool CreateCmsSmspackageOrderRequest::getAutoUseCoupon()const
|
||||
{
|
||||
return autoUseCoupon_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setAutoUseCoupon(bool autoUseCoupon)
|
||||
{
|
||||
autoUseCoupon_ = autoUseCoupon;
|
||||
setParameter("AutoUseCoupon", autoUseCoupon ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateCmsSmspackageOrderRequest::getPeriodUnit()const
|
||||
{
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
void CreateCmsSmspackageOrderRequest::setPeriodUnit(const std::string& periodUnit)
|
||||
{
|
||||
periodUnit_ = periodUnit;
|
||||
setParameter("PeriodUnit", periodUnit);
|
||||
}
|
||||
|
||||
51
cms/src/model/CreateCmsSmspackageOrderResult.cc
Normal file
51
cms/src/model/CreateCmsSmspackageOrderResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/CreateCmsSmspackageOrderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
CreateCmsSmspackageOrderResult::CreateCmsSmspackageOrderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCmsSmspackageOrderResult::CreateCmsSmspackageOrderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCmsSmspackageOrderResult::~CreateCmsSmspackageOrderResult()
|
||||
{}
|
||||
|
||||
void CreateCmsSmspackageOrderResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCmsSmspackageOrderResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
@@ -60,17 +60,6 @@ void CreateDynamicTagGroupRequest::setEnableInstallAgent(bool enableInstallAgent
|
||||
setParameter("EnableInstallAgent", enableInstallAgent ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateDynamicTagGroupRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateDynamicTagGroupRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::vector<CreateDynamicTagGroupRequest::MatchExpress> CreateDynamicTagGroupRequest::getMatchExpress()const
|
||||
{
|
||||
return matchExpress_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void CreateHostAvailabilityRequest::setTaskOptionHttpMethod(const std::string& t
|
||||
setParameter("TaskOptionHttpMethod", taskOptionHttpMethod);
|
||||
}
|
||||
|
||||
std::string CreateHostAvailabilityRequest::getTaskOptionHttpHeader()const
|
||||
{
|
||||
return taskOptionHttpHeader_;
|
||||
}
|
||||
|
||||
void CreateHostAvailabilityRequest::setTaskOptionHttpHeader(const std::string& taskOptionHttpHeader)
|
||||
{
|
||||
taskOptionHttpHeader_ = taskOptionHttpHeader;
|
||||
setParameter("TaskOptionHttpHeader", taskOptionHttpHeader);
|
||||
}
|
||||
|
||||
std::vector<CreateHostAvailabilityRequest::AlertConfigEscalationList> CreateHostAvailabilityRequest::getAlertConfigEscalationList()const
|
||||
{
|
||||
return alertConfigEscalationList_;
|
||||
@@ -202,6 +213,17 @@ void CreateHostAvailabilityRequest::setTaskScope(const std::string& taskScope)
|
||||
setParameter("TaskScope", taskScope);
|
||||
}
|
||||
|
||||
std::string CreateHostAvailabilityRequest::getTaskOptionHttpPostContent()const
|
||||
{
|
||||
return taskOptionHttpPostContent_;
|
||||
}
|
||||
|
||||
void CreateHostAvailabilityRequest::setTaskOptionHttpPostContent(const std::string& taskOptionHttpPostContent)
|
||||
{
|
||||
taskOptionHttpPostContent_ = taskOptionHttpPostContent;
|
||||
setParameter("TaskOptionHttpPostContent", taskOptionHttpPostContent);
|
||||
}
|
||||
|
||||
int CreateHostAvailabilityRequest::getAlertConfigStartTime()const
|
||||
{
|
||||
return alertConfigStartTime_;
|
||||
|
||||
97
cms/src/model/CreateMonitorGroupByResourceGroupIdRequest.cc
Normal file
97
cms/src/model/CreateMonitorGroupByResourceGroupIdRequest.cc
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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/CreateMonitorGroupByResourceGroupIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::CreateMonitorGroupByResourceGroupIdRequest;
|
||||
|
||||
CreateMonitorGroupByResourceGroupIdRequest::CreateMonitorGroupByResourceGroupIdRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "CreateMonitorGroupByResourceGroupId")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateMonitorGroupByResourceGroupIdRequest::~CreateMonitorGroupByResourceGroupIdRequest()
|
||||
{}
|
||||
|
||||
std::string CreateMonitorGroupByResourceGroupIdRequest::getResourceGroupName()const
|
||||
{
|
||||
return resourceGroupName_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setResourceGroupName(const std::string& resourceGroupName)
|
||||
{
|
||||
resourceGroupName_ = resourceGroupName;
|
||||
setParameter("ResourceGroupName", resourceGroupName);
|
||||
}
|
||||
|
||||
bool CreateMonitorGroupByResourceGroupIdRequest::getEnableSubscribeEvent()const
|
||||
{
|
||||
return enableSubscribeEvent_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setEnableSubscribeEvent(bool enableSubscribeEvent)
|
||||
{
|
||||
enableSubscribeEvent_ = enableSubscribeEvent;
|
||||
setParameter("EnableSubscribeEvent", enableSubscribeEvent ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateMonitorGroupByResourceGroupIdRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
bool CreateMonitorGroupByResourceGroupIdRequest::getEnableInstallAgent()const
|
||||
{
|
||||
return enableInstallAgent_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setEnableInstallAgent(bool enableInstallAgent)
|
||||
{
|
||||
enableInstallAgent_ = enableInstallAgent;
|
||||
setParameter("EnableInstallAgent", enableInstallAgent ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateMonitorGroupByResourceGroupIdRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateMonitorGroupByResourceGroupIdRequest::getContactGroupList()const
|
||||
{
|
||||
return contactGroupList_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdRequest::setContactGroupList(const std::vector<std::string>& contactGroupList)
|
||||
{
|
||||
contactGroupList_ = contactGroupList;
|
||||
for(int dep1 = 0; dep1!= contactGroupList.size(); dep1++) {
|
||||
setParameter("ContactGroupList."+ std::to_string(dep1), contactGroupList.at(dep1));
|
||||
}
|
||||
}
|
||||
|
||||
65
cms/src/model/CreateMonitorGroupByResourceGroupIdResult.cc
Normal file
65
cms/src/model/CreateMonitorGroupByResourceGroupIdResult.cc
Normal 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/CreateMonitorGroupByResourceGroupIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
CreateMonitorGroupByResourceGroupIdResult::CreateMonitorGroupByResourceGroupIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateMonitorGroupByResourceGroupIdResult::CreateMonitorGroupByResourceGroupIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateMonitorGroupByResourceGroupIdResult::~CreateMonitorGroupByResourceGroupIdResult()
|
||||
{}
|
||||
|
||||
void CreateMonitorGroupByResourceGroupIdResult::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 CreateMonitorGroupByResourceGroupIdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CreateMonitorGroupByResourceGroupIdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateMonitorGroupByResourceGroupIdResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ void CreateMonitorGroupInstancesRequest::setInstances(const std::vector<Instance
|
||||
}
|
||||
}
|
||||
|
||||
long CreateMonitorGroupInstancesRequest::getGroupId()const
|
||||
std::string CreateMonitorGroupInstancesRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void CreateMonitorGroupInstancesRequest::setGroupId(long groupId)
|
||||
void CreateMonitorGroupInstancesRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", std::to_string(groupId));
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,16 @@ void CreateSiteMonitorResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCreateResultListNode = value["CreateResultList"]["CreateResultListItem"];
|
||||
for (auto valueCreateResultListCreateResultListItem : allCreateResultListNode)
|
||||
{
|
||||
CreateResultListItem createResultListObject;
|
||||
if(!valueCreateResultListCreateResultListItem["TaskName"].isNull())
|
||||
createResultListObject.taskName = valueCreateResultListCreateResultListItem["TaskName"].asString();
|
||||
if(!valueCreateResultListCreateResultListItem["TaskId"].isNull())
|
||||
createResultListObject.taskId = valueCreateResultListCreateResultListItem["TaskId"].asString();
|
||||
createResultList_.push_back(createResultListObject);
|
||||
}
|
||||
auto dataNode = value["Data"];
|
||||
auto allAttachAlertResultNode = dataNode["AttachAlertResult"]["Contact"];
|
||||
for (auto dataNodeAttachAlertResultContact : allAttachAlertResultNode)
|
||||
@@ -62,8 +72,6 @@ void CreateSiteMonitorResult::parse(const std::string &payload)
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString();
|
||||
if(!value["AlertRule"].isNull())
|
||||
alertRule_ = value["AlertRule"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -77,6 +85,11 @@ CreateSiteMonitorResult::Data CreateSiteMonitorResult::getData()const
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::vector<CreateSiteMonitorResult::CreateResultListItem> CreateSiteMonitorResult::getCreateResultList()const
|
||||
{
|
||||
return createResultList_;
|
||||
}
|
||||
|
||||
std::string CreateSiteMonitorResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
@@ -87,8 +100,3 @@ std::string CreateSiteMonitorResult::getSuccess()const
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string CreateSiteMonitorResult::getAlertRule()const
|
||||
{
|
||||
return alertRule_;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/DescribeFolderListRequest.h>
|
||||
#include <alibabacloud/cms/model/DeleteLogMonitorRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeFolderListRequest;
|
||||
using AlibabaCloud::Cms::Model::DeleteLogMonitorRequest;
|
||||
|
||||
DescribeFolderListRequest::DescribeFolderListRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeFolderList")
|
||||
DeleteLogMonitorRequest::DeleteLogMonitorRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DeleteLogMonitor")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeFolderListRequest::~DescribeFolderListRequest()
|
||||
DeleteLogMonitorRequest::~DeleteLogMonitorRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeFolderListRequest::getAppName()const
|
||||
long DeleteLogMonitorRequest::getLogId()const
|
||||
{
|
||||
return appName_;
|
||||
return logId_;
|
||||
}
|
||||
|
||||
void DescribeFolderListRequest::setAppName(const std::string& appName)
|
||||
void DeleteLogMonitorRequest::setLogId(long logId)
|
||||
{
|
||||
appName_ = appName;
|
||||
setParameter("AppName", appName);
|
||||
logId_ = logId;
|
||||
setParameter("LogId", std::to_string(logId));
|
||||
}
|
||||
|
||||
65
cms/src/model/DeleteLogMonitorResult.cc
Normal file
65
cms/src/model/DeleteLogMonitorResult.cc
Normal 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/DeleteLogMonitorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DeleteLogMonitorResult::DeleteLogMonitorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteLogMonitorResult::DeleteLogMonitorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteLogMonitorResult::~DeleteLogMonitorResult()
|
||||
{}
|
||||
|
||||
void DeleteLogMonitorResult::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["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteLogMonitorResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DeleteLogMonitorResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteLogMonitorResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Cms::Model::DescribeActiveMetricRuleListRequest;
|
||||
DescribeActiveMetricRuleListRequest::DescribeActiveMetricRuleListRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeActiveMetricRuleList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeActiveMetricRuleListRequest::~DescribeActiveMetricRuleListRequest()
|
||||
|
||||
@@ -77,6 +77,70 @@ void DescribeActiveMetricRuleListResult::parse(const std::string &payload)
|
||||
datapointsObject.ruleName = valueDatapointsAlarm["RuleName"].asString();
|
||||
datapoints_.push_back(datapointsObject);
|
||||
}
|
||||
auto allAlertListNode = value["AlertList"]["Alert"];
|
||||
for (auto valueAlertListAlert : allAlertListNode)
|
||||
{
|
||||
Alert alertListObject;
|
||||
if(!valueAlertListAlert["RuleId"].isNull())
|
||||
alertListObject.ruleId = valueAlertListAlert["RuleId"].asString();
|
||||
if(!valueAlertListAlert["Namespace"].isNull())
|
||||
alertListObject._namespace = valueAlertListAlert["Namespace"].asString();
|
||||
if(!valueAlertListAlert["MetricName"].isNull())
|
||||
alertListObject.metricName = valueAlertListAlert["MetricName"].asString();
|
||||
if(!valueAlertListAlert["Period"].isNull())
|
||||
alertListObject.period = valueAlertListAlert["Period"].asString();
|
||||
if(!valueAlertListAlert["EffectiveInterval"].isNull())
|
||||
alertListObject.effectiveInterval = valueAlertListAlert["EffectiveInterval"].asString();
|
||||
if(!valueAlertListAlert["NoEffectiveInterval"].isNull())
|
||||
alertListObject.noEffectiveInterval = valueAlertListAlert["NoEffectiveInterval"].asString();
|
||||
if(!valueAlertListAlert["SilenceTime"].isNull())
|
||||
alertListObject.silenceTime = valueAlertListAlert["SilenceTime"].asString();
|
||||
if(!valueAlertListAlert["EnableState"].isNull())
|
||||
alertListObject.enableState = valueAlertListAlert["EnableState"].asString() == "true";
|
||||
if(!valueAlertListAlert["AlertState"].isNull())
|
||||
alertListObject.alertState = valueAlertListAlert["AlertState"].asString();
|
||||
if(!valueAlertListAlert["ContactGroups"].isNull())
|
||||
alertListObject.contactGroups = valueAlertListAlert["ContactGroups"].asString();
|
||||
if(!valueAlertListAlert["Webhook"].isNull())
|
||||
alertListObject.webhook = valueAlertListAlert["Webhook"].asString();
|
||||
if(!valueAlertListAlert["MailSubject"].isNull())
|
||||
alertListObject.mailSubject = valueAlertListAlert["MailSubject"].asString();
|
||||
if(!valueAlertListAlert["RuleName"].isNull())
|
||||
alertListObject.ruleName = valueAlertListAlert["RuleName"].asString();
|
||||
if(!valueAlertListAlert["Resources"].isNull())
|
||||
alertListObject.resources = valueAlertListAlert["Resources"].asString();
|
||||
if(!valueAlertListAlert["Dimensions"].isNull())
|
||||
alertListObject.dimensions = valueAlertListAlert["Dimensions"].asString();
|
||||
auto escalationsNode = value["Escalations"];
|
||||
auto infoNode = escalationsNode["Info"];
|
||||
if(!infoNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.info.comparisonOperator = infoNode["ComparisonOperator"].asString();
|
||||
if(!infoNode["Statistics"].isNull())
|
||||
alertListObject.escalations.info.statistics = infoNode["Statistics"].asString();
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alertListObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Times"].isNull())
|
||||
alertListObject.escalations.info.times = infoNode["Times"].asString();
|
||||
auto warnNode = escalationsNode["Warn"];
|
||||
if(!warnNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
|
||||
if(!warnNode["Statistics"].isNull())
|
||||
alertListObject.escalations.warn.statistics = warnNode["Statistics"].asString();
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alertListObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Times"].isNull())
|
||||
alertListObject.escalations.warn.times = warnNode["Times"].asString();
|
||||
auto criticalNode = escalationsNode["Critical"];
|
||||
if(!criticalNode["ComparisonOperator"].isNull())
|
||||
alertListObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
|
||||
if(!criticalNode["Statistics"].isNull())
|
||||
alertListObject.escalations.critical.statistics = criticalNode["Statistics"].asString();
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alertListObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Times"].isNull())
|
||||
alertListObject.escalations.critical.times = criticalNode["Times"].asString();
|
||||
alertList_.push_back(alertListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
@@ -91,6 +155,11 @@ std::string DescribeActiveMetricRuleListResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<DescribeActiveMetricRuleListResult::Alert> DescribeActiveMetricRuleListResult::getAlertList()const
|
||||
{
|
||||
return alertList_;
|
||||
}
|
||||
|
||||
std::vector<DescribeActiveMetricRuleListResult::Alarm> DescribeActiveMetricRuleListResult::getDatapoints()const
|
||||
{
|
||||
return datapoints_;
|
||||
|
||||
194
cms/src/model/DescribeAlertLogCountRequest.cc
Normal file
194
cms/src/model/DescribeAlertLogCountRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/DescribeAlertLogCountRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeAlertLogCountRequest;
|
||||
|
||||
DescribeAlertLogCountRequest::DescribeAlertLogCountRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeAlertLogCount")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeAlertLogCountRequest::~DescribeAlertLogCountRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getSendStatus()const
|
||||
{
|
||||
return sendStatus_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setSendStatus(const std::string& sendStatus)
|
||||
{
|
||||
sendStatus_ = sendStatus;
|
||||
setParameter("SendStatus", sendStatus);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getContactGroup()const
|
||||
{
|
||||
return contactGroup_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setContactGroup(const std::string& contactGroup)
|
||||
{
|
||||
contactGroup_ = contactGroup;
|
||||
setParameter("ContactGroup", contactGroup);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getSearchKey()const
|
||||
{
|
||||
return searchKey_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setSearchKey(const std::string& searchKey)
|
||||
{
|
||||
searchKey_ = searchKey;
|
||||
setParameter("SearchKey", searchKey);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getRuleName()const
|
||||
{
|
||||
return ruleName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setRuleName(const std::string& ruleName)
|
||||
{
|
||||
ruleName_ = ruleName;
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
long DescribeAlertLogCountRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
int DescribeAlertLogCountRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getLastMin()const
|
||||
{
|
||||
return lastMin_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setLastMin(const std::string& lastMin)
|
||||
{
|
||||
lastMin_ = lastMin;
|
||||
setParameter("LastMin", lastMin);
|
||||
}
|
||||
|
||||
int DescribeAlertLogCountRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
long DescribeAlertLogCountRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::getGroupBy()const
|
||||
{
|
||||
return groupBy_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::setGroupBy(const std::string& groupBy)
|
||||
{
|
||||
groupBy_ = groupBy;
|
||||
setParameter("GroupBy", groupBy);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountRequest::get_Namespace()const
|
||||
{
|
||||
return _namespace_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogCountRequest::set_Namespace(const std::string& _namespace)
|
||||
{
|
||||
_namespace_ = _namespace;
|
||||
setParameter("_Namespace", _namespace);
|
||||
}
|
||||
|
||||
88
cms/src/model/DescribeAlertLogCountResult.cc
Normal file
88
cms/src/model/DescribeAlertLogCountResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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/DescribeAlertLogCountResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeAlertLogCountResult::DescribeAlertLogCountResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAlertLogCountResult::DescribeAlertLogCountResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAlertLogCountResult::~DescribeAlertLogCountResult()
|
||||
{}
|
||||
|
||||
void DescribeAlertLogCountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAlertLogCountNode = value["AlertLogCount"]["AlertLogCountItem"];
|
||||
for (auto valueAlertLogCountAlertLogCountItem : allAlertLogCountNode)
|
||||
{
|
||||
AlertLogCountItem alertLogCountObject;
|
||||
if(!valueAlertLogCountAlertLogCountItem["Count"].isNull())
|
||||
alertLogCountObject.count = std::stoi(valueAlertLogCountAlertLogCountItem["Count"].asString());
|
||||
auto allLogsNode = valueAlertLogCountAlertLogCountItem["Logs"]["LogsItem"];
|
||||
for (auto valueAlertLogCountAlertLogCountItemLogsLogsItem : allLogsNode)
|
||||
{
|
||||
AlertLogCountItem::LogsItem logsObject;
|
||||
if(!valueAlertLogCountAlertLogCountItemLogsLogsItem["Name"].isNull())
|
||||
logsObject.name = valueAlertLogCountAlertLogCountItemLogsLogsItem["Name"].asString();
|
||||
if(!valueAlertLogCountAlertLogCountItemLogsLogsItem["Value"].isNull())
|
||||
logsObject.value = valueAlertLogCountAlertLogCountItemLogsLogsItem["Value"].asString();
|
||||
alertLogCountObject.logs.push_back(logsObject);
|
||||
}
|
||||
alertLogCount_.push_back(alertLogCountObject);
|
||||
}
|
||||
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 DescribeAlertLogCountResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<DescribeAlertLogCountResult::AlertLogCountItem> DescribeAlertLogCountResult::getAlertLogCount()const
|
||||
{
|
||||
return alertLogCount_;
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogCountResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeAlertLogCountResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
194
cms/src/model/DescribeAlertLogHistogramRequest.cc
Normal file
194
cms/src/model/DescribeAlertLogHistogramRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/DescribeAlertLogHistogramRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeAlertLogHistogramRequest;
|
||||
|
||||
DescribeAlertLogHistogramRequest::DescribeAlertLogHistogramRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeAlertLogHistogram")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeAlertLogHistogramRequest::~DescribeAlertLogHistogramRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getSendStatus()const
|
||||
{
|
||||
return sendStatus_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setSendStatus(const std::string& sendStatus)
|
||||
{
|
||||
sendStatus_ = sendStatus;
|
||||
setParameter("SendStatus", sendStatus);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getContactGroup()const
|
||||
{
|
||||
return contactGroup_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setContactGroup(const std::string& contactGroup)
|
||||
{
|
||||
contactGroup_ = contactGroup;
|
||||
setParameter("ContactGroup", contactGroup);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getSearchKey()const
|
||||
{
|
||||
return searchKey_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setSearchKey(const std::string& searchKey)
|
||||
{
|
||||
searchKey_ = searchKey;
|
||||
setParameter("SearchKey", searchKey);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getRuleName()const
|
||||
{
|
||||
return ruleName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setRuleName(const std::string& ruleName)
|
||||
{
|
||||
ruleName_ = ruleName;
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
long DescribeAlertLogHistogramRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
int DescribeAlertLogHistogramRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getLastMin()const
|
||||
{
|
||||
return lastMin_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setLastMin(const std::string& lastMin)
|
||||
{
|
||||
lastMin_ = lastMin;
|
||||
setParameter("LastMin", lastMin);
|
||||
}
|
||||
|
||||
int DescribeAlertLogHistogramRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
long DescribeAlertLogHistogramRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::getGroupBy()const
|
||||
{
|
||||
return groupBy_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::setGroupBy(const std::string& groupBy)
|
||||
{
|
||||
groupBy_ = groupBy;
|
||||
setParameter("GroupBy", groupBy);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramRequest::get_Namespace()const
|
||||
{
|
||||
return _namespace_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogHistogramRequest::set_Namespace(const std::string& _namespace)
|
||||
{
|
||||
_namespace_ = _namespace;
|
||||
setParameter("_Namespace", _namespace);
|
||||
}
|
||||
|
||||
82
cms/src/model/DescribeAlertLogHistogramResult.cc
Normal file
82
cms/src/model/DescribeAlertLogHistogramResult.cc
Normal 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/DescribeAlertLogHistogramResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeAlertLogHistogramResult::DescribeAlertLogHistogramResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAlertLogHistogramResult::DescribeAlertLogHistogramResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAlertLogHistogramResult::~DescribeAlertLogHistogramResult()
|
||||
{}
|
||||
|
||||
void DescribeAlertLogHistogramResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAlertLogHistogramListNode = value["AlertLogHistogramList"]["AlertLogHistogramListItem"];
|
||||
for (auto valueAlertLogHistogramListAlertLogHistogramListItem : allAlertLogHistogramListNode)
|
||||
{
|
||||
AlertLogHistogramListItem alertLogHistogramListObject;
|
||||
if(!valueAlertLogHistogramListAlertLogHistogramListItem["Count"].isNull())
|
||||
alertLogHistogramListObject.count = std::stoi(valueAlertLogHistogramListAlertLogHistogramListItem["Count"].asString());
|
||||
if(!valueAlertLogHistogramListAlertLogHistogramListItem["From"].isNull())
|
||||
alertLogHistogramListObject.from = std::stol(valueAlertLogHistogramListAlertLogHistogramListItem["From"].asString());
|
||||
if(!valueAlertLogHistogramListAlertLogHistogramListItem["To"].isNull())
|
||||
alertLogHistogramListObject.to = std::stol(valueAlertLogHistogramListAlertLogHistogramListItem["To"].asString());
|
||||
alertLogHistogramList_.push_back(alertLogHistogramListObject);
|
||||
}
|
||||
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 DescribeAlertLogHistogramResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<DescribeAlertLogHistogramResult::AlertLogHistogramListItem> DescribeAlertLogHistogramResult::getAlertLogHistogramList()const
|
||||
{
|
||||
return alertLogHistogramList_;
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogHistogramResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeAlertLogHistogramResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
194
cms/src/model/DescribeAlertLogListRequest.cc
Normal file
194
cms/src/model/DescribeAlertLogListRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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/DescribeAlertLogListRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeAlertLogListRequest;
|
||||
|
||||
DescribeAlertLogListRequest::DescribeAlertLogListRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeAlertLogList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeAlertLogListRequest::~DescribeAlertLogListRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getSendStatus()const
|
||||
{
|
||||
return sendStatus_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setSendStatus(const std::string& sendStatus)
|
||||
{
|
||||
sendStatus_ = sendStatus;
|
||||
setParameter("SendStatus", sendStatus);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getContactGroup()const
|
||||
{
|
||||
return contactGroup_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setContactGroup(const std::string& contactGroup)
|
||||
{
|
||||
contactGroup_ = contactGroup;
|
||||
setParameter("ContactGroup", contactGroup);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getSearchKey()const
|
||||
{
|
||||
return searchKey_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setSearchKey(const std::string& searchKey)
|
||||
{
|
||||
searchKey_ = searchKey;
|
||||
setParameter("SearchKey", searchKey);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getRuleName()const
|
||||
{
|
||||
return ruleName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setRuleName(const std::string& ruleName)
|
||||
{
|
||||
ruleName_ = ruleName;
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
long DescribeAlertLogListRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
int DescribeAlertLogListRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getLastMin()const
|
||||
{
|
||||
return lastMin_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setLastMin(const std::string& lastMin)
|
||||
{
|
||||
lastMin_ = lastMin;
|
||||
setParameter("LastMin", lastMin);
|
||||
}
|
||||
|
||||
int DescribeAlertLogListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
long DescribeAlertLogListRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::getGroupBy()const
|
||||
{
|
||||
return groupBy_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::setGroupBy(const std::string& groupBy)
|
||||
{
|
||||
groupBy_ = groupBy;
|
||||
setParameter("GroupBy", groupBy);
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListRequest::get_Namespace()const
|
||||
{
|
||||
return _namespace_;
|
||||
}
|
||||
|
||||
void DescribeAlertLogListRequest::set_Namespace(const std::string& _namespace)
|
||||
{
|
||||
_namespace_ = _namespace;
|
||||
setParameter("_Namespace", _namespace);
|
||||
}
|
||||
|
||||
178
cms/src/model/DescribeAlertLogListResult.cc
Normal file
178
cms/src/model/DescribeAlertLogListResult.cc
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* 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/DescribeAlertLogListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeAlertLogListResult::DescribeAlertLogListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAlertLogListResult::DescribeAlertLogListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAlertLogListResult::~DescribeAlertLogListResult()
|
||||
{}
|
||||
|
||||
void DescribeAlertLogListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAlertLogListNode = value["AlertLogList"]["Alarm"];
|
||||
for (auto valueAlertLogListAlarm : allAlertLogListNode)
|
||||
{
|
||||
Alarm alertLogListObject;
|
||||
if(!valueAlertLogListAlarm["RuleId"].isNull())
|
||||
alertLogListObject.ruleId = valueAlertLogListAlarm["RuleId"].asString();
|
||||
if(!valueAlertLogListAlarm["RuleName"].isNull())
|
||||
alertLogListObject.ruleName = valueAlertLogListAlarm["RuleName"].asString();
|
||||
if(!valueAlertLogListAlarm["Namespace"].isNull())
|
||||
alertLogListObject._namespace = valueAlertLogListAlarm["Namespace"].asString();
|
||||
if(!valueAlertLogListAlarm["Product"].isNull())
|
||||
alertLogListObject.product = valueAlertLogListAlarm["Product"].asString();
|
||||
if(!valueAlertLogListAlarm["EventName"].isNull())
|
||||
alertLogListObject.eventName = valueAlertLogListAlarm["EventName"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupId"].isNull())
|
||||
alertLogListObject.groupId = valueAlertLogListAlarm["GroupId"].asString();
|
||||
if(!valueAlertLogListAlarm["GroupName"].isNull())
|
||||
alertLogListObject.groupName = valueAlertLogListAlarm["GroupName"].asString();
|
||||
if(!valueAlertLogListAlarm["MetricName"].isNull())
|
||||
alertLogListObject.metricName = valueAlertLogListAlarm["MetricName"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceId"].isNull())
|
||||
alertLogListObject.instanceId = valueAlertLogListAlarm["InstanceId"].asString();
|
||||
if(!valueAlertLogListAlarm["InstanceName"].isNull())
|
||||
alertLogListObject.instanceName = valueAlertLogListAlarm["InstanceName"].asString();
|
||||
if(!valueAlertLogListAlarm["Level"].isNull())
|
||||
alertLogListObject.level = valueAlertLogListAlarm["Level"].asString();
|
||||
if(!valueAlertLogListAlarm["LevelChange"].isNull())
|
||||
alertLogListObject.levelChange = valueAlertLogListAlarm["LevelChange"].asString();
|
||||
if(!valueAlertLogListAlarm["SendStatus"].isNull())
|
||||
alertLogListObject.sendStatus = valueAlertLogListAlarm["SendStatus"].asString();
|
||||
if(!valueAlertLogListAlarm["AlertTime"].isNull())
|
||||
alertLogListObject.alertTime = valueAlertLogListAlarm["AlertTime"].asString();
|
||||
if(!valueAlertLogListAlarm["Message"].isNull())
|
||||
alertLogListObject.message = valueAlertLogListAlarm["Message"].asString();
|
||||
auto allExtendedInfoNode = valueAlertLogListAlarm["ExtendedInfo"]["ExtInfo"];
|
||||
for (auto valueAlertLogListAlarmExtendedInfoExtInfo : allExtendedInfoNode)
|
||||
{
|
||||
Alarm::ExtInfo extendedInfoObject;
|
||||
if(!valueAlertLogListAlarmExtendedInfoExtInfo["Name"].isNull())
|
||||
extendedInfoObject.name = valueAlertLogListAlarmExtendedInfoExtInfo["Name"].asString();
|
||||
if(!valueAlertLogListAlarmExtendedInfoExtInfo["Value"].isNull())
|
||||
extendedInfoObject.value = valueAlertLogListAlarmExtendedInfoExtInfo["Value"].asString();
|
||||
alertLogListObject.extendedInfo.push_back(extendedInfoObject);
|
||||
}
|
||||
auto allDimensionsNode = valueAlertLogListAlarm["Dimensions"]["DimensionsItem"];
|
||||
for (auto valueAlertLogListAlarmDimensionsDimensionsItem : allDimensionsNode)
|
||||
{
|
||||
Alarm::DimensionsItem dimensionsObject;
|
||||
if(!valueAlertLogListAlarmDimensionsDimensionsItem["Key"].isNull())
|
||||
dimensionsObject.key = valueAlertLogListAlarmDimensionsDimensionsItem["Key"].asString();
|
||||
if(!valueAlertLogListAlarmDimensionsDimensionsItem["Value"].isNull())
|
||||
dimensionsObject.value = valueAlertLogListAlarmDimensionsDimensionsItem["Value"].asString();
|
||||
alertLogListObject.dimensions.push_back(dimensionsObject);
|
||||
}
|
||||
auto escalationNode = value["Escalation"];
|
||||
if(!escalationNode["Times"].isNull())
|
||||
alertLogListObject.escalation.times = std::stoi(escalationNode["Times"].asString());
|
||||
if(!escalationNode["Expression"].isNull())
|
||||
alertLogListObject.escalation.expression = escalationNode["Expression"].asString();
|
||||
if(!escalationNode["Level"].isNull())
|
||||
alertLogListObject.escalation.level = escalationNode["Level"].asString();
|
||||
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
|
||||
for (auto value : allContactGroups)
|
||||
alertLogListObject.contactGroups.push_back(value.asString());
|
||||
auto allWebhookList = value["WebhookList"]["WebhookList"];
|
||||
for (auto value : allWebhookList)
|
||||
alertLogListObject.webhookList.push_back(value.asString());
|
||||
auto allContactALIIWWList = value["ContactALIIWWList"]["ContactALIIMs"];
|
||||
for (auto value : allContactALIIWWList)
|
||||
alertLogListObject.contactALIIWWList.push_back(value.asString());
|
||||
auto allContactSMSList = value["ContactSMSList"]["ContactSMSList"];
|
||||
for (auto value : allContactSMSList)
|
||||
alertLogListObject.contactSMSList.push_back(value.asString());
|
||||
auto allContactOnCallList = value["ContactOnCallList"]["ContactOnCallList"];
|
||||
for (auto value : allContactOnCallList)
|
||||
alertLogListObject.contactOnCallList.push_back(value.asString());
|
||||
auto allContactMailList = value["ContactMailList"]["ContactMailList"];
|
||||
for (auto value : allContactMailList)
|
||||
alertLogListObject.contactMailList.push_back(value.asString());
|
||||
auto allContactDingList = value["ContactDingList"]["ContactDingList"];
|
||||
for (auto value : allContactDingList)
|
||||
alertLogListObject.contactDingList.push_back(value.asString());
|
||||
auto allDingdingWebhookList = value["DingdingWebhookList"]["ContactDingList"];
|
||||
for (auto value : allDingdingWebhookList)
|
||||
alertLogListObject.dingdingWebhookList.push_back(value.asString());
|
||||
alertLogList_.push_back(alertLogListObject);
|
||||
}
|
||||
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["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeAlertLogListResult::Alarm> DescribeAlertLogListResult::getAlertLogList()const
|
||||
{
|
||||
return alertLogList_;
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DescribeAlertLogListResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeAlertLogListResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeAlertLogListResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string DescribeAlertLogListResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeAlertLogListResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,17 @@ void DescribeAlertingMetricRuleResourcesRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeAlertingMetricRuleResourcesRequest::get_Namespace()const
|
||||
{
|
||||
return _namespace_;
|
||||
}
|
||||
|
||||
void DescribeAlertingMetricRuleResourcesRequest::set_Namespace(const std::string& _namespace)
|
||||
{
|
||||
_namespace_ = _namespace;
|
||||
setParameter("_Namespace", _namespace);
|
||||
}
|
||||
|
||||
int DescribeAlertingMetricRuleResourcesRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
|
||||
@@ -51,20 +51,52 @@ void DescribeAlertingMetricRuleResourcesResult::parse(const std::string &payload
|
||||
resourcesObject.groupId = valueResourcesResource["GroupId"].asString();
|
||||
if(!valueResourcesResource["Resource"].isNull())
|
||||
resourcesObject.resource = valueResourcesResource["Resource"].asString();
|
||||
if(!valueResourcesResource["MetricName"].isNull())
|
||||
resourcesObject.metricName = valueResourcesResource["MetricName"].asString();
|
||||
if(!valueResourcesResource["Namespace"].isNull())
|
||||
resourcesObject._namespace = valueResourcesResource["Namespace"].asString();
|
||||
if(!valueResourcesResource["Enable"].isNull())
|
||||
resourcesObject.enable = valueResourcesResource["Enable"].asString();
|
||||
if(!valueResourcesResource["LastAlertTime"].isNull())
|
||||
resourcesObject.lastAlertTime = valueResourcesResource["LastAlertTime"].asString();
|
||||
if(!valueResourcesResource["LastModifyTime"].isNull())
|
||||
resourcesObject.lastModifyTime = valueResourcesResource["LastModifyTime"].asString();
|
||||
if(!valueResourcesResource["Dimensions"].isNull())
|
||||
resourcesObject.dimensions = valueResourcesResource["Dimensions"].asString();
|
||||
if(!valueResourcesResource["StartTime"].isNull())
|
||||
resourcesObject.startTime = valueResourcesResource["StartTime"].asString();
|
||||
if(!valueResourcesResource["MetricValues"].isNull())
|
||||
resourcesObject.metricValues = valueResourcesResource["MetricValues"].asString();
|
||||
if(!valueResourcesResource["RetryTimes"].isNull())
|
||||
resourcesObject.retryTimes = valueResourcesResource["RetryTimes"].asString();
|
||||
if(!valueResourcesResource["Statistics"].isNull())
|
||||
resourcesObject.statistics = valueResourcesResource["Statistics"].asString();
|
||||
if(!valueResourcesResource["Threshold"].isNull())
|
||||
resourcesObject.threshold = valueResourcesResource["Threshold"].asString();
|
||||
if(!valueResourcesResource["ProductCategory"].isNull())
|
||||
resourcesObject.productCategory = valueResourcesResource["ProductCategory"].asString();
|
||||
if(!valueResourcesResource["Level"].isNull())
|
||||
resourcesObject.level = std::stoi(valueResourcesResource["Level"].asString());
|
||||
auto allEscalationNode = valueResourcesResource["Escalation"]["Resource"];
|
||||
for (auto valueResourcesResourceEscalationResource : allEscalationNode)
|
||||
{
|
||||
Resource::Resource1 escalationObject;
|
||||
if(!valueResourcesResourceEscalationResource["Expression"].isNull())
|
||||
escalationObject.expression = valueResourcesResourceEscalationResource["Expression"].asString();
|
||||
if(!valueResourcesResourceEscalationResource["PreCondition"].isNull())
|
||||
escalationObject.preCondition = valueResourcesResourceEscalationResource["PreCondition"].asString();
|
||||
if(!valueResourcesResourceEscalationResource["Level"].isNull())
|
||||
escalationObject.level = std::stoi(valueResourcesResourceEscalationResource["Level"].asString());
|
||||
if(!valueResourcesResourceEscalationResource["Times"].isNull())
|
||||
escalationObject.times = std::stoi(valueResourcesResourceEscalationResource["Times"].asString());
|
||||
if(!valueResourcesResourceEscalationResource["ComparisonOperator"].isNull())
|
||||
escalationObject.comparisonOperator = valueResourcesResourceEscalationResource["ComparisonOperator"].asString();
|
||||
if(!valueResourcesResourceEscalationResource["Tag"].isNull())
|
||||
escalationObject.tag = valueResourcesResourceEscalationResource["Tag"].asString();
|
||||
if(!valueResourcesResourceEscalationResource["Threshold"].isNull())
|
||||
escalationObject.threshold = valueResourcesResourceEscalationResource["Threshold"].asString();
|
||||
resourcesObject.escalation.push_back(escalationObject);
|
||||
}
|
||||
resources_.push_back(resourcesObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -39,6 +39,27 @@ void DescribeContactGroupListResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allContactGroupListNode = value["ContactGroupList"]["ContactGroup"];
|
||||
for (auto valueContactGroupListContactGroup : allContactGroupListNode)
|
||||
{
|
||||
ContactGroup contactGroupListObject;
|
||||
if(!valueContactGroupListContactGroup["Name"].isNull())
|
||||
contactGroupListObject.name = valueContactGroupListContactGroup["Name"].asString();
|
||||
if(!valueContactGroupListContactGroup["Describe"].isNull())
|
||||
contactGroupListObject.describe = valueContactGroupListContactGroup["Describe"].asString();
|
||||
if(!valueContactGroupListContactGroup["CreateTime"].isNull())
|
||||
contactGroupListObject.createTime = std::stol(valueContactGroupListContactGroup["CreateTime"].asString());
|
||||
if(!valueContactGroupListContactGroup["UpdateTime"].isNull())
|
||||
contactGroupListObject.updateTime = std::stol(valueContactGroupListContactGroup["UpdateTime"].asString());
|
||||
if(!valueContactGroupListContactGroup["EnabledWeeklyReport"].isNull())
|
||||
contactGroupListObject.enabledWeeklyReport = valueContactGroupListContactGroup["EnabledWeeklyReport"].asString() == "true";
|
||||
if(!valueContactGroupListContactGroup["EnableSubscribed"].isNull())
|
||||
contactGroupListObject.enableSubscribed = valueContactGroupListContactGroup["EnableSubscribed"].asString() == "true";
|
||||
auto allContacts = value["Contacts"]["Contact"];
|
||||
for (auto value : allContacts)
|
||||
contactGroupListObject.contacts.push_back(value.asString());
|
||||
contactGroupList_.push_back(contactGroupListObject);
|
||||
}
|
||||
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
|
||||
for (const auto &item : allContactGroups)
|
||||
contactGroups_.push_back(item.asString());
|
||||
@@ -53,6 +74,11 @@ void DescribeContactGroupListResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeContactGroupListResult::ContactGroup> DescribeContactGroupListResult::getContactGroupList()const
|
||||
{
|
||||
return contactGroupList_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeContactGroupListResult::getContactGroups()const
|
||||
{
|
||||
return contactGroups_;
|
||||
|
||||
@@ -27,6 +27,17 @@ DescribeContactListRequest::DescribeContactListRequest() :
|
||||
DescribeContactListRequest::~DescribeContactListRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeContactListRequest::getChanelType()const
|
||||
{
|
||||
return chanelType_;
|
||||
}
|
||||
|
||||
void DescribeContactListRequest::setChanelType(const std::string& chanelType)
|
||||
{
|
||||
chanelType_ = chanelType;
|
||||
setParameter("ChanelType", chanelType);
|
||||
}
|
||||
|
||||
int DescribeContactListRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
@@ -60,3 +71,14 @@ void DescribeContactListRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeContactListRequest::getChanelValue()const
|
||||
{
|
||||
return chanelValue_;
|
||||
}
|
||||
|
||||
void DescribeContactListRequest::setChanelValue(const std::string& chanelValue)
|
||||
{
|
||||
chanelValue_ = chanelValue;
|
||||
setParameter("ChanelValue", chanelValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ void DescribeContactListResult::parse(const std::string &payload)
|
||||
contactsObject.name = valueContactsContact["Name"].asString();
|
||||
if(!valueContactsContact["Desc"].isNull())
|
||||
contactsObject.desc = valueContactsContact["Desc"].asString();
|
||||
if(!valueContactsContact["Lang"].isNull())
|
||||
contactsObject.lang = valueContactsContact["Lang"].asString();
|
||||
if(!valueContactsContact["CreateTime"].isNull())
|
||||
contactsObject.createTime = std::stol(valueContactsContact["CreateTime"].asString());
|
||||
if(!valueContactsContact["UpdateTime"].isNull())
|
||||
@@ -60,6 +62,18 @@ void DescribeContactListResult::parse(const std::string &payload)
|
||||
contactsObject.channels.aliIM = channelsNode["AliIM"].asString();
|
||||
if(!channelsNode["DingWebHook"].isNull())
|
||||
contactsObject.channels.dingWebHook = channelsNode["DingWebHook"].asString();
|
||||
auto channelsStateNode = value["ChannelsState"];
|
||||
if(!channelsStateNode["SMS"].isNull())
|
||||
contactsObject.channelsState.sMS = channelsStateNode["SMS"].asString();
|
||||
if(!channelsStateNode["Mail"].isNull())
|
||||
contactsObject.channelsState.mail = channelsStateNode["Mail"].asString();
|
||||
if(!channelsStateNode["AliIM"].isNull())
|
||||
contactsObject.channelsState.aliIM = channelsStateNode["AliIM"].asString();
|
||||
if(!channelsStateNode["DingWebHook"].isNull())
|
||||
contactsObject.channelsState.dingWebHook = channelsStateNode["DingWebHook"].asString();
|
||||
auto allContactGroups = value["ContactGroups"]["ContactGroup"];
|
||||
for (auto value : allContactGroups)
|
||||
contactsObject.contactGroups.push_back(value.asString());
|
||||
contacts_.push_back(contactsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -82,17 +82,6 @@ void DescribeCustomEventAttributeRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeCustomEventAttributeRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeCustomEventAttributeRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeCustomEventAttributeRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
|
||||
@@ -38,17 +38,6 @@ void DescribeCustomEventCountRequest::setEventId(const std::string& eventId)
|
||||
setParameter("EventId", eventId);
|
||||
}
|
||||
|
||||
std::string DescribeCustomEventCountRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeCustomEventCountRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeCustomEventCountRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
|
||||
@@ -53,14 +53,14 @@ void DescribeDynamicTagRuleListResult::parse(const std::string &payload)
|
||||
tagGroupListObject.matchExpressFilterRelation = valueTagGroupListTagGroup["MatchExpressFilterRelation"].asString();
|
||||
if(!valueTagGroupListTagGroup["Status"].isNull())
|
||||
tagGroupListObject.status = valueTagGroupListTagGroup["Status"].asString();
|
||||
auto allMatchExpressNode = allTagGroupListNode["MatchExpress"]["MatchExpressItem"];
|
||||
for (auto allTagGroupListNodeMatchExpressMatchExpressItem : allMatchExpressNode)
|
||||
auto allMatchExpressNode = valueTagGroupListTagGroup["MatchExpress"]["MatchExpressItem"];
|
||||
for (auto valueTagGroupListTagGroupMatchExpressMatchExpressItem : allMatchExpressNode)
|
||||
{
|
||||
TagGroup::MatchExpressItem matchExpressObject;
|
||||
if(!allTagGroupListNodeMatchExpressMatchExpressItem["TagValueMatchFunction"].isNull())
|
||||
matchExpressObject.tagValueMatchFunction = allTagGroupListNodeMatchExpressMatchExpressItem["TagValueMatchFunction"].asString();
|
||||
if(!allTagGroupListNodeMatchExpressMatchExpressItem["TagValue"].isNull())
|
||||
matchExpressObject.tagValue = allTagGroupListNodeMatchExpressMatchExpressItem["TagValue"].asString();
|
||||
if(!valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].isNull())
|
||||
matchExpressObject.tagValueMatchFunction = valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValueMatchFunction"].asString();
|
||||
if(!valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValue"].isNull())
|
||||
matchExpressObject.tagValue = valueTagGroupListTagGroupMatchExpressMatchExpressItem["TagValue"].asString();
|
||||
tagGroupListObject.matchExpress.push_back(matchExpressObject);
|
||||
}
|
||||
auto allTemplateIdList = value["TemplateIdList"]["TemplateIdList"];
|
||||
|
||||
@@ -53,12 +53,12 @@ void DescribeEventRuleListResult::parse(const std::string &payload)
|
||||
eventRulesObject.state = valueEventRulesEventRule["State"].asString();
|
||||
if(!valueEventRulesEventRule["Description"].isNull())
|
||||
eventRulesObject.description = valueEventRulesEventRule["Description"].asString();
|
||||
auto allEventPatternNode = allEventRulesNode["EventPattern"]["EventPatternItem"];
|
||||
for (auto allEventRulesNodeEventPatternEventPatternItem : allEventPatternNode)
|
||||
auto allEventPatternNode = valueEventRulesEventRule["EventPattern"]["EventPatternItem"];
|
||||
for (auto valueEventRulesEventRuleEventPatternEventPatternItem : allEventPatternNode)
|
||||
{
|
||||
EventRule::EventPatternItem eventPatternObject;
|
||||
if(!allEventRulesNodeEventPatternEventPatternItem["Product"].isNull())
|
||||
eventPatternObject.product = allEventRulesNodeEventPatternEventPatternItem["Product"].asString();
|
||||
if(!valueEventRulesEventRuleEventPatternEventPatternItem["Product"].isNull())
|
||||
eventPatternObject.product = valueEventRulesEventRuleEventPatternEventPatternItem["Product"].asString();
|
||||
auto allNameList = value["NameList"]["NameList"];
|
||||
for (auto value : allNameList)
|
||||
eventPatternObject.nameList.push_back(value.asString());
|
||||
|
||||
@@ -1,96 +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/DescribeFolderListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeFolderListResult::DescribeFolderListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeFolderListResult::DescribeFolderListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeFolderListResult::~DescribeFolderListResult()
|
||||
{}
|
||||
|
||||
void DescribeFolderListResult::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["ServiceId"].isNull())
|
||||
resource_.serviceId = std::stol(resourceNode["ServiceId"].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["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());
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeFolderListResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DescribeFolderListResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeFolderListResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeFolderListResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
DescribeFolderListResult::Resource DescribeFolderListResult::getResource()const
|
||||
{
|
||||
return resource_;
|
||||
}
|
||||
|
||||
int DescribeFolderListResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeFolderListResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -51,40 +51,40 @@ void DescribeGroupMonitoringAgentProcessResult::parse(const std::string &payload
|
||||
processesObject.processName = valueProcessesProcess["ProcessName"].asString();
|
||||
if(!valueProcessesProcess["MatchExpressFilterRelation"].isNull())
|
||||
processesObject.matchExpressFilterRelation = valueProcessesProcess["MatchExpressFilterRelation"].asString();
|
||||
auto allMatchExpressNode = allProcessesNode["MatchExpress"]["MatchExpressItem"];
|
||||
for (auto allProcessesNodeMatchExpressMatchExpressItem : allMatchExpressNode)
|
||||
auto allMatchExpressNode = valueProcessesProcess["MatchExpress"]["MatchExpressItem"];
|
||||
for (auto valueProcessesProcessMatchExpressMatchExpressItem : allMatchExpressNode)
|
||||
{
|
||||
Process::MatchExpressItem matchExpressObject;
|
||||
if(!allProcessesNodeMatchExpressMatchExpressItem["Name"].isNull())
|
||||
matchExpressObject.name = allProcessesNodeMatchExpressMatchExpressItem["Name"].asString();
|
||||
if(!allProcessesNodeMatchExpressMatchExpressItem["Function"].isNull())
|
||||
matchExpressObject.function = allProcessesNodeMatchExpressMatchExpressItem["Function"].asString();
|
||||
if(!allProcessesNodeMatchExpressMatchExpressItem["Value"].isNull())
|
||||
matchExpressObject.value = allProcessesNodeMatchExpressMatchExpressItem["Value"].asString();
|
||||
if(!valueProcessesProcessMatchExpressMatchExpressItem["Name"].isNull())
|
||||
matchExpressObject.name = valueProcessesProcessMatchExpressMatchExpressItem["Name"].asString();
|
||||
if(!valueProcessesProcessMatchExpressMatchExpressItem["Function"].isNull())
|
||||
matchExpressObject.function = valueProcessesProcessMatchExpressMatchExpressItem["Function"].asString();
|
||||
if(!valueProcessesProcessMatchExpressMatchExpressItem["Value"].isNull())
|
||||
matchExpressObject.value = valueProcessesProcessMatchExpressMatchExpressItem["Value"].asString();
|
||||
processesObject.matchExpress.push_back(matchExpressObject);
|
||||
}
|
||||
auto allAlertConfigNode = allProcessesNode["AlertConfig"]["AlertConfigItem"];
|
||||
for (auto allProcessesNodeAlertConfigAlertConfigItem : allAlertConfigNode)
|
||||
auto allAlertConfigNode = valueProcessesProcess["AlertConfig"]["AlertConfigItem"];
|
||||
for (auto valueProcessesProcessAlertConfigAlertConfigItem : allAlertConfigNode)
|
||||
{
|
||||
Process::AlertConfigItem alertConfigObject;
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["EffectiveInterval"].isNull())
|
||||
alertConfigObject.effectiveInterval = allProcessesNodeAlertConfigAlertConfigItem["EffectiveInterval"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["NoEffectiveInterval"].isNull())
|
||||
alertConfigObject.noEffectiveInterval = allProcessesNodeAlertConfigAlertConfigItem["NoEffectiveInterval"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["SilenceTime"].isNull())
|
||||
alertConfigObject.silenceTime = allProcessesNodeAlertConfigAlertConfigItem["SilenceTime"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["Webhook"].isNull())
|
||||
alertConfigObject.webhook = allProcessesNodeAlertConfigAlertConfigItem["Webhook"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["EscalationsLevel"].isNull())
|
||||
alertConfigObject.escalationsLevel = allProcessesNodeAlertConfigAlertConfigItem["EscalationsLevel"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["ComparisonOperator"].isNull())
|
||||
alertConfigObject.comparisonOperator = allProcessesNodeAlertConfigAlertConfigItem["ComparisonOperator"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["Statistics"].isNull())
|
||||
alertConfigObject.statistics = allProcessesNodeAlertConfigAlertConfigItem["Statistics"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["Threshold"].isNull())
|
||||
alertConfigObject.threshold = allProcessesNodeAlertConfigAlertConfigItem["Threshold"].asString();
|
||||
if(!allProcessesNodeAlertConfigAlertConfigItem["Times"].isNull())
|
||||
alertConfigObject.times = allProcessesNodeAlertConfigAlertConfigItem["Times"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["EffectiveInterval"].isNull())
|
||||
alertConfigObject.effectiveInterval = valueProcessesProcessAlertConfigAlertConfigItem["EffectiveInterval"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["NoEffectiveInterval"].isNull())
|
||||
alertConfigObject.noEffectiveInterval = valueProcessesProcessAlertConfigAlertConfigItem["NoEffectiveInterval"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["SilenceTime"].isNull())
|
||||
alertConfigObject.silenceTime = valueProcessesProcessAlertConfigAlertConfigItem["SilenceTime"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["Webhook"].isNull())
|
||||
alertConfigObject.webhook = valueProcessesProcessAlertConfigAlertConfigItem["Webhook"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["EscalationsLevel"].isNull())
|
||||
alertConfigObject.escalationsLevel = valueProcessesProcessAlertConfigAlertConfigItem["EscalationsLevel"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["ComparisonOperator"].isNull())
|
||||
alertConfigObject.comparisonOperator = valueProcessesProcessAlertConfigAlertConfigItem["ComparisonOperator"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["Statistics"].isNull())
|
||||
alertConfigObject.statistics = valueProcessesProcessAlertConfigAlertConfigItem["Statistics"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["Threshold"].isNull())
|
||||
alertConfigObject.threshold = valueProcessesProcessAlertConfigAlertConfigItem["Threshold"].asString();
|
||||
if(!valueProcessesProcessAlertConfigAlertConfigItem["Times"].isNull())
|
||||
alertConfigObject.times = valueProcessesProcessAlertConfigAlertConfigItem["Times"].asString();
|
||||
processesObject.alertConfig.push_back(alertConfigObject);
|
||||
}
|
||||
processes_.push_back(processesObject);
|
||||
@@ -95,6 +95,12 @@ void DescribeGroupMonitoringAgentProcessResult::parse(const std::string &payload
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Total"].isNull())
|
||||
total_ = value["Total"].asString();
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = value["PageSize"].asString();
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = value["PageNumber"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -103,6 +109,21 @@ std::string DescribeGroupMonitoringAgentProcessResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupMonitoringAgentProcessResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupMonitoringAgentProcessResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupMonitoringAgentProcessResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<DescribeGroupMonitoringAgentProcessResult::Process> DescribeGroupMonitoringAgentProcessResult::getProcesses()const
|
||||
{
|
||||
return processes_;
|
||||
|
||||
@@ -64,6 +64,8 @@ void DescribeHostAvailabilityListResult::parse(const std::string &payload)
|
||||
taskListObject.taskOption.telnetOrPingHost = taskOptionNode["TelnetOrPingHost"].asString();
|
||||
if(!taskOptionNode["HttpResponseCharset"].isNull())
|
||||
taskListObject.taskOption.httpResponseCharset = taskOptionNode["HttpResponseCharset"].asString();
|
||||
if(!taskOptionNode["HttpPostContent"].isNull())
|
||||
taskListObject.taskOption.httpPostContent = taskOptionNode["HttpPostContent"].asString();
|
||||
if(!taskOptionNode["HttpKeyword"].isNull())
|
||||
taskListObject.taskOption.httpKeyword = taskOptionNode["HttpKeyword"].asString();
|
||||
if(!taskOptionNode["HttpMethod"].isNull())
|
||||
|
||||
40
cms/src/model/DescribeLogMonitorAttributeRequest.cc
Normal file
40
cms/src/model/DescribeLogMonitorAttributeRequest.cc
Normal 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/DescribeLogMonitorAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeLogMonitorAttributeRequest;
|
||||
|
||||
DescribeLogMonitorAttributeRequest::DescribeLogMonitorAttributeRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeLogMonitorAttribute")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeLogMonitorAttributeRequest::~DescribeLogMonitorAttributeRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeLogMonitorAttributeRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void DescribeLogMonitorAttributeRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
123
cms/src/model/DescribeLogMonitorAttributeResult.cc
Normal file
123
cms/src/model/DescribeLogMonitorAttributeResult.cc
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* 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/DescribeLogMonitorAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeLogMonitorAttributeResult::DescribeLogMonitorAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeLogMonitorAttributeResult::DescribeLogMonitorAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeLogMonitorAttributeResult::~DescribeLogMonitorAttributeResult()
|
||||
{}
|
||||
|
||||
void DescribeLogMonitorAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto logMonitorNode = value["LogMonitor"];
|
||||
if(!logMonitorNode["LogId"].isNull())
|
||||
logMonitor_.logId = std::stol(logMonitorNode["LogId"].asString());
|
||||
if(!logMonitorNode["SlsRegionId"].isNull())
|
||||
logMonitor_.slsRegionId = logMonitorNode["SlsRegionId"].asString();
|
||||
if(!logMonitorNode["SlsProject"].isNull())
|
||||
logMonitor_.slsProject = logMonitorNode["SlsProject"].asString();
|
||||
if(!logMonitorNode["SlsLogstore"].isNull())
|
||||
logMonitor_.slsLogstore = logMonitorNode["SlsLogstore"].asString();
|
||||
if(!logMonitorNode["MetricName"].isNull())
|
||||
logMonitor_.metricName = logMonitorNode["MetricName"].asString();
|
||||
if(!logMonitorNode["MetricExpress"].isNull())
|
||||
logMonitor_.metricExpress = logMonitorNode["MetricExpress"].asString();
|
||||
if(!logMonitorNode["GmtCreate"].isNull())
|
||||
logMonitor_.gmtCreate = std::stol(logMonitorNode["GmtCreate"].asString());
|
||||
if(!logMonitorNode["ValueFilterRelation"].isNull())
|
||||
logMonitor_.valueFilterRelation = logMonitorNode["ValueFilterRelation"].asString();
|
||||
if(!logMonitorNode["GroupId"].isNull())
|
||||
logMonitor_.groupId = std::stol(logMonitorNode["GroupId"].asString());
|
||||
auto allAggregatesNode = logMonitorNode["Aggregates"]["Aggregate"];
|
||||
for (auto logMonitorNodeAggregatesAggregate : allAggregatesNode)
|
||||
{
|
||||
LogMonitor::Aggregate aggregateObject;
|
||||
if(!logMonitorNodeAggregatesAggregate["Alias"].isNull())
|
||||
aggregateObject.alias = logMonitorNodeAggregatesAggregate["Alias"].asString();
|
||||
if(!logMonitorNodeAggregatesAggregate["FieldName"].isNull())
|
||||
aggregateObject.fieldName = logMonitorNodeAggregatesAggregate["FieldName"].asString();
|
||||
if(!logMonitorNodeAggregatesAggregate["Function"].isNull())
|
||||
aggregateObject.function = logMonitorNodeAggregatesAggregate["Function"].asString();
|
||||
if(!logMonitorNodeAggregatesAggregate["Min"].isNull())
|
||||
aggregateObject.min = logMonitorNodeAggregatesAggregate["Min"].asString();
|
||||
if(!logMonitorNodeAggregatesAggregate["Max"].isNull())
|
||||
aggregateObject.max = logMonitorNodeAggregatesAggregate["Max"].asString();
|
||||
logMonitor_.aggregates.push_back(aggregateObject);
|
||||
}
|
||||
auto allValueFilterNode = logMonitorNode["ValueFilter"]["ValueFilterObject"];
|
||||
for (auto logMonitorNodeValueFilterValueFilterObject : allValueFilterNode)
|
||||
{
|
||||
LogMonitor::ValueFilterObject valueFilterObjectObject;
|
||||
if(!logMonitorNodeValueFilterValueFilterObject["Key"].isNull())
|
||||
valueFilterObjectObject.key = logMonitorNodeValueFilterValueFilterObject["Key"].asString();
|
||||
if(!logMonitorNodeValueFilterValueFilterObject["Operator"].isNull())
|
||||
valueFilterObjectObject._operator = logMonitorNodeValueFilterValueFilterObject["Operator"].asString();
|
||||
if(!logMonitorNodeValueFilterValueFilterObject["Value"].isNull())
|
||||
valueFilterObjectObject.value = logMonitorNodeValueFilterValueFilterObject["Value"].asString();
|
||||
logMonitor_.valueFilter.push_back(valueFilterObjectObject);
|
||||
}
|
||||
auto allTumblingwindows = logMonitorNode["Tumblingwindows"]["Tumblingwindow"];
|
||||
for (auto value : allTumblingwindows)
|
||||
logMonitor_.tumblingwindows.push_back(value.asString());
|
||||
auto allGroupbys = logMonitorNode["Groupbys"]["Groupby"];
|
||||
for (auto value : allGroupbys)
|
||||
logMonitor_.groupbys.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeLogMonitorAttributeResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
DescribeLogMonitorAttributeResult::LogMonitor DescribeLogMonitorAttributeResult::getLogMonitor()const
|
||||
{
|
||||
return logMonitor_;
|
||||
}
|
||||
|
||||
std::string DescribeLogMonitorAttributeResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeLogMonitorAttributeResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
cms/src/model/DescribeLogMonitorListRequest.cc
Normal file
73
cms/src/model/DescribeLogMonitorListRequest.cc
Normal 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/DescribeLogMonitorListRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeLogMonitorListRequest;
|
||||
|
||||
DescribeLogMonitorListRequest::DescribeLogMonitorListRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeLogMonitorList")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeLogMonitorListRequest::~DescribeLogMonitorListRequest()
|
||||
{}
|
||||
|
||||
long DescribeLogMonitorListRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DescribeLogMonitorListRequest::setGroupId(long groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", std::to_string(groupId));
|
||||
}
|
||||
|
||||
int DescribeLogMonitorListRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeLogMonitorListRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeLogMonitorListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeLogMonitorListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeLogMonitorListRequest::getSearchValue()const
|
||||
{
|
||||
return searchValue_;
|
||||
}
|
||||
|
||||
void DescribeLogMonitorListRequest::setSearchValue(const std::string& searchValue)
|
||||
{
|
||||
searchValue_ = searchValue;
|
||||
setParameter("SearchValue", searchValue);
|
||||
}
|
||||
|
||||
125
cms/src/model/DescribeLogMonitorListResult.cc
Normal file
125
cms/src/model/DescribeLogMonitorListResult.cc
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* 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/DescribeLogMonitorListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeLogMonitorListResult::DescribeLogMonitorListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeLogMonitorListResult::DescribeLogMonitorListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeLogMonitorListResult::~DescribeLogMonitorListResult()
|
||||
{}
|
||||
|
||||
void DescribeLogMonitorListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLogMonitorListNode = value["LogMonitorList"]["LogMonitor"];
|
||||
for (auto valueLogMonitorListLogMonitor : allLogMonitorListNode)
|
||||
{
|
||||
LogMonitor logMonitorListObject;
|
||||
if(!valueLogMonitorListLogMonitor["LogId"].isNull())
|
||||
logMonitorListObject.logId = std::stol(valueLogMonitorListLogMonitor["LogId"].asString());
|
||||
if(!valueLogMonitorListLogMonitor["SlsRegionId"].isNull())
|
||||
logMonitorListObject.slsRegionId = valueLogMonitorListLogMonitor["SlsRegionId"].asString();
|
||||
if(!valueLogMonitorListLogMonitor["SlsProject"].isNull())
|
||||
logMonitorListObject.slsProject = valueLogMonitorListLogMonitor["SlsProject"].asString();
|
||||
if(!valueLogMonitorListLogMonitor["SlsLogstore"].isNull())
|
||||
logMonitorListObject.slsLogstore = valueLogMonitorListLogMonitor["SlsLogstore"].asString();
|
||||
if(!valueLogMonitorListLogMonitor["MetricName"].isNull())
|
||||
logMonitorListObject.metricName = valueLogMonitorListLogMonitor["MetricName"].asString();
|
||||
if(!valueLogMonitorListLogMonitor["GmtCreate"].isNull())
|
||||
logMonitorListObject.gmtCreate = std::stol(valueLogMonitorListLogMonitor["GmtCreate"].asString());
|
||||
if(!valueLogMonitorListLogMonitor["ValueFilterRelation"].isNull())
|
||||
logMonitorListObject.valueFilterRelation = valueLogMonitorListLogMonitor["ValueFilterRelation"].asString();
|
||||
if(!valueLogMonitorListLogMonitor["GroupId"].isNull())
|
||||
logMonitorListObject.groupId = std::stol(valueLogMonitorListLogMonitor["GroupId"].asString());
|
||||
auto allValueFilterNode = valueLogMonitorListLogMonitor["ValueFilter"]["ValueFilterObject"];
|
||||
for (auto valueLogMonitorListLogMonitorValueFilterValueFilterObject : allValueFilterNode)
|
||||
{
|
||||
LogMonitor::ValueFilterObject valueFilterObject;
|
||||
if(!valueLogMonitorListLogMonitorValueFilterValueFilterObject["Key"].isNull())
|
||||
valueFilterObject.key = valueLogMonitorListLogMonitorValueFilterValueFilterObject["Key"].asString();
|
||||
if(!valueLogMonitorListLogMonitorValueFilterValueFilterObject["Operator"].isNull())
|
||||
valueFilterObject._operator = valueLogMonitorListLogMonitorValueFilterValueFilterObject["Operator"].asString();
|
||||
if(!valueLogMonitorListLogMonitorValueFilterValueFilterObject["Value"].isNull())
|
||||
valueFilterObject.value = valueLogMonitorListLogMonitorValueFilterValueFilterObject["Value"].asString();
|
||||
logMonitorListObject.valueFilter.push_back(valueFilterObject);
|
||||
}
|
||||
logMonitorList_.push_back(logMonitorListObject);
|
||||
}
|
||||
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["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeLogMonitorListResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DescribeLogMonitorListResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeLogMonitorListResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
long DescribeLogMonitorListResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<DescribeLogMonitorListResult::LogMonitor> DescribeLogMonitorListResult::getLogMonitorList()const
|
||||
{
|
||||
return logMonitorList_;
|
||||
}
|
||||
|
||||
std::string DescribeLogMonitorListResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribeLogMonitorListResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -49,15 +49,15 @@ void DescribeMetricRuleListRequest::setRuleName(const std::string& ruleName)
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleListRequest::getPageSize()const
|
||||
int DescribeMetricRuleListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeMetricRuleListRequest::setPageSize(const std::string& pageSize)
|
||||
void DescribeMetricRuleListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", pageSize);
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleListRequest::getMetricName()const
|
||||
@@ -115,15 +115,15 @@ void DescribeMetricRuleListRequest::setAlertState(const std::string& alertState)
|
||||
setParameter("AlertState", alertState);
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleListRequest::getPage()const
|
||||
int DescribeMetricRuleListRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void DescribeMetricRuleListRequest::setPage(const std::string& page)
|
||||
void DescribeMetricRuleListRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", page);
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleListRequest::getDimensions()const
|
||||
|
||||
@@ -56,7 +56,7 @@ void DescribeMetricRuleListResult::parse(const std::string &payload)
|
||||
if(!valueAlarmsAlarm["NoEffectiveInterval"].isNull())
|
||||
alarmsObject.noEffectiveInterval = valueAlarmsAlarm["NoEffectiveInterval"].asString();
|
||||
if(!valueAlarmsAlarm["SilenceTime"].isNull())
|
||||
alarmsObject.silenceTime = valueAlarmsAlarm["SilenceTime"].asString();
|
||||
alarmsObject.silenceTime = std::stoi(valueAlarmsAlarm["SilenceTime"].asString());
|
||||
if(!valueAlarmsAlarm["EnableState"].isNull())
|
||||
alarmsObject.enableState = valueAlarmsAlarm["EnableState"].asString() == "true";
|
||||
if(!valueAlarmsAlarm["AlertState"].isNull())
|
||||
@@ -88,7 +88,9 @@ void DescribeMetricRuleListResult::parse(const std::string &payload)
|
||||
if(!infoNode["Threshold"].isNull())
|
||||
alarmsObject.escalations.info.threshold = infoNode["Threshold"].asString();
|
||||
if(!infoNode["Times"].isNull())
|
||||
alarmsObject.escalations.info.times = infoNode["Times"].asString();
|
||||
alarmsObject.escalations.info.times = std::stoi(infoNode["Times"].asString());
|
||||
if(!infoNode["PreCondition"].isNull())
|
||||
alarmsObject.escalations.info.preCondition = infoNode["PreCondition"].asString();
|
||||
auto warnNode = escalationsNode["Warn"];
|
||||
if(!warnNode["ComparisonOperator"].isNull())
|
||||
alarmsObject.escalations.warn.comparisonOperator = warnNode["ComparisonOperator"].asString();
|
||||
@@ -97,7 +99,9 @@ void DescribeMetricRuleListResult::parse(const std::string &payload)
|
||||
if(!warnNode["Threshold"].isNull())
|
||||
alarmsObject.escalations.warn.threshold = warnNode["Threshold"].asString();
|
||||
if(!warnNode["Times"].isNull())
|
||||
alarmsObject.escalations.warn.times = warnNode["Times"].asString();
|
||||
alarmsObject.escalations.warn.times = std::stoi(warnNode["Times"].asString());
|
||||
if(!warnNode["PreCondition"].isNull())
|
||||
alarmsObject.escalations.warn.preCondition = warnNode["PreCondition"].asString();
|
||||
auto criticalNode = escalationsNode["Critical"];
|
||||
if(!criticalNode["ComparisonOperator"].isNull())
|
||||
alarmsObject.escalations.critical.comparisonOperator = criticalNode["ComparisonOperator"].asString();
|
||||
@@ -106,7 +110,9 @@ void DescribeMetricRuleListResult::parse(const std::string &payload)
|
||||
if(!criticalNode["Threshold"].isNull())
|
||||
alarmsObject.escalations.critical.threshold = criticalNode["Threshold"].asString();
|
||||
if(!criticalNode["Times"].isNull())
|
||||
alarmsObject.escalations.critical.times = criticalNode["Times"].asString();
|
||||
alarmsObject.escalations.critical.times = std::stoi(criticalNode["Times"].asString());
|
||||
if(!criticalNode["PreCondition"].isNull())
|
||||
alarmsObject.escalations.critical.preCondition = criticalNode["PreCondition"].asString();
|
||||
alarms_.push_back(alarmsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -27,17 +27,6 @@ DescribeMetricRuleTemplateAttributeRequest::DescribeMetricRuleTemplateAttributeR
|
||||
DescribeMetricRuleTemplateAttributeRequest::~DescribeMetricRuleTemplateAttributeRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeMetricRuleTemplateAttributeRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeMetricRuleTemplateAttributeRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleTemplateAttributeRequest::getTemplateId()const
|
||||
{
|
||||
return templateId_;
|
||||
@@ -49,3 +38,14 @@ void DescribeMetricRuleTemplateAttributeRequest::setTemplateId(const std::string
|
||||
setParameter("TemplateId", templateId);
|
||||
}
|
||||
|
||||
std::string DescribeMetricRuleTemplateAttributeRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeMetricRuleTemplateAttributeRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,16 +55,16 @@ void DescribeMetricRuleTemplateListResult::parse(const std::string &payload)
|
||||
templatesObject.gmtCreate = std::stol(valueTemplatesTemplate["GmtCreate"].asString());
|
||||
if(!valueTemplatesTemplate["GmtModified"].isNull())
|
||||
templatesObject.gmtModified = std::stol(valueTemplatesTemplate["GmtModified"].asString());
|
||||
auto allApplyHistoriesNode = allTemplatesNode["ApplyHistories"]["ApplyHistory"];
|
||||
for (auto allTemplatesNodeApplyHistoriesApplyHistory : allApplyHistoriesNode)
|
||||
auto allApplyHistoriesNode = valueTemplatesTemplate["ApplyHistories"]["ApplyHistory"];
|
||||
for (auto valueTemplatesTemplateApplyHistoriesApplyHistory : allApplyHistoriesNode)
|
||||
{
|
||||
_Template::ApplyHistory applyHistoriesObject;
|
||||
if(!allTemplatesNodeApplyHistoriesApplyHistory["GroupId"].isNull())
|
||||
applyHistoriesObject.groupId = std::stol(allTemplatesNodeApplyHistoriesApplyHistory["GroupId"].asString());
|
||||
if(!allTemplatesNodeApplyHistoriesApplyHistory["GroupName"].isNull())
|
||||
applyHistoriesObject.groupName = allTemplatesNodeApplyHistoriesApplyHistory["GroupName"].asString();
|
||||
if(!allTemplatesNodeApplyHistoriesApplyHistory["ApplyTime"].isNull())
|
||||
applyHistoriesObject.applyTime = std::stol(allTemplatesNodeApplyHistoriesApplyHistory["ApplyTime"].asString());
|
||||
if(!valueTemplatesTemplateApplyHistoriesApplyHistory["GroupId"].isNull())
|
||||
applyHistoriesObject.groupId = std::stol(valueTemplatesTemplateApplyHistoriesApplyHistory["GroupId"].asString());
|
||||
if(!valueTemplatesTemplateApplyHistoriesApplyHistory["GroupName"].isNull())
|
||||
applyHistoriesObject.groupName = valueTemplatesTemplateApplyHistoriesApplyHistory["GroupName"].asString();
|
||||
if(!valueTemplatesTemplateApplyHistoriesApplyHistory["ApplyTime"].isNull())
|
||||
applyHistoriesObject.applyTime = std::stol(valueTemplatesTemplateApplyHistoriesApplyHistory["ApplyTime"].asString());
|
||||
templatesObject.applyHistories.push_back(applyHistoriesObject);
|
||||
}
|
||||
templates_.push_back(templatesObject);
|
||||
|
||||
@@ -43,22 +43,20 @@ void DescribeMonitorGroupDynamicRulesResult::parse(const std::string &payload)
|
||||
for (auto valueResourceResourceItem : allResourceNode)
|
||||
{
|
||||
ResourceItem resourceObject;
|
||||
if(!valueResourceResourceItem["GroupId"].isNull())
|
||||
resourceObject.groupId = std::stol(valueResourceResourceItem["GroupId"].asString());
|
||||
if(!valueResourceResourceItem["Category"].isNull())
|
||||
resourceObject.category = valueResourceResourceItem["Category"].asString();
|
||||
if(!valueResourceResourceItem["FilterRelation"].isNull())
|
||||
resourceObject.filterRelation = valueResourceResourceItem["FilterRelation"].asString();
|
||||
auto allFiltersNode = allResourceNode["Filters"]["Filter"];
|
||||
for (auto allResourceNodeFiltersFilter : allFiltersNode)
|
||||
auto allFiltersNode = valueResourceResourceItem["Filters"]["Filter"];
|
||||
for (auto valueResourceResourceItemFiltersFilter : allFiltersNode)
|
||||
{
|
||||
ResourceItem::Filter filtersObject;
|
||||
if(!allResourceNodeFiltersFilter["Function"].isNull())
|
||||
filtersObject.function = allResourceNodeFiltersFilter["Function"].asString();
|
||||
if(!allResourceNodeFiltersFilter["Name"].isNull())
|
||||
filtersObject.name = allResourceNodeFiltersFilter["Name"].asString();
|
||||
if(!allResourceNodeFiltersFilter["Value"].isNull())
|
||||
filtersObject.value = allResourceNodeFiltersFilter["Value"].asString();
|
||||
if(!valueResourceResourceItemFiltersFilter["Function"].isNull())
|
||||
filtersObject.function = valueResourceResourceItemFiltersFilter["Function"].asString();
|
||||
if(!valueResourceResourceItemFiltersFilter["Name"].isNull())
|
||||
filtersObject.name = valueResourceResourceItemFiltersFilter["Name"].asString();
|
||||
if(!valueResourceResourceItemFiltersFilter["Value"].isNull())
|
||||
filtersObject.value = valueResourceResourceItemFiltersFilter["Value"].asString();
|
||||
resourceObject.filters.push_back(filtersObject);
|
||||
}
|
||||
resource_.push_back(resourceObject);
|
||||
@@ -69,12 +67,6 @@ void DescribeMonitorGroupDynamicRulesResult::parse(const std::string &payload)
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].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());
|
||||
|
||||
}
|
||||
|
||||
@@ -83,21 +75,6 @@ std::string DescribeMonitorGroupDynamicRulesResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DescribeMonitorGroupDynamicRulesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeMonitorGroupDynamicRulesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeMonitorGroupDynamicRulesResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<DescribeMonitorGroupDynamicRulesResult::ResourceItem> DescribeMonitorGroupDynamicRulesResult::getResource()const
|
||||
{
|
||||
return resource_;
|
||||
|
||||
@@ -55,14 +55,14 @@ void DescribeMonitorGroupInstanceAttributeResult::parse(const std::string &paylo
|
||||
resourcesObject.category = valueResourcesResource["Category"].asString();
|
||||
if(!valueResourcesResource["Dimension"].isNull())
|
||||
resourcesObject.dimension = valueResourcesResource["Dimension"].asString();
|
||||
auto allTagsNode = allResourcesNode["Tags"]["Tag"];
|
||||
for (auto allResourcesNodeTagsTag : allTagsNode)
|
||||
auto allTagsNode = valueResourcesResource["Tags"]["Tag"];
|
||||
for (auto valueResourcesResourceTagsTag : allTagsNode)
|
||||
{
|
||||
Resource::Tag tagsObject;
|
||||
if(!allResourcesNodeTagsTag["Key"].isNull())
|
||||
tagsObject.key = allResourcesNodeTagsTag["Key"].asString();
|
||||
if(!allResourcesNodeTagsTag["Value"].isNull())
|
||||
tagsObject.value = allResourcesNodeTagsTag["Value"].asString();
|
||||
if(!valueResourcesResourceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueResourcesResourceTagsTag["Key"].asString();
|
||||
if(!valueResourcesResourceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueResourcesResourceTagsTag["Value"].asString();
|
||||
resourcesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto regionNode = value["Region"];
|
||||
|
||||
@@ -82,6 +82,17 @@ void DescribeMonitorGroupsRequest::setPageNumber(int pageNumber)
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeMonitorGroupsRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeMonitorGroupsRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
int DescribeMonitorGroupsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
|
||||
@@ -63,22 +63,22 @@ void DescribeMonitorGroupsResult::parse(const std::string &payload)
|
||||
resourcesObject.groupFounderTagKey = valueResourcesResource["GroupFounderTagKey"].asString();
|
||||
if(!valueResourcesResource["GroupFounderTagValue"].isNull())
|
||||
resourcesObject.groupFounderTagValue = valueResourcesResource["GroupFounderTagValue"].asString();
|
||||
auto allContactGroupsNode = allResourcesNode["ContactGroups"]["ContactGroup"];
|
||||
for (auto allResourcesNodeContactGroupsContactGroup : allContactGroupsNode)
|
||||
auto allContactGroupsNode = valueResourcesResource["ContactGroups"]["ContactGroup"];
|
||||
for (auto valueResourcesResourceContactGroupsContactGroup : allContactGroupsNode)
|
||||
{
|
||||
Resource::ContactGroup contactGroupsObject;
|
||||
if(!allResourcesNodeContactGroupsContactGroup["Name"].isNull())
|
||||
contactGroupsObject.name = allResourcesNodeContactGroupsContactGroup["Name"].asString();
|
||||
if(!valueResourcesResourceContactGroupsContactGroup["Name"].isNull())
|
||||
contactGroupsObject.name = valueResourcesResourceContactGroupsContactGroup["Name"].asString();
|
||||
resourcesObject.contactGroups.push_back(contactGroupsObject);
|
||||
}
|
||||
auto allTagsNode = allResourcesNode["Tags"]["Tag"];
|
||||
for (auto allResourcesNodeTagsTag : allTagsNode)
|
||||
auto allTagsNode = valueResourcesResource["Tags"]["Tag"];
|
||||
for (auto valueResourcesResourceTagsTag : allTagsNode)
|
||||
{
|
||||
Resource::Tag tagsObject;
|
||||
if(!allResourcesNodeTagsTag["Key"].isNull())
|
||||
tagsObject.key = allResourcesNodeTagsTag["Key"].asString();
|
||||
if(!allResourcesNodeTagsTag["Value"].isNull())
|
||||
tagsObject.value = allResourcesNodeTagsTag["Value"].asString();
|
||||
if(!valueResourcesResourceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueResourcesResourceTagsTag["Key"].asString();
|
||||
if(!valueResourcesResourceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueResourcesResourceTagsTag["Value"].asString();
|
||||
resourcesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allTemplateIds = value["TemplateIds"]["TemplateId"];
|
||||
|
||||
@@ -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/DescribeMonitorResourceQuotaAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::DescribeMonitorResourceQuotaAttributeRequest;
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeRequest::DescribeMonitorResourceQuotaAttributeRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "DescribeMonitorResourceQuotaAttribute")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeRequest::~DescribeMonitorResourceQuotaAttributeRequest()
|
||||
{}
|
||||
|
||||
bool DescribeMonitorResourceQuotaAttributeRequest::getShowUsed()const
|
||||
{
|
||||
return showUsed_;
|
||||
}
|
||||
|
||||
void DescribeMonitorResourceQuotaAttributeRequest::setShowUsed(bool showUsed)
|
||||
{
|
||||
showUsed_ = showUsed;
|
||||
setParameter("ShowUsed", showUsed ? "true" : "false");
|
||||
}
|
||||
|
||||
133
cms/src/model/DescribeMonitorResourceQuotaAttributeResult.cc
Normal file
133
cms/src/model/DescribeMonitorResourceQuotaAttributeResult.cc
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* 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/DescribeMonitorResourceQuotaAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeResult::DescribeMonitorResourceQuotaAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeResult::DescribeMonitorResourceQuotaAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeResult::~DescribeMonitorResourceQuotaAttributeResult()
|
||||
{}
|
||||
|
||||
void DescribeMonitorResourceQuotaAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resourceQuotaNode = value["ResourceQuota"];
|
||||
if(!resourceQuotaNode["ExpireTime"].isNull())
|
||||
resourceQuota_.expireTime = resourceQuotaNode["ExpireTime"].asString();
|
||||
if(!resourceQuotaNode["SuitInfo"].isNull())
|
||||
resourceQuota_.suitInfo = resourceQuotaNode["SuitInfo"].asString();
|
||||
if(!resourceQuotaNode["InstanceId"].isNull())
|
||||
resourceQuota_.instanceId = resourceQuotaNode["InstanceId"].asString();
|
||||
auto siteMonitorEcsProbeNode = resourceQuotaNode["SiteMonitorEcsProbe"];
|
||||
if(!siteMonitorEcsProbeNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.siteMonitorEcsProbe.quotaLimit = std::stoi(siteMonitorEcsProbeNode["QuotaLimit"].asString());
|
||||
if(!siteMonitorEcsProbeNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.siteMonitorEcsProbe.quotaPackage = std::stoi(siteMonitorEcsProbeNode["QuotaPackage"].asString());
|
||||
if(!siteMonitorEcsProbeNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.siteMonitorEcsProbe.quotaUsed = std::stoi(siteMonitorEcsProbeNode["QuotaUsed"].asString());
|
||||
auto siteMonitorOperatorProbeNode = resourceQuotaNode["SiteMonitorOperatorProbe"];
|
||||
if(!siteMonitorOperatorProbeNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.siteMonitorOperatorProbe.quotaLimit = std::stoi(siteMonitorOperatorProbeNode["QuotaLimit"].asString());
|
||||
if(!siteMonitorOperatorProbeNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.siteMonitorOperatorProbe.quotaPackage = std::stoi(siteMonitorOperatorProbeNode["QuotaPackage"].asString());
|
||||
if(!siteMonitorOperatorProbeNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.siteMonitorOperatorProbe.quotaUsed = std::stoi(siteMonitorOperatorProbeNode["QuotaUsed"].asString());
|
||||
auto siteMonitorTaskNode = resourceQuotaNode["SiteMonitorTask"];
|
||||
if(!siteMonitorTaskNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.siteMonitorTask.quotaLimit = std::stoi(siteMonitorTaskNode["QuotaLimit"].asString());
|
||||
if(!siteMonitorTaskNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.siteMonitorTask.quotaPackage = std::stoi(siteMonitorTaskNode["QuotaPackage"].asString());
|
||||
if(!siteMonitorTaskNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.siteMonitorTask.quotaUsed = std::stoi(siteMonitorTaskNode["QuotaUsed"].asString());
|
||||
auto customMonitorNode = resourceQuotaNode["CustomMonitor"];
|
||||
if(!customMonitorNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.customMonitor.quotaLimit = std::stoi(customMonitorNode["QuotaLimit"].asString());
|
||||
if(!customMonitorNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.customMonitor.quotaPackage = std::stoi(customMonitorNode["QuotaPackage"].asString());
|
||||
if(!customMonitorNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.customMonitor.quotaUsed = std::stoi(customMonitorNode["QuotaUsed"].asString());
|
||||
auto eventMonitorNode = resourceQuotaNode["EventMonitor"];
|
||||
if(!eventMonitorNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.eventMonitor.quotaLimit = std::stoi(eventMonitorNode["QuotaLimit"].asString());
|
||||
if(!eventMonitorNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.eventMonitor.quotaPackage = std::stoi(eventMonitorNode["QuotaPackage"].asString());
|
||||
if(!eventMonitorNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.eventMonitor.quotaUsed = std::stoi(eventMonitorNode["QuotaUsed"].asString());
|
||||
auto logMonitorNode = resourceQuotaNode["LogMonitor"];
|
||||
if(!logMonitorNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.logMonitor.quotaLimit = std::stoi(logMonitorNode["QuotaLimit"].asString());
|
||||
if(!logMonitorNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.logMonitor.quotaPackage = std::stoi(logMonitorNode["QuotaPackage"].asString());
|
||||
if(!logMonitorNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.logMonitor.quotaUsed = std::stoi(logMonitorNode["QuotaUsed"].asString());
|
||||
auto apiNode = resourceQuotaNode["Api"];
|
||||
if(!apiNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.api.quotaLimit = std::stoi(apiNode["QuotaLimit"].asString());
|
||||
if(!apiNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.api.quotaPackage = std::stoi(apiNode["QuotaPackage"].asString());
|
||||
if(!apiNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.api.quotaUsed = std::stoi(apiNode["QuotaUsed"].asString());
|
||||
auto sMSNode = resourceQuotaNode["SMS"];
|
||||
if(!sMSNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.sMS.quotaLimit = std::stoi(sMSNode["QuotaLimit"].asString());
|
||||
if(!sMSNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.sMS.quotaPackage = std::stoi(sMSNode["QuotaPackage"].asString());
|
||||
if(!sMSNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.sMS.quotaUsed = std::stoi(sMSNode["QuotaUsed"].asString());
|
||||
auto phoneNode = resourceQuotaNode["Phone"];
|
||||
if(!phoneNode["QuotaLimit"].isNull())
|
||||
resourceQuota_.phone.quotaLimit = std::stoi(phoneNode["QuotaLimit"].asString());
|
||||
if(!phoneNode["QuotaPackage"].isNull())
|
||||
resourceQuota_.phone.quotaPackage = std::stoi(phoneNode["QuotaPackage"].asString());
|
||||
if(!phoneNode["QuotaUsed"].isNull())
|
||||
resourceQuota_.phone.quotaUsed = std::stoi(phoneNode["QuotaUsed"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeMonitorResourceQuotaAttributeResult::ResourceQuota DescribeMonitorResourceQuotaAttributeResult::getResourceQuota()const
|
||||
{
|
||||
return resourceQuota_;
|
||||
}
|
||||
|
||||
std::string DescribeMonitorResourceQuotaAttributeResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DescribeMonitorResourceQuotaAttributeResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -60,17 +60,6 @@ void DescribeMonitoringAgentHostsRequest::setHostName(const std::string& hostNam
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
std::string DescribeMonitoringAgentHostsRequest::getInstanceIds()const
|
||||
{
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void DescribeMonitoringAgentHostsRequest::setInstanceIds(const std::string& instanceIds)
|
||||
{
|
||||
instanceIds_ = instanceIds;
|
||||
setParameter("InstanceIds", instanceIds);
|
||||
}
|
||||
|
||||
std::string DescribeMonitoringAgentHostsRequest::getInstanceRegionId()const
|
||||
{
|
||||
return instanceRegionId_;
|
||||
@@ -93,6 +82,17 @@ void DescribeMonitoringAgentHostsRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
bool DescribeMonitoringAgentHostsRequest::getAliyunHost()const
|
||||
{
|
||||
return aliyunHost_;
|
||||
}
|
||||
|
||||
void DescribeMonitoringAgentHostsRequest::setAliyunHost(bool aliyunHost)
|
||||
{
|
||||
aliyunHost_ = aliyunHost;
|
||||
setParameter("AliyunHost", aliyunHost ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string DescribeMonitoringAgentHostsRequest::getKeyWord()const
|
||||
{
|
||||
return keyWord_;
|
||||
@@ -104,3 +104,25 @@ void DescribeMonitoringAgentHostsRequest::setKeyWord(const std::string& keyWord)
|
||||
setParameter("KeyWord", keyWord);
|
||||
}
|
||||
|
||||
std::string DescribeMonitoringAgentHostsRequest::getInstanceIds()const
|
||||
{
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
void DescribeMonitoringAgentHostsRequest::setInstanceIds(const std::string& instanceIds)
|
||||
{
|
||||
instanceIds_ = instanceIds;
|
||||
setParameter("InstanceIds", instanceIds);
|
||||
}
|
||||
|
||||
std::string DescribeMonitoringAgentHostsRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void DescribeMonitoringAgentHostsRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,10 @@ void DescribeMonitoringAgentHostsResult::parse(const std::string &payload)
|
||||
pageTotal_ = std::stoi(value["PageTotal"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -96,6 +100,16 @@ std::string DescribeMonitoringAgentHostsResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DescribeMonitoringAgentHostsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeMonitoringAgentHostsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeMonitoringAgentHostsResult::getPageTotal()const
|
||||
{
|
||||
return pageTotal_;
|
||||
|
||||
@@ -39,6 +39,32 @@ void DescribeProductsOfActiveMetricRuleResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAllProductInitMetricRuleListNode = value["AllProductInitMetricRuleList"]["AllProductInitMetricRule"];
|
||||
for (auto valueAllProductInitMetricRuleListAllProductInitMetricRule : allAllProductInitMetricRuleListNode)
|
||||
{
|
||||
AllProductInitMetricRule allProductInitMetricRuleListObject;
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRule["Product"].isNull())
|
||||
allProductInitMetricRuleListObject.product = valueAllProductInitMetricRuleListAllProductInitMetricRule["Product"].asString();
|
||||
auto allAlertInitConfigListNode = valueAllProductInitMetricRuleListAllProductInitMetricRule["AlertInitConfigList"]["AlertInitConfig"];
|
||||
for (auto valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig : allAlertInitConfigListNode)
|
||||
{
|
||||
AllProductInitMetricRule::AlertInitConfig alertInitConfigListObject;
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Namespace"].isNull())
|
||||
alertInitConfigListObject._namespace = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Namespace"].asString();
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["MetricName"].isNull())
|
||||
alertInitConfigListObject.metricName = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["MetricName"].asString();
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Statistics"].isNull())
|
||||
alertInitConfigListObject.statistics = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Statistics"].asString();
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["EvaluationCount"].isNull())
|
||||
alertInitConfigListObject.evaluationCount = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["EvaluationCount"].asString();
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Threshold"].isNull())
|
||||
alertInitConfigListObject.threshold = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Threshold"].asString();
|
||||
if(!valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Period"].isNull())
|
||||
alertInitConfigListObject.period = valueAllProductInitMetricRuleListAllProductInitMetricRuleAlertInitConfigListAlertInitConfig["Period"].asString();
|
||||
allProductInitMetricRuleListObject.alertInitConfigList.push_back(alertInitConfigListObject);
|
||||
}
|
||||
allProductInitMetricRuleList_.push_back(allProductInitMetricRuleListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
@@ -55,6 +81,11 @@ std::string DescribeProductsOfActiveMetricRuleResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<DescribeProductsOfActiveMetricRuleResult::AllProductInitMetricRule> DescribeProductsOfActiveMetricRuleResult::getAllProductInitMetricRuleList()const
|
||||
{
|
||||
return allProductInitMetricRuleList_;
|
||||
}
|
||||
|
||||
std::string DescribeProductsOfActiveMetricRuleResult::getDatapoints()const
|
||||
{
|
||||
return datapoints_;
|
||||
|
||||
@@ -49,3 +49,36 @@ void DescribeSiteMonitorISPCityListRequest::setIsp(const std::string& isp)
|
||||
setParameter("Isp", isp);
|
||||
}
|
||||
|
||||
bool DescribeSiteMonitorISPCityListRequest::getAPIProbe()const
|
||||
{
|
||||
return aPIProbe_;
|
||||
}
|
||||
|
||||
void DescribeSiteMonitorISPCityListRequest::setAPIProbe(bool aPIProbe)
|
||||
{
|
||||
aPIProbe_ = aPIProbe;
|
||||
setParameter("APIProbe", aPIProbe ? "true" : "false");
|
||||
}
|
||||
|
||||
bool DescribeSiteMonitorISPCityListRequest::getIPV4()const
|
||||
{
|
||||
return iPV4_;
|
||||
}
|
||||
|
||||
void DescribeSiteMonitorISPCityListRequest::setIPV4(bool iPV4)
|
||||
{
|
||||
iPV4_ = iPV4;
|
||||
setParameter("IPV4", iPV4 ? "true" : "false");
|
||||
}
|
||||
|
||||
bool DescribeSiteMonitorISPCityListRequest::getIPV6()const
|
||||
{
|
||||
return iPV6_;
|
||||
}
|
||||
|
||||
void DescribeSiteMonitorISPCityListRequest::setIPV6(bool iPV6)
|
||||
{
|
||||
iPV6_ = iPV6;
|
||||
setParameter("IPV6", iPV6 ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -47,22 +47,35 @@ void DescribeSiteMonitorISPCityListResult::parse(const std::string &payload)
|
||||
ispCityListObject.isp = valueIspCityListIspCity["Isp"].asString();
|
||||
if(!valueIspCityListIspCity["City"].isNull())
|
||||
ispCityListObject.city = valueIspCityListIspCity["City"].asString();
|
||||
if(!valueIspCityListIspCity["IspName.zh_CN"].isNull())
|
||||
ispCityListObject.ispNamezh_CN = valueIspCityListIspCity["IspName.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["CityName.zh_CN"].isNull())
|
||||
ispCityListObject.cityNamezh_CN = valueIspCityListIspCity["CityName.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["Region.zh_CN"].isNull())
|
||||
ispCityListObject.regionzh_CN = valueIspCityListIspCity["Region.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["Country.zh_CN"].isNull())
|
||||
ispCityListObject.countryzh_CN = valueIspCityListIspCity["Country.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["Region"].isNull())
|
||||
ispCityListObject.region = valueIspCityListIspCity["Region"].asString();
|
||||
if(!valueIspCityListIspCity["Country"].isNull())
|
||||
ispCityListObject.country = valueIspCityListIspCity["Country"].asString();
|
||||
if(!valueIspCityListIspCity["IspName.en"].isNull())
|
||||
ispCityListObject.ispNameen = valueIspCityListIspCity["IspName.en"].asString();
|
||||
if(!valueIspCityListIspCity["IspName.zh_CN"].isNull())
|
||||
ispCityListObject.ispNamezh_CN = valueIspCityListIspCity["IspName.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["CityName.en"].isNull())
|
||||
ispCityListObject.cityNameen = valueIspCityListIspCity["CityName.en"].asString();
|
||||
if(!valueIspCityListIspCity["CityName.zh_CN"].isNull())
|
||||
ispCityListObject.cityNamezh_CN = valueIspCityListIspCity["CityName.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["Region.en"].isNull())
|
||||
ispCityListObject.regionen = valueIspCityListIspCity["Region.en"].asString();
|
||||
if(!valueIspCityListIspCity["Region.zh_CN"].isNull())
|
||||
ispCityListObject.regionzh_CN = valueIspCityListIspCity["Region.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["Country.en"].isNull())
|
||||
ispCityListObject.countryen = valueIspCityListIspCity["Country.en"].asString();
|
||||
if(!valueIspCityListIspCity["Country.zh_CN"].isNull())
|
||||
ispCityListObject.countryzh_CN = valueIspCityListIspCity["Country.zh_CN"].asString();
|
||||
if(!valueIspCityListIspCity["IPV4ProbeCount"].isNull())
|
||||
ispCityListObject.iPV4ProbeCount = valueIspCityListIspCity["IPV4ProbeCount"].asString();
|
||||
if(!valueIspCityListIspCity["IPV6ProbeCount"].isNull())
|
||||
ispCityListObject.iPV6ProbeCount = valueIspCityListIspCity["IPV6ProbeCount"].asString();
|
||||
if(!valueIspCityListIspCity["APIProbeCount"].isNull())
|
||||
ispCityListObject.aPIProbeCount = valueIspCityListIspCity["APIProbeCount"].asString();
|
||||
auto allIPPool = value["IPPool"]["IPPool"];
|
||||
for (auto value : allIPPool)
|
||||
ispCityListObject.iPPool.push_back(value.asString());
|
||||
ispCityList_.push_back(ispCityListObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
@@ -50,6 +50,8 @@ void DescribeSiteMonitorQuotaResult::parse(const std::string &payload)
|
||||
data_.siteMonitorQuotaTaskUsed = std::stoi(dataNode["SiteMonitorQuotaTaskUsed"].asString());
|
||||
if(!dataNode["SiteMonitorVersion"].isNull())
|
||||
data_.siteMonitorVersion = dataNode["SiteMonitorVersion"].asString();
|
||||
if(!dataNode["SecondMonitor"].isNull())
|
||||
data_.secondMonitor = dataNode["SecondMonitor"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
|
||||
@@ -51,8 +51,6 @@ void DescribeSystemEventAttributeResult::parse(const std::string &payload)
|
||||
systemEventsObject.name = valueSystemEventsSystemEvent["Name"].asString();
|
||||
if(!valueSystemEventsSystemEvent["GroupId"].isNull())
|
||||
systemEventsObject.groupId = valueSystemEventsSystemEvent["GroupId"].asString();
|
||||
if(!valueSystemEventsSystemEvent["Num"].isNull())
|
||||
systemEventsObject.num = std::stol(valueSystemEventsSystemEvent["Num"].asString());
|
||||
if(!valueSystemEventsSystemEvent["Level"].isNull())
|
||||
systemEventsObject.level = valueSystemEventsSystemEvent["Level"].asString();
|
||||
if(!valueSystemEventsSystemEvent["Status"].isNull())
|
||||
|
||||
@@ -49,28 +49,6 @@ void DescribeSystemEventHistogramRequest::setSearchKeywords(const std::string& s
|
||||
setParameter("SearchKeywords", searchKeywords);
|
||||
}
|
||||
|
||||
int DescribeSystemEventHistogramRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeSystemEventHistogramRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeSystemEventHistogramRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeSystemEventHistogramRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeSystemEventHistogramRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
|
||||
@@ -49,6 +49,8 @@ void DescribeSystemEventMetaListResult::parse(const std::string &payload)
|
||||
dataObject.name = valueDataResource["Name"].asString();
|
||||
if(!valueDataResource["NameDesc"].isNull())
|
||||
dataObject.nameDesc = valueDataResource["NameDesc"].asString();
|
||||
if(!valueDataResource["NameDesc.En"].isNull())
|
||||
dataObject.nameDescEn = valueDataResource["NameDesc.En"].asString();
|
||||
if(!valueDataResource["Level"].isNull())
|
||||
dataObject.level = valueDataResource["Level"].asString();
|
||||
if(!valueDataResource["Status"].isNull())
|
||||
|
||||
@@ -40,6 +40,7 @@ void ModifyGroupMonitoringAgentProcessRequest::setAlertConfig(const std::vector<
|
||||
std::string alertConfigObjStr = "AlertConfig." + std::to_string(dep1 + 1);
|
||||
setParameter(alertConfigObjStr + ".Times", alertConfigObj.times);
|
||||
setParameter(alertConfigObjStr + ".NoEffectiveInterval", alertConfigObj.noEffectiveInterval);
|
||||
setParameter(alertConfigObjStr + ".Webhook", alertConfigObj.webhook);
|
||||
setParameter(alertConfigObjStr + ".SilenceTime", alertConfigObj.silenceTime);
|
||||
setParameter(alertConfigObjStr + ".Threshold", alertConfigObj.threshold);
|
||||
setParameter(alertConfigObjStr + ".EffectiveInterval", alertConfigObj.effectiveInterval);
|
||||
|
||||
@@ -38,6 +38,17 @@ void ModifyHostAvailabilityRequest::setTaskOptionHttpMethod(const std::string& t
|
||||
setParameter("TaskOptionHttpMethod", taskOptionHttpMethod);
|
||||
}
|
||||
|
||||
std::string ModifyHostAvailabilityRequest::getTaskOptionHttpHeader()const
|
||||
{
|
||||
return taskOptionHttpHeader_;
|
||||
}
|
||||
|
||||
void ModifyHostAvailabilityRequest::setTaskOptionHttpHeader(const std::string& taskOptionHttpHeader)
|
||||
{
|
||||
taskOptionHttpHeader_ = taskOptionHttpHeader;
|
||||
setParameter("TaskOptionHttpHeader", taskOptionHttpHeader);
|
||||
}
|
||||
|
||||
std::vector<ModifyHostAvailabilityRequest::AlertConfigEscalationList> ModifyHostAvailabilityRequest::getAlertConfigEscalationList()const
|
||||
{
|
||||
return alertConfigEscalationList_;
|
||||
@@ -202,6 +213,17 @@ void ModifyHostAvailabilityRequest::setTaskScope(const std::string& taskScope)
|
||||
setParameter("TaskScope", taskScope);
|
||||
}
|
||||
|
||||
std::string ModifyHostAvailabilityRequest::getTaskOptionHttpPostContent()const
|
||||
{
|
||||
return taskOptionHttpPostContent_;
|
||||
}
|
||||
|
||||
void ModifyHostAvailabilityRequest::setTaskOptionHttpPostContent(const std::string& taskOptionHttpPostContent)
|
||||
{
|
||||
taskOptionHttpPostContent_ = taskOptionHttpPostContent;
|
||||
setParameter("TaskOptionHttpPostContent", taskOptionHttpPostContent);
|
||||
}
|
||||
|
||||
int ModifyHostAvailabilityRequest::getAlertConfigStartTime()const
|
||||
{
|
||||
return alertConfigStartTime_;
|
||||
|
||||
51
cms/src/model/ModifyHostInfoRequest.cc
Normal file
51
cms/src/model/ModifyHostInfoRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/ModifyHostInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::ModifyHostInfoRequest;
|
||||
|
||||
ModifyHostInfoRequest::ModifyHostInfoRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "ModifyHostInfo")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyHostInfoRequest::~ModifyHostInfoRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyHostInfoRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
}
|
||||
|
||||
void ModifyHostInfoRequest::setHostName(const std::string& hostName)
|
||||
{
|
||||
hostName_ = hostName;
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
std::string ModifyHostInfoRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ModifyHostInfoRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
65
cms/src/model/ModifyHostInfoResult.cc
Normal file
65
cms/src/model/ModifyHostInfoResult.cc
Normal 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/ModifyHostInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
ModifyHostInfoResult::ModifyHostInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyHostInfoResult::ModifyHostInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyHostInfoResult::~ModifyHostInfoResult()
|
||||
{}
|
||||
|
||||
void ModifyHostInfoResult::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 ModifyHostInfoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string ModifyHostInfoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ModifyHostInfoResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
29
cms/src/model/OpenCmsServiceRequest.cc
Normal file
29
cms/src/model/OpenCmsServiceRequest.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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/OpenCmsServiceRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::OpenCmsServiceRequest;
|
||||
|
||||
OpenCmsServiceRequest::OpenCmsServiceRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "OpenCmsService")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OpenCmsServiceRequest::~OpenCmsServiceRequest()
|
||||
{}
|
||||
|
||||
51
cms/src/model/OpenCmsServiceResult.cc
Normal file
51
cms/src/model/OpenCmsServiceResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/cms/model/OpenCmsServiceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
OpenCmsServiceResult::OpenCmsServiceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OpenCmsServiceResult::OpenCmsServiceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OpenCmsServiceResult::~OpenCmsServiceResult()
|
||||
{}
|
||||
|
||||
void OpenCmsServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OpenCmsServiceResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,17 @@ PutContactGroupRequest::PutContactGroupRequest() :
|
||||
PutContactGroupRequest::~PutContactGroupRequest()
|
||||
{}
|
||||
|
||||
bool PutContactGroupRequest::getEnableSubscribed()const
|
||||
{
|
||||
return enableSubscribed_;
|
||||
}
|
||||
|
||||
void PutContactGroupRequest::setEnableSubscribed(bool enableSubscribed)
|
||||
{
|
||||
enableSubscribed_ = enableSubscribed;
|
||||
setParameter("EnableSubscribed", enableSubscribed ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string PutContactGroupRequest::getContactGroupName()const
|
||||
{
|
||||
return contactGroupName_;
|
||||
|
||||
@@ -82,6 +82,17 @@ void PutContactRequest::setDescribe(const std::string& describe)
|
||||
setParameter("Describe", describe);
|
||||
}
|
||||
|
||||
std::string PutContactRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void PutContactRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
std::string PutContactRequest::getChannelsSMS()const
|
||||
{
|
||||
return channelsSMS_;
|
||||
|
||||
150
cms/src/model/PutCustomEventRuleRequest.cc
Normal file
150
cms/src/model/PutCustomEventRuleRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/PutCustomEventRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::PutCustomEventRuleRequest;
|
||||
|
||||
PutCustomEventRuleRequest::PutCustomEventRuleRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "PutCustomEventRule")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PutCustomEventRuleRequest::~PutCustomEventRuleRequest()
|
||||
{}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getWebhook()const
|
||||
{
|
||||
return webhook_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setWebhook(const std::string& webhook)
|
||||
{
|
||||
webhook_ = webhook;
|
||||
setParameter("Webhook", webhook);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getRuleName()const
|
||||
{
|
||||
return ruleName_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setRuleName(const std::string& ruleName)
|
||||
{
|
||||
ruleName_ = ruleName;
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getThreshold()const
|
||||
{
|
||||
return threshold_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setThreshold(const std::string& threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
setParameter("Threshold", threshold);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getEffectiveInterval()const
|
||||
{
|
||||
return effectiveInterval_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setEffectiveInterval(const std::string& effectiveInterval)
|
||||
{
|
||||
effectiveInterval_ = effectiveInterval;
|
||||
setParameter("EffectiveInterval", effectiveInterval);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getEventName()const
|
||||
{
|
||||
return eventName_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setEventName(const std::string& eventName)
|
||||
{
|
||||
eventName_ = eventName;
|
||||
setParameter("EventName", eventName);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getEmailSubject()const
|
||||
{
|
||||
return emailSubject_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setEmailSubject(const std::string& emailSubject)
|
||||
{
|
||||
emailSubject_ = emailSubject;
|
||||
setParameter("EmailSubject", emailSubject);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setPeriod(const std::string& period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", period);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getContactGroups()const
|
||||
{
|
||||
return contactGroups_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setContactGroups(const std::string& contactGroups)
|
||||
{
|
||||
contactGroups_ = contactGroups;
|
||||
setParameter("ContactGroups", contactGroups);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleRequest::getRuleId()const
|
||||
{
|
||||
return ruleId_;
|
||||
}
|
||||
|
||||
void PutCustomEventRuleRequest::setRuleId(const std::string& ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", ruleId);
|
||||
}
|
||||
|
||||
65
cms/src/model/PutCustomEventRuleResult.cc
Normal file
65
cms/src/model/PutCustomEventRuleResult.cc
Normal 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/PutCustomEventRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
PutCustomEventRuleResult::PutCustomEventRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PutCustomEventRuleResult::PutCustomEventRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PutCustomEventRuleResult::~PutCustomEventRuleResult()
|
||||
{}
|
||||
|
||||
void PutCustomEventRuleResult::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 PutCustomEventRuleResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string PutCustomEventRuleResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool PutCustomEventRuleResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
205
cms/src/model/PutCustomMetricRuleRequest.cc
Normal file
205
cms/src/model/PutCustomMetricRuleRequest.cc
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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/PutCustomMetricRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::PutCustomMetricRuleRequest;
|
||||
|
||||
PutCustomMetricRuleRequest::PutCustomMetricRuleRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "PutCustomMetricRule")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PutCustomMetricRuleRequest::~PutCustomMetricRuleRequest()
|
||||
{}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getWebhook()const
|
||||
{
|
||||
return webhook_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setWebhook(const std::string& webhook)
|
||||
{
|
||||
webhook_ = webhook;
|
||||
setParameter("Webhook", webhook);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getRuleName()const
|
||||
{
|
||||
return ruleName_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setRuleName(const std::string& ruleName)
|
||||
{
|
||||
ruleName_ = ruleName;
|
||||
setParameter("RuleName", ruleName);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getThreshold()const
|
||||
{
|
||||
return threshold_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setThreshold(const std::string& threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
setParameter("Threshold", threshold);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getEffectiveInterval()const
|
||||
{
|
||||
return effectiveInterval_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setEffectiveInterval(const std::string& effectiveInterval)
|
||||
{
|
||||
effectiveInterval_ = effectiveInterval;
|
||||
setParameter("EffectiveInterval", effectiveInterval);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getEmailSubject()const
|
||||
{
|
||||
return emailSubject_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setEmailSubject(const std::string& emailSubject)
|
||||
{
|
||||
emailSubject_ = emailSubject;
|
||||
setParameter("EmailSubject", emailSubject);
|
||||
}
|
||||
|
||||
int PutCustomMetricRuleRequest::getEvaluationCount()const
|
||||
{
|
||||
return evaluationCount_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setEvaluationCount(int evaluationCount)
|
||||
{
|
||||
evaluationCount_ = evaluationCount;
|
||||
setParameter("EvaluationCount", std::to_string(evaluationCount));
|
||||
}
|
||||
|
||||
int PutCustomMetricRuleRequest::getSilenceTime()const
|
||||
{
|
||||
return silenceTime_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setSilenceTime(int silenceTime)
|
||||
{
|
||||
silenceTime_ = silenceTime;
|
||||
setParameter("SilenceTime", std::to_string(silenceTime));
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setPeriod(const std::string& period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", period);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getContactGroups()const
|
||||
{
|
||||
return contactGroups_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setContactGroups(const std::string& contactGroups)
|
||||
{
|
||||
contactGroups_ = contactGroups;
|
||||
setParameter("ContactGroups", contactGroups);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getResources()const
|
||||
{
|
||||
return resources_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setResources(const std::string& resources)
|
||||
{
|
||||
resources_ = resources;
|
||||
setParameter("Resources", resources);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getRuleId()const
|
||||
{
|
||||
return ruleId_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setRuleId(const std::string& ruleId)
|
||||
{
|
||||
ruleId_ = ruleId;
|
||||
setParameter("RuleId", ruleId);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getComparisonOperator()const
|
||||
{
|
||||
return comparisonOperator_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setComparisonOperator(const std::string& comparisonOperator)
|
||||
{
|
||||
comparisonOperator_ = comparisonOperator;
|
||||
setParameter("ComparisonOperator", comparisonOperator);
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleRequest::getStatistics()const
|
||||
{
|
||||
return statistics_;
|
||||
}
|
||||
|
||||
void PutCustomMetricRuleRequest::setStatistics(const std::string& statistics)
|
||||
{
|
||||
statistics_ = statistics;
|
||||
setParameter("Statistics", statistics);
|
||||
}
|
||||
|
||||
65
cms/src/model/PutCustomMetricRuleResult.cc
Normal file
65
cms/src/model/PutCustomMetricRuleResult.cc
Normal 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/PutCustomMetricRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
PutCustomMetricRuleResult::PutCustomMetricRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PutCustomMetricRuleResult::PutCustomMetricRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PutCustomMetricRuleResult::~PutCustomMetricRuleResult()
|
||||
{}
|
||||
|
||||
void PutCustomMetricRuleResult::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 PutCustomMetricRuleResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string PutCustomMetricRuleResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool PutCustomMetricRuleResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -170,6 +170,17 @@ void PutGroupMetricRuleRequest::setEscalationsWarnThreshold(const std::string& e
|
||||
setParameter("EscalationsWarnThreshold", escalationsWarnThreshold);
|
||||
}
|
||||
|
||||
std::string PutGroupMetricRuleRequest::getContactGroups()const
|
||||
{
|
||||
return contactGroups_;
|
||||
}
|
||||
|
||||
void PutGroupMetricRuleRequest::setContactGroups(const std::string& contactGroups)
|
||||
{
|
||||
contactGroups_ = contactGroups;
|
||||
setParameter("ContactGroups", contactGroups);
|
||||
}
|
||||
|
||||
std::string PutGroupMetricRuleRequest::getEscalationsCriticalStatistics()const
|
||||
{
|
||||
return escalationsCriticalStatistics_;
|
||||
|
||||
189
cms/src/model/PutLogMonitorRequest.cc
Normal file
189
cms/src/model/PutLogMonitorRequest.cc
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* 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/PutLogMonitorRequest.h>
|
||||
|
||||
using AlibabaCloud::Cms::Model::PutLogMonitorRequest;
|
||||
|
||||
PutLogMonitorRequest::PutLogMonitorRequest() :
|
||||
RpcServiceRequest("cms", "2019-01-01", "PutLogMonitor")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PutLogMonitorRequest::~PutLogMonitorRequest()
|
||||
{}
|
||||
|
||||
std::string PutLogMonitorRequest::getSlsLogstore()const
|
||||
{
|
||||
return slsLogstore_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setSlsLogstore(const std::string& slsLogstore)
|
||||
{
|
||||
slsLogstore_ = slsLogstore;
|
||||
setParameter("SlsLogstore", slsLogstore);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getSlsProject()const
|
||||
{
|
||||
return slsProject_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setSlsProject(const std::string& slsProject)
|
||||
{
|
||||
slsProject_ = slsProject;
|
||||
setParameter("SlsProject", slsProject);
|
||||
}
|
||||
|
||||
std::vector<PutLogMonitorRequest::ValueFilter> PutLogMonitorRequest::getValueFilter()const
|
||||
{
|
||||
return valueFilter_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setValueFilter(const std::vector<ValueFilter>& valueFilter)
|
||||
{
|
||||
valueFilter_ = valueFilter;
|
||||
for(int dep1 = 0; dep1!= valueFilter.size(); dep1++) {
|
||||
auto valueFilterObj = valueFilter.at(dep1);
|
||||
std::string valueFilterObjStr = "ValueFilter." + std::to_string(dep1 + 1);
|
||||
setParameter(valueFilterObjStr + ".Value", valueFilterObj.value);
|
||||
setParameter(valueFilterObjStr + ".Key", valueFilterObj.key);
|
||||
setParameter(valueFilterObjStr + "._Operator", valueFilterObj._operator);
|
||||
}
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getMetricExpress()const
|
||||
{
|
||||
return metricExpress_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setMetricExpress(const std::string& metricExpress)
|
||||
{
|
||||
metricExpress_ = metricExpress;
|
||||
setParameter("MetricExpress", metricExpress);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getSlsRegionId()const
|
||||
{
|
||||
return slsRegionId_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setSlsRegionId(const std::string& slsRegionId)
|
||||
{
|
||||
slsRegionId_ = slsRegionId;
|
||||
setParameter("SlsRegionId", slsRegionId);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getTumblingwindows()const
|
||||
{
|
||||
return tumblingwindows_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setTumblingwindows(const std::string& tumblingwindows)
|
||||
{
|
||||
tumblingwindows_ = tumblingwindows;
|
||||
setParameter("Tumblingwindows", tumblingwindows);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getValueFilterRelation()const
|
||||
{
|
||||
return valueFilterRelation_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setValueFilterRelation(const std::string& valueFilterRelation)
|
||||
{
|
||||
valueFilterRelation_ = valueFilterRelation;
|
||||
setParameter("ValueFilterRelation", valueFilterRelation);
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getUnit()const
|
||||
{
|
||||
return unit_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setUnit(const std::string& unit)
|
||||
{
|
||||
unit_ = unit;
|
||||
setParameter("Unit", unit);
|
||||
}
|
||||
|
||||
std::vector<PutLogMonitorRequest::Groupbys> PutLogMonitorRequest::getGroupbys()const
|
||||
{
|
||||
return groupbys_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setGroupbys(const std::vector<Groupbys>& groupbys)
|
||||
{
|
||||
groupbys_ = groupbys;
|
||||
for(int dep1 = 0; dep1!= groupbys.size(); dep1++) {
|
||||
auto groupbysObj = groupbys.at(dep1);
|
||||
std::string groupbysObjStr = "Groupbys." + std::to_string(dep1 + 1);
|
||||
setParameter(groupbysObjStr + ".FieldName", groupbysObj.fieldName);
|
||||
setParameter(groupbysObjStr + ".Alias", groupbysObj.alias);
|
||||
}
|
||||
}
|
||||
|
||||
std::string PutLogMonitorRequest::getLogId()const
|
||||
{
|
||||
return logId_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setLogId(const std::string& logId)
|
||||
{
|
||||
logId_ = logId;
|
||||
setParameter("LogId", logId);
|
||||
}
|
||||
|
||||
std::vector<PutLogMonitorRequest::Aggregates> PutLogMonitorRequest::getAggregates()const
|
||||
{
|
||||
return aggregates_;
|
||||
}
|
||||
|
||||
void PutLogMonitorRequest::setAggregates(const std::vector<Aggregates>& aggregates)
|
||||
{
|
||||
aggregates_ = aggregates;
|
||||
for(int dep1 = 0; dep1!= aggregates.size(); dep1++) {
|
||||
auto aggregatesObj = aggregates.at(dep1);
|
||||
std::string aggregatesObjStr = "Aggregates." + std::to_string(dep1 + 1);
|
||||
setParameter(aggregatesObjStr + ".FieldName", aggregatesObj.fieldName);
|
||||
setParameter(aggregatesObjStr + ".Function", aggregatesObj.function);
|
||||
setParameter(aggregatesObjStr + ".Alias", aggregatesObj.alias);
|
||||
}
|
||||
}
|
||||
|
||||
72
cms/src/model/PutLogMonitorResult.cc
Normal file
72
cms/src/model/PutLogMonitorResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/PutLogMonitorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cms;
|
||||
using namespace AlibabaCloud::Cms::Model;
|
||||
|
||||
PutLogMonitorResult::PutLogMonitorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PutLogMonitorResult::PutLogMonitorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PutLogMonitorResult::~PutLogMonitorResult()
|
||||
{}
|
||||
|
||||
void PutLogMonitorResult::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["LogId"].isNull())
|
||||
logId_ = value["LogId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string PutLogMonitorResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string PutLogMonitorResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
std::string PutLogMonitorResult::getLogId()const
|
||||
{
|
||||
return logId_;
|
||||
}
|
||||
|
||||
bool PutLogMonitorResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user