ESS SDK Auto Released By wujin.lhr,Version:1.22.5
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
BIN
ess/src/.DS_Store
vendored
BIN
ess/src/.DS_Store
vendored
Binary file not shown.
@@ -699,6 +699,42 @@ EssClient::DescribeLifecycleHooksOutcomeCallable EssClient::describeLifecycleHoo
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::ModifyAlarmOutcome EssClient::modifyAlarm(const ModifyAlarmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyAlarmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyAlarmOutcome(ModifyAlarmResult(outcome.result()));
|
||||
else
|
||||
return ModifyAlarmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::modifyAlarmAsync(const ModifyAlarmRequest& request, const ModifyAlarmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyAlarm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::ModifyAlarmOutcomeCallable EssClient::modifyAlarmCallable(const ModifyAlarmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyAlarmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyAlarm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DescribeAccountAttributesOutcome EssClient::describeAccountAttributes(const DescribeAccountAttributesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -735,6 +771,42 @@ EssClient::DescribeAccountAttributesOutcomeCallable EssClient::describeAccountAt
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DeleteAlarmOutcome EssClient::deleteAlarm(const DeleteAlarmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteAlarmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteAlarmOutcome(DeleteAlarmResult(outcome.result()));
|
||||
else
|
||||
return DeleteAlarmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::deleteAlarmAsync(const DeleteAlarmRequest& request, const DeleteAlarmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteAlarm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::DeleteAlarmOutcomeCallable EssClient::deleteAlarmCallable(const DeleteAlarmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteAlarmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteAlarm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DescribeScalingActivityDetailOutcome EssClient::describeScalingActivityDetail(const DescribeScalingActivityDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -771,6 +843,42 @@ EssClient::DescribeScalingActivityDetailOutcomeCallable EssClient::describeScali
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DisableAlarmOutcome EssClient::disableAlarm(const DisableAlarmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DisableAlarmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DisableAlarmOutcome(DisableAlarmResult(outcome.result()));
|
||||
else
|
||||
return DisableAlarmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::disableAlarmAsync(const DisableAlarmRequest& request, const DisableAlarmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, disableAlarm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::DisableAlarmOutcomeCallable EssClient::disableAlarmCallable(const DisableAlarmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DisableAlarmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->disableAlarm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::VerifyUserOutcome EssClient::verifyUser(const VerifyUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -807,6 +915,42 @@ EssClient::VerifyUserOutcomeCallable EssClient::verifyUserCallable(const VerifyU
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DescribeAlarmsOutcome EssClient::describeAlarms(const DescribeAlarmsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAlarmsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAlarmsOutcome(DescribeAlarmsResult(outcome.result()));
|
||||
else
|
||||
return DescribeAlarmsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::describeAlarmsAsync(const DescribeAlarmsRequest& request, const DescribeAlarmsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAlarms(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::DescribeAlarmsOutcomeCallable EssClient::describeAlarmsCallable(const DescribeAlarmsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAlarmsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAlarms(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::AttachInstancesOutcome EssClient::attachInstances(const AttachInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1095,6 +1239,42 @@ EssClient::DescribeScalingRulesOutcomeCallable EssClient::describeScalingRulesCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::CreateAlarmOutcome EssClient::createAlarm(const CreateAlarmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateAlarmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateAlarmOutcome(CreateAlarmResult(outcome.result()));
|
||||
else
|
||||
return CreateAlarmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::createAlarmAsync(const CreateAlarmRequest& request, const CreateAlarmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createAlarm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::CreateAlarmOutcomeCallable EssClient::createAlarmCallable(const CreateAlarmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateAlarmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createAlarm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::EnableScalingGroupOutcome EssClient::enableScalingGroup(const EnableScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1923,6 +2103,42 @@ EssClient::CreateLifecycleHookOutcomeCallable EssClient::createLifecycleHookCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::EnableAlarmOutcome EssClient::enableAlarm(const EnableAlarmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EnableAlarmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EnableAlarmOutcome(EnableAlarmResult(outcome.result()));
|
||||
else
|
||||
return EnableAlarmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::enableAlarmAsync(const EnableAlarmRequest& request, const EnableAlarmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, enableAlarm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::EnableAlarmOutcomeCallable EssClient::enableAlarmCallable(const EnableAlarmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EnableAlarmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->enableAlarm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::ModifyAlertConfigOutcome EssClient::modifyAlertConfig(const ModifyAlertConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
221
ess/src/model/CreateAlarmRequest.cc
Executable file
221
ess/src/model/CreateAlarmRequest.cc
Executable file
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
* 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/ess/model/CreateAlarmRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::CreateAlarmRequest;
|
||||
|
||||
CreateAlarmRequest::CreateAlarmRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "CreateAlarm")
|
||||
{}
|
||||
|
||||
CreateAlarmRequest::~CreateAlarmRequest()
|
||||
{}
|
||||
|
||||
std::string CreateAlarmRequest::getMetricType()const
|
||||
{
|
||||
return metricType_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setMetricType(const std::string& metricType)
|
||||
{
|
||||
metricType_ = metricType;
|
||||
setParameter("MetricType", metricType);
|
||||
}
|
||||
|
||||
int CreateAlarmRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setParameter("Description", description);
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateAlarmRequest::getAlarmAction()const
|
||||
{
|
||||
return alarmAction_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setAlarmAction(const std::vector<std::string>& alarmAction)
|
||||
{
|
||||
alarmAction_ = alarmAction;
|
||||
for(int i = 0; i!= alarmAction.size(); i++)
|
||||
setParameter("AlarmAction."+ std::to_string(i), alarmAction.at(i));
|
||||
}
|
||||
|
||||
float CreateAlarmRequest::getThreshold()const
|
||||
{
|
||||
return threshold_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setThreshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
setParameter("Threshold", std::to_string(threshold));
|
||||
}
|
||||
|
||||
long CreateAlarmRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getComparisionOperator()const
|
||||
{
|
||||
return comparisionOperator_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setComparisionOperator(const std::string& comparisionOperator)
|
||||
{
|
||||
comparisionOperator_ = comparisionOperator;
|
||||
setParameter("ComparisionOperator", comparisionOperator);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
int CreateAlarmRequest::getEvaluationCount()const
|
||||
{
|
||||
return evaluationCount_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setEvaluationCount(int evaluationCount)
|
||||
{
|
||||
evaluationCount_ = evaluationCount;
|
||||
setParameter("EvaluationCount", std::to_string(evaluationCount));
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getMetricName()const
|
||||
{
|
||||
return metricName_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setMetricName(const std::string& metricName)
|
||||
{
|
||||
metricName_ = metricName;
|
||||
setParameter("MetricName", metricName);
|
||||
}
|
||||
|
||||
std::vector<CreateAlarmRequest::Dimension> CreateAlarmRequest::getDimension()const
|
||||
{
|
||||
return dimension_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setDimension(const std::vector<Dimension>& dimension)
|
||||
{
|
||||
dimension_ = dimension;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= dimension.size(); i++) {
|
||||
auto obj = dimension.at(i);
|
||||
std::string str ="Dimension."+ std::to_string(i);
|
||||
setParameter(str + ".DimensionValue", obj.dimensionValue);
|
||||
setParameter(str + ".DimensionKey", obj.dimensionKey);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateAlarmRequest::getStatistics()const
|
||||
{
|
||||
return statistics_;
|
||||
}
|
||||
|
||||
void CreateAlarmRequest::setStatistics(const std::string& statistics)
|
||||
{
|
||||
statistics_ = statistics;
|
||||
setParameter("Statistics", statistics);
|
||||
}
|
||||
|
||||
52
ess/src/model/CreateAlarmResult.cc
Executable file
52
ess/src/model/CreateAlarmResult.cc
Executable file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ess/model/CreateAlarmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
CreateAlarmResult::CreateAlarmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateAlarmResult::CreateAlarmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateAlarmResult::~CreateAlarmResult()
|
||||
{}
|
||||
|
||||
void CreateAlarmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AlarmTaskId"].isNull())
|
||||
alarmTaskId_ = value["AlarmTaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateAlarmResult::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
@@ -158,12 +158,12 @@ void CreateLifecycleHookRequest::setLifecycleHook(const std::vector<LifecycleHoo
|
||||
for(int i = 0; i!= lifecycleHook.size(); i++) {
|
||||
auto obj = lifecycleHook.at(i);
|
||||
std::string str ="LifecycleHook."+ std::to_string(i);
|
||||
setParameter(str + ".LifecycleHookName", obj.lifecycleHookName);
|
||||
setParameter(str + ".LifecycleTransition", obj.lifecycleTransition);
|
||||
setParameter(str + ".DefaultResult", obj.defaultResult);
|
||||
setParameter(str + ".LifecycleHookName", obj.lifecycleHookName);
|
||||
setParameter(str + ".HeartbeatTimeout", std::to_string(obj.heartbeatTimeout));
|
||||
setParameter(str + ".NotificationMetadata", obj.notificationMetadata);
|
||||
setParameter(str + ".NotificationArn", obj.notificationArn);
|
||||
setParameter(str + ".NotificationMetadata", obj.notificationMetadata);
|
||||
setParameter(str + ".LifecycleTransition", obj.lifecycleTransition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,17 +25,6 @@ CreateScalingConfigurationRequest::CreateScalingConfigurationRequest() :
|
||||
CreateScalingConfigurationRequest::~CreateScalingConfigurationRequest()
|
||||
{}
|
||||
|
||||
int CreateScalingConfigurationRequest::getDataDisk3Size()const
|
||||
{
|
||||
return dataDisk3Size_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk3Size(int dataDisk3Size)
|
||||
{
|
||||
dataDisk3Size_ = dataDisk3Size;
|
||||
setParameter("DataDisk3Size", std::to_string(dataDisk3Size));
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getImageId()const
|
||||
{
|
||||
return imageId_;
|
||||
@@ -47,39 +36,6 @@ void CreateScalingConfigurationRequest::setImageId(const std::string& imageId)
|
||||
setParameter("ImageId", imageId);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk1SnapshotId()const
|
||||
{
|
||||
return dataDisk1SnapshotId_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk1SnapshotId(const std::string& dataDisk1SnapshotId)
|
||||
{
|
||||
dataDisk1SnapshotId_ = dataDisk1SnapshotId;
|
||||
setParameter("DataDisk1SnapshotId", dataDisk1SnapshotId);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk3Category()const
|
||||
{
|
||||
return dataDisk3Category_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk3Category(const std::string& dataDisk3Category)
|
||||
{
|
||||
dataDisk3Category_ = dataDisk3Category;
|
||||
setParameter("DataDisk3Category", dataDisk3Category);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk1Device()const
|
||||
{
|
||||
return dataDisk1Device_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk1Device(const std::string& dataDisk1Device)
|
||||
{
|
||||
dataDisk1Device_ = dataDisk1Device;
|
||||
setParameter("DataDisk1Device", dataDisk1Device);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
@@ -91,17 +47,6 @@ void CreateScalingConfigurationRequest::setScalingGroupId(const std::string& sca
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk2Device()const
|
||||
{
|
||||
return dataDisk2Device_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk2Device(const std::string& dataDisk2Device)
|
||||
{
|
||||
dataDisk2Device_ = dataDisk2Device;
|
||||
setParameter("DataDisk2Device", dataDisk2Device);
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateScalingConfigurationRequest::getInstanceTypes()const
|
||||
{
|
||||
return instanceTypes_;
|
||||
@@ -219,17 +164,6 @@ void CreateScalingConfigurationRequest::setUserData(const std::string& userData)
|
||||
setParameter("UserData", userData);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk4Category()const
|
||||
{
|
||||
return dataDisk4Category_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk4Category(const std::string& dataDisk4Category)
|
||||
{
|
||||
dataDisk4Category_ = dataDisk4Category;
|
||||
setParameter("DataDisk4Category", dataDisk4Category);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
@@ -241,17 +175,6 @@ void CreateScalingConfigurationRequest::setHostName(const std::string& hostName)
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk2SnapshotId()const
|
||||
{
|
||||
return dataDisk2SnapshotId_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk2SnapshotId(const std::string& dataDisk2SnapshotId)
|
||||
{
|
||||
dataDisk2SnapshotId_ = dataDisk2SnapshotId;
|
||||
setParameter("DataDisk2SnapshotId", dataDisk2SnapshotId);
|
||||
}
|
||||
|
||||
bool CreateScalingConfigurationRequest::getPasswordInherit()const
|
||||
{
|
||||
return passwordInherit_;
|
||||
@@ -263,15 +186,15 @@ void CreateScalingConfigurationRequest::setPasswordInherit(bool passwordInherit)
|
||||
setParameter("PasswordInherit", std::to_string(passwordInherit));
|
||||
}
|
||||
|
||||
int CreateScalingConfigurationRequest::getDataDisk4Size()const
|
||||
std::string CreateScalingConfigurationRequest::getImageName()const
|
||||
{
|
||||
return dataDisk4Size_;
|
||||
return imageName_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk4Size(int dataDisk4Size)
|
||||
void CreateScalingConfigurationRequest::setImageName(const std::string& imageName)
|
||||
{
|
||||
dataDisk4Size_ = dataDisk4Size;
|
||||
setParameter("DataDisk4Size", std::to_string(dataDisk4Size));
|
||||
imageName_ = imageName;
|
||||
setParameter("ImageName", imageName);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getInstanceType()const
|
||||
@@ -285,39 +208,6 @@ void CreateScalingConfigurationRequest::setInstanceType(const std::string& insta
|
||||
setParameter("InstanceType", instanceType);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk2Category()const
|
||||
{
|
||||
return dataDisk2Category_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk2Category(const std::string& dataDisk2Category)
|
||||
{
|
||||
dataDisk2Category_ = dataDisk2Category;
|
||||
setParameter("DataDisk2Category", dataDisk2Category);
|
||||
}
|
||||
|
||||
int CreateScalingConfigurationRequest::getDataDisk1Size()const
|
||||
{
|
||||
return dataDisk1Size_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk1Size(int dataDisk1Size)
|
||||
{
|
||||
dataDisk1Size_ = dataDisk1Size;
|
||||
setParameter("DataDisk1Size", std::to_string(dataDisk1Size));
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk3SnapshotId()const
|
||||
{
|
||||
return dataDisk3SnapshotId_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk3SnapshotId(const std::string& dataDisk3SnapshotId)
|
||||
{
|
||||
dataDisk3SnapshotId_ = dataDisk3SnapshotId;
|
||||
setParameter("DataDisk3SnapshotId", dataDisk3SnapshotId);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
@@ -340,17 +230,6 @@ void CreateScalingConfigurationRequest::setOwnerAccount(const std::string& owner
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
int CreateScalingConfigurationRequest::getDataDisk2Size()const
|
||||
{
|
||||
return dataDisk2Size_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk2Size(int dataDisk2Size)
|
||||
{
|
||||
dataDisk2Size_ = dataDisk2Size;
|
||||
setParameter("DataDisk2Size", std::to_string(dataDisk2Size));
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getRamRoleName()const
|
||||
{
|
||||
return ramRoleName_;
|
||||
@@ -373,6 +252,26 @@ void CreateScalingConfigurationRequest::setOwnerId(long ownerId)
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::vector<CreateScalingConfigurationRequest::DataDisk> CreateScalingConfigurationRequest::getDataDisk()const
|
||||
{
|
||||
return dataDisk_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk(const std::vector<DataDisk>& dataDisk)
|
||||
{
|
||||
dataDisk_ = dataDisk;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= dataDisk.size(); i++) {
|
||||
auto obj = dataDisk.at(i);
|
||||
std::string str ="DataDisk."+ std::to_string(i);
|
||||
setParameter(str + ".SnapshotId", obj.snapshotId);
|
||||
setParameter(str + ".Size", std::to_string(obj.size));
|
||||
setParameter(str + ".Category", obj.category);
|
||||
setParameter(str + ".Device", obj.device);
|
||||
setParameter(str + ".DeleteWithInstance", std::to_string(obj.deleteWithInstance));
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getScalingConfigurationName()const
|
||||
{
|
||||
return scalingConfigurationName_;
|
||||
@@ -395,17 +294,6 @@ void CreateScalingConfigurationRequest::setTags(const std::string& tags)
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk2DeleteWithInstance()const
|
||||
{
|
||||
return dataDisk2DeleteWithInstance_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk2DeleteWithInstance(const std::string& dataDisk2DeleteWithInstance)
|
||||
{
|
||||
dataDisk2DeleteWithInstance_ = dataDisk2DeleteWithInstance;
|
||||
setParameter("DataDisk2DeleteWithInstance", dataDisk2DeleteWithInstance);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getSpotStrategy()const
|
||||
{
|
||||
return spotStrategy_;
|
||||
@@ -417,28 +305,6 @@ void CreateScalingConfigurationRequest::setSpotStrategy(const std::string& spotS
|
||||
setParameter("SpotStrategy", spotStrategy);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk1Category()const
|
||||
{
|
||||
return dataDisk1Category_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk1Category(const std::string& dataDisk1Category)
|
||||
{
|
||||
dataDisk1Category_ = dataDisk1Category;
|
||||
setParameter("DataDisk1Category", dataDisk1Category);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk3DeleteWithInstance()const
|
||||
{
|
||||
return dataDisk3DeleteWithInstance_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk3DeleteWithInstance(const std::string& dataDisk3DeleteWithInstance)
|
||||
{
|
||||
dataDisk3DeleteWithInstance_ = dataDisk3DeleteWithInstance;
|
||||
setParameter("DataDisk3DeleteWithInstance", dataDisk3DeleteWithInstance);
|
||||
}
|
||||
|
||||
int CreateScalingConfigurationRequest::getLoadBalancerWeight()const
|
||||
{
|
||||
return loadBalancerWeight_;
|
||||
@@ -472,28 +338,6 @@ void CreateScalingConfigurationRequest::setSystemDiskSize(int systemDiskSize)
|
||||
setParameter("SystemDiskSize", std::to_string(systemDiskSize));
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk4SnapshotId()const
|
||||
{
|
||||
return dataDisk4SnapshotId_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk4SnapshotId(const std::string& dataDisk4SnapshotId)
|
||||
{
|
||||
dataDisk4SnapshotId_ = dataDisk4SnapshotId;
|
||||
setParameter("DataDisk4SnapshotId", dataDisk4SnapshotId);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk4Device()const
|
||||
{
|
||||
return dataDisk4Device_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk4Device(const std::string& dataDisk4Device)
|
||||
{
|
||||
dataDisk4Device_ = dataDisk4Device;
|
||||
setParameter("DataDisk4Device", dataDisk4Device);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getInternetChargeType()const
|
||||
{
|
||||
return internetChargeType_;
|
||||
@@ -505,28 +349,6 @@ void CreateScalingConfigurationRequest::setInternetChargeType(const std::string&
|
||||
setParameter("InternetChargeType", internetChargeType);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk3Device()const
|
||||
{
|
||||
return dataDisk3Device_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk3Device(const std::string& dataDisk3Device)
|
||||
{
|
||||
dataDisk3Device_ = dataDisk3Device;
|
||||
setParameter("DataDisk3Device", dataDisk3Device);
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk4DeleteWithInstance()const
|
||||
{
|
||||
return dataDisk4DeleteWithInstance_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk4DeleteWithInstance(const std::string& dataDisk4DeleteWithInstance)
|
||||
{
|
||||
dataDisk4DeleteWithInstance_ = dataDisk4DeleteWithInstance;
|
||||
setParameter("DataDisk4DeleteWithInstance", dataDisk4DeleteWithInstance);
|
||||
}
|
||||
|
||||
int CreateScalingConfigurationRequest::getInternetMaxBandwidthIn()const
|
||||
{
|
||||
return internetMaxBandwidthIn_;
|
||||
@@ -538,14 +360,3 @@ void CreateScalingConfigurationRequest::setInternetMaxBandwidthIn(int internetMa
|
||||
setParameter("InternetMaxBandwidthIn", std::to_string(internetMaxBandwidthIn));
|
||||
}
|
||||
|
||||
std::string CreateScalingConfigurationRequest::getDataDisk1DeleteWithInstance()const
|
||||
{
|
||||
return dataDisk1DeleteWithInstance_;
|
||||
}
|
||||
|
||||
void CreateScalingConfigurationRequest::setDataDisk1DeleteWithInstance(const std::string& dataDisk1DeleteWithInstance)
|
||||
{
|
||||
dataDisk1DeleteWithInstance_ = dataDisk1DeleteWithInstance;
|
||||
setParameter("DataDisk1DeleteWithInstance", dataDisk1DeleteWithInstance);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,12 +192,12 @@ void CreateScalingGroupRequest::setLifecycleHook(const std::vector<LifecycleHook
|
||||
for(int i = 0; i!= lifecycleHook.size(); i++) {
|
||||
auto obj = lifecycleHook.at(i);
|
||||
std::string str ="LifecycleHook."+ std::to_string(i);
|
||||
setParameter(str + ".LifecycleHookName", obj.lifecycleHookName);
|
||||
setParameter(str + ".LifecycleTransition", obj.lifecycleTransition);
|
||||
setParameter(str + ".DefaultResult", obj.defaultResult);
|
||||
setParameter(str + ".LifecycleHookName", obj.lifecycleHookName);
|
||||
setParameter(str + ".HeartbeatTimeout", std::to_string(obj.heartbeatTimeout));
|
||||
setParameter(str + ".NotificationMetadata", obj.notificationMetadata);
|
||||
setParameter(str + ".NotificationArn", obj.notificationArn);
|
||||
setParameter(str + ".NotificationMetadata", obj.notificationMetadata);
|
||||
setParameter(str + ".LifecycleTransition", obj.lifecycleTransition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
82
ess/src/model/DeleteAlarmRequest.cc
Executable file
82
ess/src/model/DeleteAlarmRequest.cc
Executable 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/ess/model/DeleteAlarmRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::DeleteAlarmRequest;
|
||||
|
||||
DeleteAlarmRequest::DeleteAlarmRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "DeleteAlarm")
|
||||
{}
|
||||
|
||||
DeleteAlarmRequest::~DeleteAlarmRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteAlarmRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DeleteAlarmRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DeleteAlarmRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteAlarmRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
long DeleteAlarmRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DeleteAlarmRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DeleteAlarmRequest::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
void DeleteAlarmRequest::setAlarmTaskId(const std::string& alarmTaskId)
|
||||
{
|
||||
alarmTaskId_ = alarmTaskId;
|
||||
setParameter("AlarmTaskId", alarmTaskId);
|
||||
}
|
||||
|
||||
std::string DeleteAlarmRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DeleteAlarmRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
52
ess/src/model/DeleteAlarmResult.cc
Executable file
52
ess/src/model/DeleteAlarmResult.cc
Executable file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ess/model/DeleteAlarmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
DeleteAlarmResult::DeleteAlarmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteAlarmResult::DeleteAlarmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteAlarmResult::~DeleteAlarmResult()
|
||||
{}
|
||||
|
||||
void DeleteAlarmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AlarmTaskId"].isNull())
|
||||
alarmTaskId_ = value["AlarmTaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteAlarmResult::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
148
ess/src/model/DescribeAlarmsRequest.cc
Executable file
148
ess/src/model/DescribeAlarmsRequest.cc
Executable file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ess/model/DescribeAlarmsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::DescribeAlarmsRequest;
|
||||
|
||||
DescribeAlarmsRequest::DescribeAlarmsRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "DescribeAlarms")
|
||||
{}
|
||||
|
||||
DescribeAlarmsRequest::~DescribeAlarmsRequest()
|
||||
{}
|
||||
|
||||
bool DescribeAlarmsRequest::getIsEnable()const
|
||||
{
|
||||
return isEnable_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setIsEnable(bool isEnable)
|
||||
{
|
||||
isEnable_ = isEnable;
|
||||
setParameter("IsEnable", std::to_string(isEnable));
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getMetricType()const
|
||||
{
|
||||
return metricType_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setMetricType(const std::string& metricType)
|
||||
{
|
||||
metricType_ = metricType;
|
||||
setParameter("MetricType", metricType);
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
int DescribeAlarmsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getState()const
|
||||
{
|
||||
return state_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setState(const std::string& state)
|
||||
{
|
||||
state_ = state;
|
||||
setParameter("State", state);
|
||||
}
|
||||
|
||||
long DescribeAlarmsRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setAlarmTaskId(const std::string& alarmTaskId)
|
||||
{
|
||||
alarmTaskId_ = alarmTaskId;
|
||||
setParameter("AlarmTaskId", alarmTaskId);
|
||||
}
|
||||
|
||||
int DescribeAlarmsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeAlarmsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeAlarmsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
108
ess/src/model/DescribeAlarmsResult.cc
Executable file
108
ess/src/model/DescribeAlarmsResult.cc
Executable file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/ess/model/DescribeAlarmsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
DescribeAlarmsResult::DescribeAlarmsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAlarmsResult::DescribeAlarmsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAlarmsResult::~DescribeAlarmsResult()
|
||||
{}
|
||||
|
||||
void DescribeAlarmsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAlarmList = value["AlarmList"]["Alarm"];
|
||||
for (auto value : allAlarmList)
|
||||
{
|
||||
Alarm alarmListObject;
|
||||
if(!value["AlarmTaskId"].isNull())
|
||||
alarmListObject.alarmTaskId = value["AlarmTaskId"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
alarmListObject.name = value["Name"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
alarmListObject.description = value["Description"].asString();
|
||||
if(!value["MetricType"].isNull())
|
||||
alarmListObject.metricType = value["MetricType"].asString();
|
||||
if(!value["MetricName"].isNull())
|
||||
alarmListObject.metricName = value["MetricName"].asString();
|
||||
if(!value["Dimensions"].isNull())
|
||||
alarmListObject.dimensions = value["Dimensions"].asString();
|
||||
if(!value["Period"].isNull())
|
||||
alarmListObject.period = std::stoi(value["Period"].asString());
|
||||
if(!value["Statistics"].isNull())
|
||||
alarmListObject.statistics = value["Statistics"].asString();
|
||||
if(!value["ComparisonOperator"].isNull())
|
||||
alarmListObject.comparisonOperator = value["ComparisonOperator"].asString();
|
||||
if(!value["Threshold"].isNull())
|
||||
alarmListObject.threshold = std::stof(value["Threshold"].asString());
|
||||
if(!value["EvaluationCount"].isNull())
|
||||
alarmListObject.evaluationCount = std::stoi(value["EvaluationCount"].asString());
|
||||
if(!value["State"].isNull())
|
||||
alarmListObject.state = value["State"].asString();
|
||||
if(!value["ScalingGroupId"].isNull())
|
||||
alarmListObject.scalingGroupId = value["ScalingGroupId"].asString();
|
||||
if(!value["Enable"].isNull())
|
||||
alarmListObject.enable = value["Enable"].asString() == "true";
|
||||
auto allAlarmActions = value["alarmActions"]["alarmAction"];
|
||||
for (auto value : allAlarmActions)
|
||||
alarmListObject.alarmActions.push_back(value.asString());
|
||||
alarmList_.push_back(alarmListObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeAlarmsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeAlarmsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeAlarmsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<DescribeAlarmsResult::Alarm> DescribeAlarmsResult::getAlarmList()const
|
||||
{
|
||||
return alarmList_;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ void DescribeScalingConfigurationsResult::parse(const std::string &payload)
|
||||
scalingConfigurationsObject.instanceName = value["InstanceName"].asString();
|
||||
if(!value["ImageId"].isNull())
|
||||
scalingConfigurationsObject.imageId = value["ImageId"].asString();
|
||||
if(!value["ImageName"].isNull())
|
||||
scalingConfigurationsObject.imageName = value["ImageName"].asString();
|
||||
if(!value["HostName"].isNull())
|
||||
scalingConfigurationsObject.hostName = value["HostName"].asString();
|
||||
if(!value["InstanceType"].isNull())
|
||||
@@ -106,6 +108,8 @@ void DescribeScalingConfigurationsResult::parse(const std::string &payload)
|
||||
dataDisksObject.snapshotId = value["SnapshotId"].asString();
|
||||
if(!value["Device"].isNull())
|
||||
dataDisksObject.device = value["Device"].asString();
|
||||
if(!value["DeleteWithInstance"].isNull())
|
||||
dataDisksObject.deleteWithInstance = value["DeleteWithInstance"].asString() == "true";
|
||||
scalingConfigurationsObject.dataDisks.push_back(dataDisksObject);
|
||||
}
|
||||
auto allTags = value["Tags"]["Tag"];
|
||||
|
||||
82
ess/src/model/DisableAlarmRequest.cc
Executable file
82
ess/src/model/DisableAlarmRequest.cc
Executable 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/ess/model/DisableAlarmRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::DisableAlarmRequest;
|
||||
|
||||
DisableAlarmRequest::DisableAlarmRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "DisableAlarm")
|
||||
{}
|
||||
|
||||
DisableAlarmRequest::~DisableAlarmRequest()
|
||||
{}
|
||||
|
||||
std::string DisableAlarmRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DisableAlarmRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DisableAlarmRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DisableAlarmRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
long DisableAlarmRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DisableAlarmRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DisableAlarmRequest::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
void DisableAlarmRequest::setAlarmTaskId(const std::string& alarmTaskId)
|
||||
{
|
||||
alarmTaskId_ = alarmTaskId;
|
||||
setParameter("AlarmTaskId", alarmTaskId);
|
||||
}
|
||||
|
||||
std::string DisableAlarmRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DisableAlarmRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
45
ess/src/model/DisableAlarmResult.cc
Executable file
45
ess/src/model/DisableAlarmResult.cc
Executable file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/ess/model/DisableAlarmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
DisableAlarmResult::DisableAlarmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DisableAlarmResult::DisableAlarmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DisableAlarmResult::~DisableAlarmResult()
|
||||
{}
|
||||
|
||||
void DisableAlarmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
82
ess/src/model/EnableAlarmRequest.cc
Executable file
82
ess/src/model/EnableAlarmRequest.cc
Executable 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/ess/model/EnableAlarmRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::EnableAlarmRequest;
|
||||
|
||||
EnableAlarmRequest::EnableAlarmRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "EnableAlarm")
|
||||
{}
|
||||
|
||||
EnableAlarmRequest::~EnableAlarmRequest()
|
||||
{}
|
||||
|
||||
std::string EnableAlarmRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void EnableAlarmRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string EnableAlarmRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void EnableAlarmRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
long EnableAlarmRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void EnableAlarmRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string EnableAlarmRequest::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
void EnableAlarmRequest::setAlarmTaskId(const std::string& alarmTaskId)
|
||||
{
|
||||
alarmTaskId_ = alarmTaskId;
|
||||
setParameter("AlarmTaskId", alarmTaskId);
|
||||
}
|
||||
|
||||
std::string EnableAlarmRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void EnableAlarmRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
45
ess/src/model/EnableAlarmResult.cc
Executable file
45
ess/src/model/EnableAlarmResult.cc
Executable file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/ess/model/EnableAlarmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
EnableAlarmResult::EnableAlarmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EnableAlarmResult::EnableAlarmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EnableAlarmResult::~EnableAlarmResult()
|
||||
{}
|
||||
|
||||
void EnableAlarmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
116
ess/src/model/ModifyAlarmRequest.cc
Executable file
116
ess/src/model/ModifyAlarmRequest.cc
Executable file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ess/model/ModifyAlarmRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::ModifyAlarmRequest;
|
||||
|
||||
ModifyAlarmRequest::ModifyAlarmRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "ModifyAlarm")
|
||||
{}
|
||||
|
||||
ModifyAlarmRequest::~ModifyAlarmRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyAlarmRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyAlarmRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string ModifyAlarmRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string ModifyAlarmRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setParameter("Description", description);
|
||||
}
|
||||
|
||||
std::vector<std::string> ModifyAlarmRequest::getAlarmAction()const
|
||||
{
|
||||
return alarmAction_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setAlarmAction(const std::vector<std::string>& alarmAction)
|
||||
{
|
||||
alarmAction_ = alarmAction;
|
||||
for(int i = 0; i!= alarmAction.size(); i++)
|
||||
setParameter("AlarmAction."+ std::to_string(i), alarmAction.at(i));
|
||||
}
|
||||
|
||||
long ModifyAlarmRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyAlarmRequest::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setAlarmTaskId(const std::string& alarmTaskId)
|
||||
{
|
||||
alarmTaskId_ = alarmTaskId;
|
||||
setParameter("AlarmTaskId", alarmTaskId);
|
||||
}
|
||||
|
||||
std::string ModifyAlarmRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyAlarmRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
52
ess/src/model/ModifyAlarmResult.cc
Executable file
52
ess/src/model/ModifyAlarmResult.cc
Executable file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ess/model/ModifyAlarmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
ModifyAlarmResult::ModifyAlarmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyAlarmResult::ModifyAlarmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyAlarmResult::~ModifyAlarmResult()
|
||||
{}
|
||||
|
||||
void ModifyAlarmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AlarmTaskId"].isNull())
|
||||
alarmTaskId_ = value["AlarmTaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyAlarmResult::getAlarmTaskId()const
|
||||
{
|
||||
return alarmTaskId_;
|
||||
}
|
||||
|
||||
@@ -36,26 +36,15 @@ void ModifyScalingConfigurationRequest::setImageId(const std::string& imageId)
|
||||
setParameter("ImageId", imageId);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getResourceOwnerAccount()const
|
||||
std::string ModifyScalingConfigurationRequest::getIoOptimized()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
return ioOptimized_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
void ModifyScalingConfigurationRequest::setIoOptimized(const std::string& ioOptimized)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
ioOptimized_ = ioOptimized;
|
||||
setParameter("IoOptimized", ioOptimized);
|
||||
}
|
||||
|
||||
std::vector<std::string> ModifyScalingConfigurationRequest::getInstanceTypes()const
|
||||
@@ -81,17 +70,6 @@ void ModifyScalingConfigurationRequest::setInternetMaxBandwidthOut(int internetM
|
||||
setParameter("InternetMaxBandwidthOut", std::to_string(internetMaxBandwidthOut));
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getRamRoleName()const
|
||||
{
|
||||
return ramRoleName_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setRamRoleName(const std::string& ramRoleName)
|
||||
{
|
||||
ramRoleName_ = ramRoleName;
|
||||
setParameter("RamRoleName", ramRoleName);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getKeyPairName()const
|
||||
{
|
||||
return keyPairName_;
|
||||
@@ -103,15 +81,21 @@ void ModifyScalingConfigurationRequest::setKeyPairName(const std::string& keyPai
|
||||
setParameter("KeyPairName", keyPairName);
|
||||
}
|
||||
|
||||
long ModifyScalingConfigurationRequest::getOwnerId()const
|
||||
std::vector<ModifyScalingConfigurationRequest::SpotPriceLimit> ModifyScalingConfigurationRequest::getSpotPriceLimit()const
|
||||
{
|
||||
return ownerId_;
|
||||
return spotPriceLimit_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setOwnerId(long ownerId)
|
||||
void ModifyScalingConfigurationRequest::setSpotPriceLimit(const std::vector<SpotPriceLimit>& spotPriceLimit)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
spotPriceLimit_ = spotPriceLimit;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= spotPriceLimit.size(); i++) {
|
||||
auto obj = spotPriceLimit.at(i);
|
||||
std::string str ="SpotPriceLimit."+ std::to_string(i);
|
||||
setParameter(str + ".InstanceType", obj.instanceType);
|
||||
setParameter(str + ".PriceLimit", std::to_string(obj.priceLimit));
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getSystemDiskCategory()const
|
||||
@@ -136,6 +120,114 @@ void ModifyScalingConfigurationRequest::setAccessKeyId(const std::string& access
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getUserData()const
|
||||
{
|
||||
return userData_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setUserData(const std::string& userData)
|
||||
{
|
||||
userData_ = userData;
|
||||
setParameter("UserData", userData);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setHostName(const std::string& hostName)
|
||||
{
|
||||
hostName_ = hostName;
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
bool ModifyScalingConfigurationRequest::getPasswordInherit()const
|
||||
{
|
||||
return passwordInherit_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setPasswordInherit(bool passwordInherit)
|
||||
{
|
||||
passwordInherit_ = passwordInherit;
|
||||
setParameter("PasswordInherit", std::to_string(passwordInherit));
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getImageName()const
|
||||
{
|
||||
return imageName_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setImageName(const std::string& imageName)
|
||||
{
|
||||
imageName_ = imageName;
|
||||
setParameter("ImageName", imageName);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getRamRoleName()const
|
||||
{
|
||||
return ramRoleName_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setRamRoleName(const std::string& ramRoleName)
|
||||
{
|
||||
ramRoleName_ = ramRoleName;
|
||||
setParameter("RamRoleName", ramRoleName);
|
||||
}
|
||||
|
||||
long ModifyScalingConfigurationRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::vector<ModifyScalingConfigurationRequest::DataDisk> ModifyScalingConfigurationRequest::getDataDisk()const
|
||||
{
|
||||
return dataDisk_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setDataDisk(const std::vector<DataDisk>& dataDisk)
|
||||
{
|
||||
dataDisk_ = dataDisk;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= dataDisk.size(); i++) {
|
||||
auto obj = dataDisk.at(i);
|
||||
std::string str ="DataDisk."+ std::to_string(i);
|
||||
setParameter(str + ".SnapshotId", obj.snapshotId);
|
||||
setParameter(str + ".Size", std::to_string(obj.size));
|
||||
setParameter(str + ".Category", obj.category);
|
||||
setParameter(str + ".Device", obj.device);
|
||||
setParameter(str + ".DeleteWithInstance", std::to_string(obj.deleteWithInstance));
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getScalingConfigurationName()const
|
||||
{
|
||||
return scalingConfigurationName_;
|
||||
@@ -169,26 +261,15 @@ void ModifyScalingConfigurationRequest::setScalingConfigurationId(const std::str
|
||||
setParameter("ScalingConfigurationId", scalingConfigurationId);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getUserData()const
|
||||
std::string ModifyScalingConfigurationRequest::getSpotStrategy()const
|
||||
{
|
||||
return userData_;
|
||||
return spotStrategy_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setUserData(const std::string& userData)
|
||||
void ModifyScalingConfigurationRequest::setSpotStrategy(const std::string& spotStrategy)
|
||||
{
|
||||
userData_ = userData;
|
||||
setParameter("UserData", userData);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setHostName(const std::string& hostName)
|
||||
{
|
||||
hostName_ = hostName;
|
||||
setParameter("HostName", hostName);
|
||||
spotStrategy_ = spotStrategy;
|
||||
setParameter("SpotStrategy", spotStrategy);
|
||||
}
|
||||
|
||||
std::string ModifyScalingConfigurationRequest::getInstanceName()const
|
||||
@@ -213,17 +294,6 @@ void ModifyScalingConfigurationRequest::setLoadBalancerWeight(int loadBalancerWe
|
||||
setParameter("LoadBalancerWeight", std::to_string(loadBalancerWeight));
|
||||
}
|
||||
|
||||
bool ModifyScalingConfigurationRequest::getPasswordInherit()const
|
||||
{
|
||||
return passwordInherit_;
|
||||
}
|
||||
|
||||
void ModifyScalingConfigurationRequest::setPasswordInherit(bool passwordInherit)
|
||||
{
|
||||
passwordInherit_ = passwordInherit;
|
||||
setParameter("PasswordInherit", std::to_string(passwordInherit));
|
||||
}
|
||||
|
||||
int ModifyScalingConfigurationRequest::getSystemDiskSize()const
|
||||
{
|
||||
return systemDiskSize_;
|
||||
|
||||
Reference in New Issue
Block a user