Add ResourcePoolOptions.Strategy for CreateAutoProvisioningGroup.

This commit is contained in:
sdk-team
2024-10-15 07:23:57 +00:00
parent 52c309ecd7
commit 9c795d127b
45 changed files with 621 additions and 970 deletions

View File

@@ -8331,114 +8331,6 @@ EcsClient::DisableDiskEncryptionByDefaultOutcomeCallable EcsClient::disableDiskE
return task->get_future();
}
EcsClient::EipFillParamsOutcome EcsClient::eipFillParams(const EipFillParamsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EipFillParamsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EipFillParamsOutcome(EipFillParamsResult(outcome.result()));
else
return EipFillParamsOutcome(outcome.error());
}
void EcsClient::eipFillParamsAsync(const EipFillParamsRequest& request, const EipFillParamsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, eipFillParams(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::EipFillParamsOutcomeCallable EcsClient::eipFillParamsCallable(const EipFillParamsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EipFillParamsOutcome()>>(
[this, request]()
{
return this->eipFillParams(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::EipFillProductOutcome EcsClient::eipFillProduct(const EipFillProductRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EipFillProductOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EipFillProductOutcome(EipFillProductResult(outcome.result()));
else
return EipFillProductOutcome(outcome.error());
}
void EcsClient::eipFillProductAsync(const EipFillProductRequest& request, const EipFillProductAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, eipFillProduct(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::EipFillProductOutcomeCallable EcsClient::eipFillProductCallable(const EipFillProductRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EipFillProductOutcome()>>(
[this, request]()
{
return this->eipFillProduct(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::EipNotifyPaidOutcome EcsClient::eipNotifyPaid(const EipNotifyPaidRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EipNotifyPaidOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EipNotifyPaidOutcome(EipNotifyPaidResult(outcome.result()));
else
return EipNotifyPaidOutcome(outcome.error());
}
void EcsClient::eipNotifyPaidAsync(const EipNotifyPaidRequest& request, const EipNotifyPaidAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, eipNotifyPaid(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::EipNotifyPaidOutcomeCallable EcsClient::eipNotifyPaidCallable(const EipNotifyPaidRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EipNotifyPaidOutcome()>>(
[this, request]()
{
return this->eipNotifyPaid(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::EnableDiskEncryptionByDefaultOutcome EcsClient::enableDiskEncryptionByDefault(const EnableDiskEncryptionByDefaultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -11319,6 +11211,42 @@ EcsClient::ModifyVpcAttributeOutcomeCallable EcsClient::modifyVpcAttributeCallab
return task->get_future();
}
EcsClient::PurchaseElasticityAssuranceOutcome EcsClient::purchaseElasticityAssurance(const PurchaseElasticityAssuranceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PurchaseElasticityAssuranceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PurchaseElasticityAssuranceOutcome(PurchaseElasticityAssuranceResult(outcome.result()));
else
return PurchaseElasticityAssuranceOutcome(outcome.error());
}
void EcsClient::purchaseElasticityAssuranceAsync(const PurchaseElasticityAssuranceRequest& request, const PurchaseElasticityAssuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, purchaseElasticityAssurance(request), context);
};
asyncExecute(new Runnable(fn));
}
EcsClient::PurchaseElasticityAssuranceOutcomeCallable EcsClient::purchaseElasticityAssuranceCallable(const PurchaseElasticityAssuranceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PurchaseElasticityAssuranceOutcome()>>(
[this, request]()
{
return this->purchaseElasticityAssurance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcsClient::PurchaseReservedInstancesOfferingOutcome EcsClient::purchaseReservedInstancesOffering(const PurchaseReservedInstancesOfferingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -422,6 +422,18 @@ void CreateAutoProvisioningGroupRequest::setSpotAllocationStrategy(const std::st
setParameter(std::string("SpotAllocationStrategy"), spotAllocationStrategy);
}
CreateAutoProvisioningGroupRequest::ResourcePoolOptions CreateAutoProvisioningGroupRequest::getResourcePoolOptions() const {
return resourcePoolOptions_;
}
void CreateAutoProvisioningGroupRequest::setResourcePoolOptions(const CreateAutoProvisioningGroupRequest::ResourcePoolOptions &resourcePoolOptions) {
resourcePoolOptions_ = resourcePoolOptions;
setParameter(std::string("ResourcePoolOptions") + ".Strategy", resourcePoolOptions.strategy);
for(int dep1 = 0; dep1 != resourcePoolOptions.privatePoolIds.size(); dep1++) {
setParameter(std::string("ResourcePoolOptions") + ".PrivatePoolIds." + std::to_string(dep1 + 1), resourcePoolOptions.privatePoolIds[dep1]);
}
}
std::string CreateAutoProvisioningGroupRequest::getRegionId() const {
return regionId_;
}

View File

@@ -61,6 +61,15 @@ void CreateImageComponentRequest::setSystemType(const std::string &systemType) {
setParameter(std::string("SystemType"), systemType);
}
std::string CreateImageComponentRequest::getComponentVersion() const {
return componentVersion_;
}
void CreateImageComponentRequest::setComponentVersion(const std::string &componentVersion) {
componentVersion_ = componentVersion;
setParameter(std::string("ComponentVersion"), componentVersion);
}
std::string CreateImageComponentRequest::getContent() const {
return content_;
}

View File

@@ -155,6 +155,15 @@ void CreateImagePipelineRequest::setOwnerAccount(const std::string &ownerAccount
setParameter(std::string("OwnerAccount"), ownerAccount);
}
std::string CreateImagePipelineRequest::getRepairMode() const {
return repairMode_;
}
void CreateImagePipelineRequest::setRepairMode(const std::string &repairMode) {
repairMode_ = repairMode;
setParameter(std::string("RepairMode"), repairMode);
}
long CreateImagePipelineRequest::getOwnerId() const {
return ownerId_;
}
@@ -208,6 +217,15 @@ void CreateImagePipelineRequest::setName(const std::string &name) {
setParameter(std::string("Name"), name);
}
std::string CreateImagePipelineRequest::getImageFamily() const {
return imageFamily_;
}
void CreateImagePipelineRequest::setImageFamily(const std::string &imageFamily) {
imageFamily_ = imageFamily;
setParameter(std::string("ImageFamily"), imageFamily);
}
std::string CreateImagePipelineRequest::getBuildContent() const {
return buildContent_;
}
@@ -217,3 +235,12 @@ void CreateImagePipelineRequest::setBuildContent(const std::string &buildContent
setParameter(std::string("BuildContent"), buildContent);
}
std::string CreateImagePipelineRequest::getTestContent() const {
return testContent_;
}
void CreateImagePipelineRequest::setTestContent(const std::string &testContent) {
testContent_ = testContent;
setParameter(std::string("TestContent"), testContent);
}

View File

@@ -43,6 +43,15 @@ void CreateLaunchTemplateRequest::setResourceOwnerId(long resourceOwnerId) {
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
int CreateLaunchTemplateRequest::getHttpPutResponseHopLimit() const {
return httpPutResponseHopLimit_;
}
void CreateLaunchTemplateRequest::setHttpPutResponseHopLimit(int httpPutResponseHopLimit) {
httpPutResponseHopLimit_ = httpPutResponseHopLimit;
setParameter(std::string("HttpPutResponseHopLimit"), std::to_string(httpPutResponseHopLimit));
}
std::string CreateLaunchTemplateRequest::getSecurityEnhancementStrategy() const {
return securityEnhancementStrategy_;
}
@@ -404,6 +413,15 @@ void CreateLaunchTemplateRequest::setRegionId(const std::string &regionId) {
setParameter(std::string("RegionId"), regionId);
}
std::string CreateLaunchTemplateRequest::getHttpEndpoint() const {
return httpEndpoint_;
}
void CreateLaunchTemplateRequest::setHttpEndpoint(const std::string &httpEndpoint) {
httpEndpoint_ = httpEndpoint;
setParameter(std::string("HttpEndpoint"), httpEndpoint);
}
std::string CreateLaunchTemplateRequest::getInstanceType() const {
return instanceType_;
}
@@ -581,6 +599,15 @@ void CreateLaunchTemplateRequest::setVpcId(const std::string &vpcId) {
setParameter(std::string("VpcId"), vpcId);
}
std::string CreateLaunchTemplateRequest::getHttpTokens() const {
return httpTokens_;
}
void CreateLaunchTemplateRequest::setHttpTokens(const std::string &httpTokens) {
httpTokens_ = httpTokens;
setParameter(std::string("HttpTokens"), httpTokens);
}
std::string CreateLaunchTemplateRequest::getSystemDiskDescription() const {
return systemDiskDescription_;
}

View File

@@ -43,6 +43,15 @@ void CreateLaunchTemplateVersionRequest::setResourceOwnerId(long resourceOwnerId
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
int CreateLaunchTemplateVersionRequest::getHttpPutResponseHopLimit() const {
return httpPutResponseHopLimit_;
}
void CreateLaunchTemplateVersionRequest::setHttpPutResponseHopLimit(int httpPutResponseHopLimit) {
httpPutResponseHopLimit_ = httpPutResponseHopLimit;
setParameter(std::string("HttpPutResponseHopLimit"), std::to_string(httpPutResponseHopLimit));
}
std::string CreateLaunchTemplateVersionRequest::getSecurityEnhancementStrategy() const {
return securityEnhancementStrategy_;
}
@@ -390,6 +399,15 @@ void CreateLaunchTemplateVersionRequest::setRegionId(const std::string &regionId
setParameter(std::string("RegionId"), regionId);
}
std::string CreateLaunchTemplateVersionRequest::getHttpEndpoint() const {
return httpEndpoint_;
}
void CreateLaunchTemplateVersionRequest::setHttpEndpoint(const std::string &httpEndpoint) {
httpEndpoint_ = httpEndpoint;
setParameter(std::string("HttpEndpoint"), httpEndpoint);
}
std::string CreateLaunchTemplateVersionRequest::getInstanceType() const {
return instanceType_;
}
@@ -567,6 +585,15 @@ void CreateLaunchTemplateVersionRequest::setVpcId(const std::string &vpcId) {
setParameter(std::string("VpcId"), vpcId);
}
std::string CreateLaunchTemplateVersionRequest::getHttpTokens() const {
return httpTokens_;
}
void CreateLaunchTemplateVersionRequest::setHttpTokens(const std::string &httpTokens) {
httpTokens_ = httpTokens;
setParameter(std::string("HttpTokens"), httpTokens);
}
std::string CreateLaunchTemplateVersionRequest::getSystemDiskDescription() const {
return systemDiskDescription_;
}

View File

@@ -34,6 +34,24 @@ void DescribeImageComponentsRequest::setResourceOwnerId(long resourceOwnerId) {
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string DescribeImageComponentsRequest::getSystemType() const {
return systemType_;
}
void DescribeImageComponentsRequest::setSystemType(const std::string &systemType) {
systemType_ = systemType;
setParameter(std::string("SystemType"), systemType);
}
std::string DescribeImageComponentsRequest::getComponentVersion() const {
return componentVersion_;
}
void DescribeImageComponentsRequest::setComponentVersion(const std::string &componentVersion) {
componentVersion_ = componentVersion;
setParameter(std::string("ComponentVersion"), componentVersion);
}
std::vector<std::string> DescribeImageComponentsRequest::getImageComponentId() const {
return imageComponentId_;
}
@@ -119,6 +137,15 @@ void DescribeImageComponentsRequest::setOwnerId(long ownerId) {
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string DescribeImageComponentsRequest::getComponentType() const {
return componentType_;
}
void DescribeImageComponentsRequest::setComponentType(const std::string &componentType) {
componentType_ = componentType;
setParameter(std::string("ComponentType"), componentType);
}
std::string DescribeImageComponentsRequest::getName() const {
return name_;
}

View File

@@ -61,6 +61,8 @@ void DescribeImageComponentsResult::parse(const std::string &payload)
imageComponentObject.content = valueImageComponentImageComponentSet["Content"].asString();
if(!valueImageComponentImageComponentSet["Owner"].isNull())
imageComponentObject.owner = valueImageComponentImageComponentSet["Owner"].asString();
if(!valueImageComponentImageComponentSet["ComponentVersion"].isNull())
imageComponentObject.componentVersion = valueImageComponentImageComponentSet["ComponentVersion"].asString();
auto allTagsNode = valueImageComponentImageComponentSet["Tags"]["Tag"];
for (auto valueImageComponentImageComponentSetTagsTag : allTagsNode)
{
@@ -71,6 +73,18 @@ void DescribeImageComponentsResult::parse(const std::string &payload)
tagsObject.tagKey = valueImageComponentImageComponentSetTagsTag["TagKey"].asString();
imageComponentObject.tags.push_back(tagsObject);
}
auto allParametersNode = valueImageComponentImageComponentSet["Parameters"]["Parameter"];
for (auto valueImageComponentImageComponentSetParametersParameter : allParametersNode)
{
ImageComponentSet::_Parameter parametersObject;
if(!valueImageComponentImageComponentSetParametersParameter["Name"].isNull())
parametersObject.name = valueImageComponentImageComponentSetParametersParameter["Name"].asString();
if(!valueImageComponentImageComponentSetParametersParameter["Type"].isNull())
parametersObject.type = valueImageComponentImageComponentSetParametersParameter["Type"].asString();
if(!valueImageComponentImageComponentSetParametersParameter["DefaultValue"].isNull())
parametersObject.defaultValue = valueImageComponentImageComponentSetParametersParameter["DefaultValue"].asString();
imageComponentObject.parameters.push_back(parametersObject);
}
imageComponent_.push_back(imageComponentObject);
}
if(!value["NextToken"].isNull())

View File

@@ -71,6 +71,12 @@ void DescribeImagePipelinesResult::parse(const std::string &payload)
imagePipelineObject.name = valueImagePipelineImagePipelineSet["Name"].asString();
if(!valueImagePipelineImagePipelineSet["BuildContent"].isNull())
imagePipelineObject.buildContent = valueImagePipelineImagePipelineSet["BuildContent"].asString();
if(!valueImagePipelineImagePipelineSet["RepairMode"].isNull())
imagePipelineObject.repairMode = valueImagePipelineImagePipelineSet["RepairMode"].asString();
if(!valueImagePipelineImagePipelineSet["TestContent"].isNull())
imagePipelineObject.testContent = valueImagePipelineImagePipelineSet["TestContent"].asString();
if(!valueImagePipelineImagePipelineSet["ImageFamily"].isNull())
imagePipelineObject.imageFamily = valueImagePipelineImagePipelineSet["ImageFamily"].asString();
auto allTagsNode = valueImagePipelineImagePipelineSet["Tags"]["Tag"];
for (auto valueImagePipelineImagePipelineSetTagsTag : allTagsNode)
{

View File

@@ -154,6 +154,12 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
launchTemplateVersionSetsObject.launchTemplateData.autoRenewPeriod = std::stoi(launchTemplateDataNode["AutoRenewPeriod"].asString());
if(!launchTemplateDataNode["PeriodUnit"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.periodUnit = launchTemplateDataNode["PeriodUnit"].asString();
if(!launchTemplateDataNode["HttpEndpoint"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.httpEndpoint = launchTemplateDataNode["HttpEndpoint"].asString();
if(!launchTemplateDataNode["HttpTokens"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.httpTokens = launchTemplateDataNode["HttpTokens"].asString();
if(!launchTemplateDataNode["HttpPutResponseHopLimit"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.httpPutResponseHopLimit = std::stoi(launchTemplateDataNode["HttpPutResponseHopLimit"].asString());
auto allDataDisksNode = launchTemplateDataNode["DataDisks"]["DataDisk"];
for (auto launchTemplateDataNodeDataDisksDataDisk : allDataDisksNode)
{

View File

@@ -65,6 +65,10 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
securityGroupsObject.serviceManaged = valueSecurityGroupsSecurityGroup["ServiceManaged"].asString() == "true";
if(!valueSecurityGroupsSecurityGroup["ServiceID"].isNull())
securityGroupsObject.serviceID = std::stol(valueSecurityGroupsSecurityGroup["ServiceID"].asString());
if(!valueSecurityGroupsSecurityGroup["RuleCount"].isNull())
securityGroupsObject.ruleCount = std::stoi(valueSecurityGroupsSecurityGroup["RuleCount"].asString());
if(!valueSecurityGroupsSecurityGroup["GroupToGroupRuleCount"].isNull())
securityGroupsObject.groupToGroupRuleCount = std::stoi(valueSecurityGroupsSecurityGroup["GroupToGroupRuleCount"].asString());
auto allTagsNode = valueSecurityGroupsSecurityGroup["Tags"]["Tag"];
for (auto valueSecurityGroupsSecurityGroupTagsTag : allTagsNode)
{

View File

@@ -1,90 +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/ecs/model/EipFillParamsRequest.h>
using AlibabaCloud::Ecs::Model::EipFillParamsRequest;
EipFillParamsRequest::EipFillParamsRequest()
: RpcServiceRequest("ecs", "2014-05-26", "EipFillParams") {
setMethod(HttpRequest::Method::Post);
}
EipFillParamsRequest::~EipFillParamsRequest() {}
long EipFillParamsRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void EipFillParamsRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string EipFillParamsRequest::getData() const {
return data_;
}
void EipFillParamsRequest::setData(const std::string &data) {
data_ = data;
setParameter(std::string("data"), data);
}
std::string EipFillParamsRequest::getClientToken() const {
return clientToken_;
}
void EipFillParamsRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string EipFillParamsRequest::getUserCidr() const {
return userCidr_;
}
void EipFillParamsRequest::setUserCidr(const std::string &userCidr) {
userCidr_ = userCidr;
setParameter(std::string("UserCidr"), userCidr);
}
std::string EipFillParamsRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void EipFillParamsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
std::string EipFillParamsRequest::getOwnerAccount() const {
return ownerAccount_;
}
void EipFillParamsRequest::setOwnerAccount(const std::string &ownerAccount) {
ownerAccount_ = ownerAccount;
setParameter(std::string("OwnerAccount"), ownerAccount);
}
long EipFillParamsRequest::getOwnerId() const {
return ownerId_;
}
void EipFillParamsRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}

View File

@@ -1,79 +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/ecs/model/EipFillParamsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
EipFillParamsResult::EipFillParamsResult() :
ServiceResult()
{}
EipFillParamsResult::EipFillParamsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EipFillParamsResult::~EipFillParamsResult()
{}
void EipFillParamsResult::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();
if(!value["data"].isNull())
data_ = value["data"].asString();
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
}
std::string EipFillParamsResult::getMessage()const
{
return message_;
}
std::string EipFillParamsResult::getRequestId()const
{
return requestId_;
}
std::string EipFillParamsResult::getData()const
{
return data_;
}
std::string EipFillParamsResult::getCode()const
{
return code_;
}
bool EipFillParamsResult::getSuccess()const
{
return success_;
}

View File

@@ -1,90 +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/ecs/model/EipFillProductRequest.h>
using AlibabaCloud::Ecs::Model::EipFillProductRequest;
EipFillProductRequest::EipFillProductRequest()
: RpcServiceRequest("ecs", "2014-05-26", "EipFillProduct") {
setMethod(HttpRequest::Method::Post);
}
EipFillProductRequest::~EipFillProductRequest() {}
long EipFillProductRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void EipFillProductRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string EipFillProductRequest::getData() const {
return data_;
}
void EipFillProductRequest::setData(const std::string &data) {
data_ = data;
setParameter(std::string("data"), data);
}
std::string EipFillProductRequest::getClientToken() const {
return clientToken_;
}
void EipFillProductRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string EipFillProductRequest::getUserCidr() const {
return userCidr_;
}
void EipFillProductRequest::setUserCidr(const std::string &userCidr) {
userCidr_ = userCidr;
setParameter(std::string("UserCidr"), userCidr);
}
std::string EipFillProductRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void EipFillProductRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
std::string EipFillProductRequest::getOwnerAccount() const {
return ownerAccount_;
}
void EipFillProductRequest::setOwnerAccount(const std::string &ownerAccount) {
ownerAccount_ = ownerAccount;
setParameter(std::string("OwnerAccount"), ownerAccount);
}
long EipFillProductRequest::getOwnerId() const {
return ownerId_;
}
void EipFillProductRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}

View File

@@ -1,79 +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/ecs/model/EipFillProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
EipFillProductResult::EipFillProductResult() :
ServiceResult()
{}
EipFillProductResult::EipFillProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EipFillProductResult::~EipFillProductResult()
{}
void EipFillProductResult::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();
if(!value["data"].isNull())
data_ = value["data"].asString();
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
}
std::string EipFillProductResult::getMessage()const
{
return message_;
}
std::string EipFillProductResult::getRequestId()const
{
return requestId_;
}
std::string EipFillProductResult::getData()const
{
return data_;
}
std::string EipFillProductResult::getCode()const
{
return code_;
}
bool EipFillProductResult::getSuccess()const
{
return success_;
}

View File

@@ -1,90 +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/ecs/model/EipNotifyPaidRequest.h>
using AlibabaCloud::Ecs::Model::EipNotifyPaidRequest;
EipNotifyPaidRequest::EipNotifyPaidRequest()
: RpcServiceRequest("ecs", "2014-05-26", "EipNotifyPaid") {
setMethod(HttpRequest::Method::Post);
}
EipNotifyPaidRequest::~EipNotifyPaidRequest() {}
long EipNotifyPaidRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void EipNotifyPaidRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string EipNotifyPaidRequest::getData() const {
return data_;
}
void EipNotifyPaidRequest::setData(const std::string &data) {
data_ = data;
setParameter(std::string("data"), data);
}
std::string EipNotifyPaidRequest::getClientToken() const {
return clientToken_;
}
void EipNotifyPaidRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string EipNotifyPaidRequest::getUserCidr() const {
return userCidr_;
}
void EipNotifyPaidRequest::setUserCidr(const std::string &userCidr) {
userCidr_ = userCidr;
setParameter(std::string("UserCidr"), userCidr);
}
std::string EipNotifyPaidRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void EipNotifyPaidRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
std::string EipNotifyPaidRequest::getOwnerAccount() const {
return ownerAccount_;
}
void EipNotifyPaidRequest::setOwnerAccount(const std::string &ownerAccount) {
ownerAccount_ = ownerAccount;
setParameter(std::string("OwnerAccount"), ownerAccount);
}
long EipNotifyPaidRequest::getOwnerId() const {
return ownerId_;
}
void EipNotifyPaidRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}

View File

@@ -1,79 +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/ecs/model/EipNotifyPaidResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
EipNotifyPaidResult::EipNotifyPaidResult() :
ServiceResult()
{}
EipNotifyPaidResult::EipNotifyPaidResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EipNotifyPaidResult::~EipNotifyPaidResult()
{}
void EipNotifyPaidResult::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();
if(!value["data"].isNull())
data_ = value["data"].asString();
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
}
std::string EipNotifyPaidResult::getMessage()const
{
return message_;
}
std::string EipNotifyPaidResult::getRequestId()const
{
return requestId_;
}
std::string EipNotifyPaidResult::getData()const
{
return data_;
}
std::string EipNotifyPaidResult::getCode()const
{
return code_;
}
bool EipNotifyPaidResult::getSuccess()const
{
return success_;
}

View File

@@ -79,6 +79,15 @@ void ImportImageRequest::setResourceGroupId(const std::string &resourceGroupId)
setParameter(std::string("ResourceGroupId"), resourceGroupId);
}
ImportImageRequest::Features ImportImageRequest::getFeatures() const {
return features_;
}
void ImportImageRequest::setFeatures(const ImportImageRequest::Features &features) {
features_ = features;
setParameter(std::string("Features") + ".NvmeSupport", features.nvmeSupport);
}
std::string ImportImageRequest::getBootMode() const {
return bootMode_;
}
@@ -156,6 +165,15 @@ void ImportImageRequest::setDetectionStrategy(const std::string &detectionStrate
setParameter(std::string("DetectionStrategy"), detectionStrategy);
}
bool ImportImageRequest::getDryRun() const {
return dryRun_;
}
void ImportImageRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::string ImportImageRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -34,6 +34,15 @@ void ModifyElasticityAssuranceRequest::setResourceOwnerId(long resourceOwnerId)
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string ModifyElasticityAssuranceRequest::getClientToken() const {
return clientToken_;
}
void ModifyElasticityAssuranceRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string ModifyElasticityAssuranceRequest::getDescription() const {
return description_;
}
@@ -106,3 +115,12 @@ void ModifyElasticityAssuranceRequest::setPackageType(const std::string &package
setParameter(std::string("PackageType"), packageType);
}
int ModifyElasticityAssuranceRequest::getInstanceAmount() const {
return instanceAmount_;
}
void ModifyElasticityAssuranceRequest::setInstanceAmount(int instanceAmount) {
instanceAmount_ = instanceAmount;
setParameter(std::string("InstanceAmount"), std::to_string(instanceAmount));
}

View File

@@ -0,0 +1,153 @@
/*
* 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/ecs/model/PurchaseElasticityAssuranceRequest.h>
using AlibabaCloud::Ecs::Model::PurchaseElasticityAssuranceRequest;
PurchaseElasticityAssuranceRequest::PurchaseElasticityAssuranceRequest()
: RpcServiceRequest("ecs", "2014-05-26", "PurchaseElasticityAssurance") {
setMethod(HttpRequest::Method::Post);
}
PurchaseElasticityAssuranceRequest::~PurchaseElasticityAssuranceRequest() {}
long PurchaseElasticityAssuranceRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void PurchaseElasticityAssuranceRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string PurchaseElasticityAssuranceRequest::getClientToken() const {
return clientToken_;
}
void PurchaseElasticityAssuranceRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string PurchaseElasticityAssuranceRequest::getStartTime() const {
return startTime_;
}
void PurchaseElasticityAssuranceRequest::setStartTime(const std::string &startTime) {
startTime_ = startTime;
setParameter(std::string("StartTime"), startTime);
}
std::string PurchaseElasticityAssuranceRequest::getPrivatePoolOptionsMatchCriteria() const {
return privatePoolOptionsMatchCriteria_;
}
void PurchaseElasticityAssuranceRequest::setPrivatePoolOptionsMatchCriteria(const std::string &privatePoolOptionsMatchCriteria) {
privatePoolOptionsMatchCriteria_ = privatePoolOptionsMatchCriteria;
setParameter(std::string("PrivatePoolOptions.MatchCriteria"), privatePoolOptionsMatchCriteria);
}
std::string PurchaseElasticityAssuranceRequest::getRegionId() const {
return regionId_;
}
void PurchaseElasticityAssuranceRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string PurchaseElasticityAssuranceRequest::getInstanceChargeType() const {
return instanceChargeType_;
}
void PurchaseElasticityAssuranceRequest::setInstanceChargeType(const std::string &instanceChargeType) {
instanceChargeType_ = instanceChargeType;
setParameter(std::string("InstanceChargeType"), instanceChargeType);
}
std::string PurchaseElasticityAssuranceRequest::getPrivatePoolOptionsId() const {
return privatePoolOptionsId_;
}
void PurchaseElasticityAssuranceRequest::setPrivatePoolOptionsId(const std::string &privatePoolOptionsId) {
privatePoolOptionsId_ = privatePoolOptionsId;
setParameter(std::string("PrivatePoolOptions.Id"), privatePoolOptionsId);
}
int PurchaseElasticityAssuranceRequest::getPeriod() const {
return period_;
}
void PurchaseElasticityAssuranceRequest::setPeriod(int period) {
period_ = period;
setParameter(std::string("Period"), std::to_string(period));
}
std::string PurchaseElasticityAssuranceRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}
void PurchaseElasticityAssuranceRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
}
std::string PurchaseElasticityAssuranceRequest::getOwnerAccount() const {
return ownerAccount_;
}
void PurchaseElasticityAssuranceRequest::setOwnerAccount(const std::string &ownerAccount) {
ownerAccount_ = ownerAccount;
setParameter(std::string("OwnerAccount"), ownerAccount);
}
long PurchaseElasticityAssuranceRequest::getOwnerId() const {
return ownerId_;
}
void PurchaseElasticityAssuranceRequest::setOwnerId(long ownerId) {
ownerId_ = ownerId;
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string PurchaseElasticityAssuranceRequest::getResourceType() const {
return resourceType_;
}
void PurchaseElasticityAssuranceRequest::setResourceType(const std::string &resourceType) {
resourceType_ = resourceType;
setParameter(std::string("ResourceType"), resourceType);
}
std::string PurchaseElasticityAssuranceRequest::getPeriodUnit() const {
return periodUnit_;
}
void PurchaseElasticityAssuranceRequest::setPeriodUnit(const std::string &periodUnit) {
periodUnit_ = periodUnit;
setParameter(std::string("PeriodUnit"), periodUnit);
}
std::string PurchaseElasticityAssuranceRequest::getPackageType() const {
return packageType_;
}
void PurchaseElasticityAssuranceRequest::setPackageType(const std::string &packageType) {
packageType_ = packageType;
setParameter(std::string("PackageType"), packageType);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/ecs/model/PurchaseElasticityAssuranceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
PurchaseElasticityAssuranceResult::PurchaseElasticityAssuranceResult() :
ServiceResult()
{}
PurchaseElasticityAssuranceResult::PurchaseElasticityAssuranceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PurchaseElasticityAssuranceResult::~PurchaseElasticityAssuranceResult()
{}
void PurchaseElasticityAssuranceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -635,6 +635,14 @@ void RunInstancesRequest::setZoneId(const std::string &zoneId) {
setParameter(std::string("ZoneId"), zoneId);
}
std::vector<std::string> RunInstancesRequest::getCpuOptionsAccelerators() const {
return cpuOptionsAccelerators_;
}
void RunInstancesRequest::setCpuOptionsAccelerators(const std::vector<std::string> &cpuOptionsAccelerators) {
cpuOptionsAccelerators_ = cpuOptionsAccelerators;
}
std::vector<std::string> RunInstancesRequest::getIpv6Address() const {
return ipv6Address_;
}