Files
aliyun-openapi-cpp-sdk/ess/src/model/SetInstancesProtectionRequest.cc
2020-03-26 17:47:49 +08:00

98 lines
2.8 KiB
C++
Executable File

/*
* 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/SetInstancesProtectionRequest.h>
using AlibabaCloud::Ess::Model::SetInstancesProtectionRequest;
SetInstancesProtectionRequest::SetInstancesProtectionRequest() :
RpcServiceRequest("ess", "2014-08-28", "SetInstancesProtection")
{
setMethod(HttpRequest::Method::Post);
}
SetInstancesProtectionRequest::~SetInstancesProtectionRequest()
{}
std::string SetInstancesProtectionRequest::getScalingGroupId()const
{
return scalingGroupId_;
}
void SetInstancesProtectionRequest::setScalingGroupId(const std::string& scalingGroupId)
{
scalingGroupId_ = scalingGroupId;
setParameter("ScalingGroupId", scalingGroupId);
}
std::string SetInstancesProtectionRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void SetInstancesProtectionRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string SetInstancesProtectionRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void SetInstancesProtectionRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
long SetInstancesProtectionRequest::getOwnerId()const
{
return ownerId_;
}
void SetInstancesProtectionRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::vector<std::string> SetInstancesProtectionRequest::getInstanceId()const
{
return instanceId_;
}
void SetInstancesProtectionRequest::setInstanceId(const std::vector<std::string>& instanceId)
{
instanceId_ = instanceId;
for(int dep1 = 0; dep1!= instanceId.size(); dep1++) {
setParameter("InstanceId."+ std::to_string(dep1), instanceId.at(dep1));
}
}
bool SetInstancesProtectionRequest::getProtectedFromScaleIn()const
{
return protectedFromScaleIn_;
}
void SetInstancesProtectionRequest::setProtectedFromScaleIn(bool protectedFromScaleIn)
{
protectedFromScaleIn_ = protectedFromScaleIn;
setParameter("ProtectedFromScaleIn", protectedFromScaleIn ? "true" : "false");
}