From 78dde98979b6c438e98bb0639b589215a0336adb Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 6 Nov 2023 11:51:43 +0000 Subject: [PATCH] CreateAutoProvisioningGroup support SecurityOptions. --- aliyun-java-sdk-ecs/ChangeLog.txt | 3 + aliyun-java-sdk-ecs/pom.xml | 2 +- .../v20140526/CreateActivationRequest.java | 13 ++ .../CreateAutoProvisioningGroupRequest.java | 13 ++ .../model/v20140526/CreateCommandRequest.java | 13 ++ .../CreateLaunchTemplateRequest.java | 13 ++ .../CreateLaunchTemplateVersionRequest.java | 13 ++ .../v20140526/CreateSavingsPlanRequest.java | 150 ++++++++++++++++++ ...se.java => CreateSavingsPlanResponse.java} | 33 ++-- .../DeleteLaunchTemplateResponse.java | 13 +- .../v20140526/DescribeActivationsRequest.java | 13 ++ .../DescribeActivationsResponse.java | 10 ++ .../v20140526/DescribeCommandsRequest.java | 13 ++ .../v20140526/DescribeCommandsResponse.java | 10 ++ ...escribeLaunchTemplateVersionsResponse.java | 10 ++ .../DescribeSavingsPlanEstimationRequest.java | 108 +++++++++++++ ...DescribeSavingsPlanEstimationResponse.java | 126 +++++++++++++++ .../DescribeSavingsPlanPriceRequest.java | 137 ++++++++++++++++ .../DescribeSavingsPlanPriceResponse.java | 146 +++++++++++++++++ .../v20140526/ImportSnapshotRequest.java | 132 --------------- ...reateSavingsPlanResponseUnmarshaller.java} | 14 +- ...eteLaunchTemplateResponseUnmarshaller.java | 11 +- ...scribeActivationsResponseUnmarshaller.java | 1 + .../DescribeCommandsResponseUnmarshaller.java | 1 + ...hTemplateVersionsResponseUnmarshaller.java | 1 + ...ngsPlanEstimationResponseUnmarshaller.java | 37 +++++ ...eSavingsPlanPriceResponseUnmarshaller.java | 55 +++++++ 27 files changed, 935 insertions(+), 156 deletions(-) create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanRequest.java rename aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/{ImportSnapshotResponse.java => CreateSavingsPlanResponse.java} (55%) create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationRequest.java create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationResponse.java create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceRequest.java create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceResponse.java delete mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotRequest.java rename aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/{ImportSnapshotResponseUnmarshaller.java => CreateSavingsPlanResponseUnmarshaller.java} (52%) create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanEstimationResponseUnmarshaller.java create mode 100644 aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanPriceResponseUnmarshaller.java diff --git a/aliyun-java-sdk-ecs/ChangeLog.txt b/aliyun-java-sdk-ecs/ChangeLog.txt index 100bcdb39f..9bc0495ab5 100644 --- a/aliyun-java-sdk-ecs/ChangeLog.txt +++ b/aliyun-java-sdk-ecs/ChangeLog.txt @@ -1,3 +1,6 @@ +2023-11-06 Version: 5.11.1 +- CreateAutoProvisioningGroup support SecurityOptions. + 2023-10-17 Version: 5.11.0 - Update ALL. diff --git a/aliyun-java-sdk-ecs/pom.xml b/aliyun-java-sdk-ecs/pom.xml index 19b57d5ac3..b1fcc6d247 100644 --- a/aliyun-java-sdk-ecs/pom.xml +++ b/aliyun-java-sdk-ecs/pom.xml @@ -4,7 +4,7 @@ com.aliyun aliyun-java-sdk-ecs jar - 5.11.0 + 5.11.1 aliyun-java-sdk-ecs http://www.aliyun.com Aliyun Open API SDK for Java diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateActivationRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateActivationRequest.java index 8292c30c9a..a36eef9069 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateActivationRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateActivationRequest.java @@ -30,6 +30,8 @@ public class CreateActivationRequest extends RpcAcsRequest tags; @@ -76,6 +78,17 @@ public void setDescription(String description) { } } + public String getResourceGroupId() { + return this.resourceGroupId; + } + + public void setResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + if(resourceGroupId != null){ + putQueryParameter("ResourceGroupId", resourceGroupId); + } + } + public Integer getInstanceCount() { return this.instanceCount; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateAutoProvisioningGroupRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateAutoProvisioningGroupRequest.java index bd1fa88bc2..f7674e04d7 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateAutoProvisioningGroupRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateAutoProvisioningGroupRequest.java @@ -66,6 +66,8 @@ public class CreateAutoProvisioningGroupRequest extends RpcAcsRequest { private Long timeout; + private String resourceGroupId; + private String contentEncoding; private List tags; @@ -126,6 +128,17 @@ public void setTimeout(Long timeout) { } } + public String getResourceGroupId() { + return this.resourceGroupId; + } + + public void setResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + if(resourceGroupId != null){ + putQueryParameter("ResourceGroupId", resourceGroupId); + } + } + public String getContentEncoding() { return this.contentEncoding; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateRequest.java index e4f1ac82c3..75edcc3b00 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateRequest.java @@ -120,6 +120,8 @@ public class CreateLaunchTemplateRequest extends RpcAcsRequest securityGroupIdss; @@ -680,6 +682,17 @@ public void setAutoReleaseTime(String autoReleaseTime) { } } + public String getCreditSpecification() { + return this.creditSpecification; + } + + public void setCreditSpecification(String creditSpecification) { + this.creditSpecification = creditSpecification; + if(creditSpecification != null){ + putQueryParameter("CreditSpecification", creditSpecification); + } + } + public Integer getSpotDuration() { return this.spotDuration; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateVersionRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateVersionRequest.java index cfacdb339a..dcdbbc3cc8 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateVersionRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateLaunchTemplateVersionRequest.java @@ -118,6 +118,8 @@ public class CreateLaunchTemplateVersionRequest extends RpcAcsRequest securityGroupIdss; @@ -664,6 +666,17 @@ public void setAutoReleaseTime(String autoReleaseTime) { } } + public String getCreditSpecification() { + return this.creditSpecification; + } + + public void setCreditSpecification(String creditSpecification) { + this.creditSpecification = creditSpecification; + if(creditSpecification != null){ + putQueryParameter("CreditSpecification", creditSpecification); + } + } + public Integer getSpotDuration() { return this.spotDuration; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanRequest.java new file mode 100644 index 0000000000..922854571f --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanRequest.java @@ -0,0 +1,150 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.model.v20140526; + +import com.aliyuncs.RpcAcsRequest; +import java.util.List; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.ecs.Endpoint; + +/** + * @author auto create + * @version + */ +public class CreateSavingsPlanRequest extends RpcAcsRequest { + + + private String period; + + private List resourceIds; + + private String instanceTypeFamily; + + private String planType; + + private String periodUnit; + + private String offeringType; + + private String chargeType; + + private String committedAmount; + public CreateSavingsPlanRequest() { + super("Ecs", "2014-05-26", "CreateSavingsPlan", "ecs"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getPeriod() { + return this.period; + } + + public void setPeriod(String period) { + this.period = period; + if(period != null){ + putQueryParameter("Period", period); + } + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + if (resourceIds != null) { + for (int i = 0; i < resourceIds.size(); i++) { + putQueryParameter("ResourceId." + (i + 1) , resourceIds.get(i)); + } + } + } + + public String getInstanceTypeFamily() { + return this.instanceTypeFamily; + } + + public void setInstanceTypeFamily(String instanceTypeFamily) { + this.instanceTypeFamily = instanceTypeFamily; + if(instanceTypeFamily != null){ + putQueryParameter("InstanceTypeFamily", instanceTypeFamily); + } + } + + public String getPlanType() { + return this.planType; + } + + public void setPlanType(String planType) { + this.planType = planType; + if(planType != null){ + putQueryParameter("PlanType", planType); + } + } + + public String getPeriodUnit() { + return this.periodUnit; + } + + public void setPeriodUnit(String periodUnit) { + this.periodUnit = periodUnit; + if(periodUnit != null){ + putQueryParameter("PeriodUnit", periodUnit); + } + } + + public String getOfferingType() { + return this.offeringType; + } + + public void setOfferingType(String offeringType) { + this.offeringType = offeringType; + if(offeringType != null){ + putQueryParameter("OfferingType", offeringType); + } + } + + public String getChargeType() { + return this.chargeType; + } + + public void setChargeType(String chargeType) { + this.chargeType = chargeType; + if(chargeType != null){ + putQueryParameter("ChargeType", chargeType); + } + } + + public String getCommittedAmount() { + return this.committedAmount; + } + + public void setCommittedAmount(String committedAmount) { + this.committedAmount = committedAmount; + if(committedAmount != null){ + putQueryParameter("CommittedAmount", committedAmount); + } + } + + @Override + public Class getResponseClass() { + return CreateSavingsPlanResponse.class; + } + +} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanResponse.java similarity index 55% rename from aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotResponse.java rename to aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanResponse.java index 8b4be2845d..9fb354c514 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotResponse.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/CreateSavingsPlanResponse.java @@ -15,20 +15,20 @@ package com.aliyuncs.ecs.model.v20140526; import com.aliyuncs.AcsResponse; -import com.aliyuncs.ecs.transform.v20140526.ImportSnapshotResponseUnmarshaller; +import com.aliyuncs.ecs.transform.v20140526.CreateSavingsPlanResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ -public class ImportSnapshotResponse extends AcsResponse { +public class CreateSavingsPlanResponse extends AcsResponse { private String requestId; - private String taskId; + private String savingsPlanId; - private String snapshotId; + private String orderId; public String getRequestId() { return this.requestId; @@ -38,24 +38,29 @@ public void setRequestId(String requestId) { this.requestId = requestId; } - public String getTaskId() { - return this.taskId; + public String getSavingsPlanId() { + return this.savingsPlanId; } - public void setTaskId(String taskId) { - this.taskId = taskId; + public void setSavingsPlanId(String savingsPlanId) { + this.savingsPlanId = savingsPlanId; } - public String getSnapshotId() { - return this.snapshotId; + public String getOrderId() { + return this.orderId; } - public void setSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; + public void setOrderId(String orderId) { + this.orderId = orderId; } @Override - public ImportSnapshotResponse getInstance(UnmarshallerContext context) { - return ImportSnapshotResponseUnmarshaller.unmarshall(this, context); + public CreateSavingsPlanResponse getInstance(UnmarshallerContext context) { + return CreateSavingsPlanResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; } } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DeleteLaunchTemplateResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DeleteLaunchTemplateResponse.java index 969a7b18f0..9a49d004a6 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DeleteLaunchTemplateResponse.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DeleteLaunchTemplateResponse.java @@ -13,7 +13,8 @@ */ package com.aliyuncs.ecs.model.v20140526; - + +import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.ecs.transform.v20140526.DeleteLaunchTemplateResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; @@ -28,6 +29,8 @@ public class DeleteLaunchTemplateResponse extends AcsResponse { private String launchTemplateId; + private List launchTemplateVersionNumbers; + public String getRequestId() { return this.requestId; } @@ -44,6 +47,14 @@ public void setLaunchTemplateId(String launchTemplateId) { this.launchTemplateId = launchTemplateId; } + public List getLaunchTemplateVersionNumbers() { + return this.launchTemplateVersionNumbers; + } + + public void setLaunchTemplateVersionNumbers(List launchTemplateVersionNumbers) { + this.launchTemplateVersionNumbers = launchTemplateVersionNumbers; + } + @Override public DeleteLaunchTemplateResponse getInstance(UnmarshallerContext context) { return DeleteLaunchTemplateResponseUnmarshaller.unmarshall(this, context); diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsRequest.java index 7f15b053af..90b7af443f 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsRequest.java @@ -30,6 +30,8 @@ public class DescribeActivationsRequest extends RpcAcsRequest tags; @@ -74,6 +76,17 @@ public void setPageNumber(Long pageNumber) { } } + public String getResourceGroupId() { + return this.resourceGroupId; + } + + public void setResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + if(resourceGroupId != null){ + putQueryParameter("ResourceGroupId", resourceGroupId); + } + } + public Long getPageSize() { return this.pageSize; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsResponse.java index 47929b03fd..ef02562382 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsResponse.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeActivationsResponse.java @@ -97,6 +97,8 @@ public static class Activation { private String activationId; + private String resourceGroupId; + private List tags; public String getCreationTime() { @@ -179,6 +181,14 @@ public void setActivationId(String activationId) { this.activationId = activationId; } + public String getResourceGroupId() { + return this.resourceGroupId; + } + + public void setResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + } + public List getTags() { return this.tags; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeCommandsRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeCommandsRequest.java index b06a59a1d3..e080a27113 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeCommandsRequest.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeCommandsRequest.java @@ -36,6 +36,8 @@ public class DescribeCommandsRequest extends RpcAcsRequest parameterDefinitions; private List tags; @@ -223,6 +225,14 @@ public void setEnableParameter(Boolean enableParameter) { this.enableParameter = enableParameter; } + public String getResourceGroupId() { + return this.resourceGroupId; + } + + public void setResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + } + public List getParameterDefinitions() { return this.parameterDefinitions; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeLaunchTemplateVersionsResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeLaunchTemplateVersionsResponse.java index 8b95624664..8502bb1d84 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeLaunchTemplateVersionsResponse.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeLaunchTemplateVersionsResponse.java @@ -255,6 +255,8 @@ public static class LaunchTemplateData { private Boolean deletionProtection; + private String creditSpecification; + private List dataDisks; private List networkInterfaces; @@ -607,6 +609,14 @@ public void setDeletionProtection(Boolean deletionProtection) { this.deletionProtection = deletionProtection; } + public String getCreditSpecification() { + return this.creditSpecification; + } + + public void setCreditSpecification(String creditSpecification) { + this.creditSpecification = creditSpecification; + } + public List getDataDisks() { return this.dataDisks; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationRequest.java new file mode 100644 index 0000000000..f2b3898d5a --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationRequest.java @@ -0,0 +1,108 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.model.v20140526; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.ecs.Endpoint; + +/** + * @author auto create + * @version + */ +public class DescribeSavingsPlanEstimationRequest extends RpcAcsRequest { + + + private String resourceId; + + private String period; + + private String planType; + + private String periodUnit; + + private String offeringType; + public DescribeSavingsPlanEstimationRequest() { + super("Ecs", "2014-05-26", "DescribeSavingsPlanEstimation", "ecs"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getResourceId() { + return this.resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + if(resourceId != null){ + putQueryParameter("ResourceId", resourceId); + } + } + + public String getPeriod() { + return this.period; + } + + public void setPeriod(String period) { + this.period = period; + if(period != null){ + putQueryParameter("Period", period); + } + } + + public String getPlanType() { + return this.planType; + } + + public void setPlanType(String planType) { + this.planType = planType; + if(planType != null){ + putQueryParameter("PlanType", planType); + } + } + + public String getPeriodUnit() { + return this.periodUnit; + } + + public void setPeriodUnit(String periodUnit) { + this.periodUnit = periodUnit; + if(periodUnit != null){ + putQueryParameter("PeriodUnit", periodUnit); + } + } + + public String getOfferingType() { + return this.offeringType; + } + + public void setOfferingType(String offeringType) { + this.offeringType = offeringType; + if(offeringType != null){ + putQueryParameter("OfferingType", offeringType); + } + } + + @Override + public Class getResponseClass() { + return DescribeSavingsPlanEstimationResponse.class; + } + +} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationResponse.java new file mode 100644 index 0000000000..565164248b --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanEstimationResponse.java @@ -0,0 +1,126 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.model.v20140526; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.ecs.transform.v20140526.DescribeSavingsPlanEstimationResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class DescribeSavingsPlanEstimationResponse extends AcsResponse { + + private String requestId; + + private String resourceId; + + private String instanceTypeFamily; + + private String committedAmount; + + private String currency; + + private String offeringType; + + private String periodUnit; + + private Integer period; + + private String planType; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getResourceId() { + return this.resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getInstanceTypeFamily() { + return this.instanceTypeFamily; + } + + public void setInstanceTypeFamily(String instanceTypeFamily) { + this.instanceTypeFamily = instanceTypeFamily; + } + + public String getCommittedAmount() { + return this.committedAmount; + } + + public void setCommittedAmount(String committedAmount) { + this.committedAmount = committedAmount; + } + + public String getCurrency() { + return this.currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getOfferingType() { + return this.offeringType; + } + + public void setOfferingType(String offeringType) { + this.offeringType = offeringType; + } + + public String getPeriodUnit() { + return this.periodUnit; + } + + public void setPeriodUnit(String periodUnit) { + this.periodUnit = periodUnit; + } + + public Integer getPeriod() { + return this.period; + } + + public void setPeriod(Integer period) { + this.period = period; + } + + public String getPlanType() { + return this.planType; + } + + public void setPlanType(String planType) { + this.planType = planType; + } + + @Override + public DescribeSavingsPlanEstimationResponse getInstance(UnmarshallerContext context) { + return DescribeSavingsPlanEstimationResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceRequest.java new file mode 100644 index 0000000000..90c8125660 --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceRequest.java @@ -0,0 +1,137 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.model.v20140526; + +import com.aliyuncs.RpcAcsRequest; +import java.util.List; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.ecs.Endpoint; + +/** + * @author auto create + * @version + */ +public class DescribeSavingsPlanPriceRequest extends RpcAcsRequest { + + + private Integer period; + + private List resourceIds; + + private String instanceTypeFamily; + + private String planType; + + private String periodUnit; + + private String offeringType; + + private String committedAmount; + public DescribeSavingsPlanPriceRequest() { + super("Ecs", "2014-05-26", "DescribeSavingsPlanPrice", "ecs"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public Integer getPeriod() { + return this.period; + } + + public void setPeriod(Integer period) { + this.period = period; + if(period != null){ + putQueryParameter("Period", period.toString()); + } + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + if (resourceIds != null) { + for (int i = 0; i < resourceIds.size(); i++) { + putQueryParameter("ResourceId." + (i + 1) , resourceIds.get(i)); + } + } + } + + public String getInstanceTypeFamily() { + return this.instanceTypeFamily; + } + + public void setInstanceTypeFamily(String instanceTypeFamily) { + this.instanceTypeFamily = instanceTypeFamily; + if(instanceTypeFamily != null){ + putQueryParameter("InstanceTypeFamily", instanceTypeFamily); + } + } + + public String getPlanType() { + return this.planType; + } + + public void setPlanType(String planType) { + this.planType = planType; + if(planType != null){ + putQueryParameter("PlanType", planType); + } + } + + public String getPeriodUnit() { + return this.periodUnit; + } + + public void setPeriodUnit(String periodUnit) { + this.periodUnit = periodUnit; + if(periodUnit != null){ + putQueryParameter("PeriodUnit", periodUnit); + } + } + + public String getOfferingType() { + return this.offeringType; + } + + public void setOfferingType(String offeringType) { + this.offeringType = offeringType; + if(offeringType != null){ + putQueryParameter("OfferingType", offeringType); + } + } + + public String getCommittedAmount() { + return this.committedAmount; + } + + public void setCommittedAmount(String committedAmount) { + this.committedAmount = committedAmount; + if(committedAmount != null){ + putQueryParameter("CommittedAmount", committedAmount); + } + } + + @Override + public Class getResponseClass() { + return DescribeSavingsPlanPriceResponse.class; + } + +} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceResponse.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceResponse.java new file mode 100644 index 0000000000..9575bddc19 --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeSavingsPlanPriceResponse.java @@ -0,0 +1,146 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.model.v20140526; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.ecs.transform.v20140526.DescribeSavingsPlanPriceResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class DescribeSavingsPlanPriceResponse extends AcsResponse { + + private String requestId; + + private PriceInfo priceInfo; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public PriceInfo getPriceInfo() { + return this.priceInfo; + } + + public void setPriceInfo(PriceInfo priceInfo) { + this.priceInfo = priceInfo; + } + + public static class PriceInfo { + + private List rules; + + private Price price; + + public List getRules() { + return this.rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + public Price getPrice() { + return this.price; + } + + public void setPrice(Price price) { + this.price = price; + } + + public static class RulesItem { + + private String ruleId; + + private String description; + + public String getRuleId() { + return this.ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + } + + public static class Price { + + private Float originalPrice; + + private Float discountPrice; + + private Float tradePrice; + + private String currency; + + public Float getOriginalPrice() { + return this.originalPrice; + } + + public void setOriginalPrice(Float originalPrice) { + this.originalPrice = originalPrice; + } + + public Float getDiscountPrice() { + return this.discountPrice; + } + + public void setDiscountPrice(Float discountPrice) { + this.discountPrice = discountPrice; + } + + public Float getTradePrice() { + return this.tradePrice; + } + + public void setTradePrice(Float tradePrice) { + this.tradePrice = tradePrice; + } + + public String getCurrency() { + return this.currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + } + } + + @Override + public DescribeSavingsPlanPriceResponse getInstance(UnmarshallerContext context) { + return DescribeSavingsPlanPriceResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotRequest.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotRequest.java deleted file mode 100644 index 558d7e6ce0..0000000000 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/ImportSnapshotRequest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. - */ - -package com.aliyuncs.ecs.model.v20140526; - -import com.aliyuncs.RpcAcsRequest; -import com.aliyuncs.http.MethodType; -import com.aliyuncs.ecs.Endpoint; - -/** - * @author auto create - * @version - */ -public class ImportSnapshotRequest extends RpcAcsRequest { - - - private Long resourceOwnerId; - - private String snapshotName; - - private String ossObject; - - private String ossBucket; - - private String resourceOwnerAccount; - - private String roleName; - - private Long ownerId; - public ImportSnapshotRequest() { - super("Ecs", "2014-05-26", "ImportSnapshot", "ecs"); - setMethod(MethodType.POST); - try { - com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); - com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); - } catch (Exception e) {} - } - - public Long getResourceOwnerId() { - return this.resourceOwnerId; - } - - public void setResourceOwnerId(Long resourceOwnerId) { - this.resourceOwnerId = resourceOwnerId; - if(resourceOwnerId != null){ - putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); - } - } - - public String getSnapshotName() { - return this.snapshotName; - } - - public void setSnapshotName(String snapshotName) { - this.snapshotName = snapshotName; - if(snapshotName != null){ - putQueryParameter("SnapshotName", snapshotName); - } - } - - public String getOssObject() { - return this.ossObject; - } - - public void setOssObject(String ossObject) { - this.ossObject = ossObject; - if(ossObject != null){ - putQueryParameter("OssObject", ossObject); - } - } - - public String getOssBucket() { - return this.ossBucket; - } - - public void setOssBucket(String ossBucket) { - this.ossBucket = ossBucket; - if(ossBucket != null){ - putQueryParameter("OssBucket", ossBucket); - } - } - - public String getResourceOwnerAccount() { - return this.resourceOwnerAccount; - } - - public void setResourceOwnerAccount(String resourceOwnerAccount) { - this.resourceOwnerAccount = resourceOwnerAccount; - if(resourceOwnerAccount != null){ - putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); - } - } - - public String getRoleName() { - return this.roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - if(roleName != null){ - putQueryParameter("RoleName", roleName); - } - } - - public Long getOwnerId() { - return this.ownerId; - } - - public void setOwnerId(Long ownerId) { - this.ownerId = ownerId; - if(ownerId != null){ - putQueryParameter("OwnerId", ownerId.toString()); - } - } - - @Override - public Class getResponseClass() { - return ImportSnapshotResponse.class; - } - -} diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/ImportSnapshotResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/CreateSavingsPlanResponseUnmarshaller.java similarity index 52% rename from aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/ImportSnapshotResponseUnmarshaller.java rename to aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/CreateSavingsPlanResponseUnmarshaller.java index 6d9431c20b..94bf3c6573 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/ImportSnapshotResponseUnmarshaller.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/CreateSavingsPlanResponseUnmarshaller.java @@ -14,18 +14,18 @@ package com.aliyuncs.ecs.transform.v20140526; -import com.aliyuncs.ecs.model.v20140526.ImportSnapshotResponse; +import com.aliyuncs.ecs.model.v20140526.CreateSavingsPlanResponse; import com.aliyuncs.transform.UnmarshallerContext; -public class ImportSnapshotResponseUnmarshaller { +public class CreateSavingsPlanResponseUnmarshaller { - public static ImportSnapshotResponse unmarshall(ImportSnapshotResponse importSnapshotResponse, UnmarshallerContext _ctx) { + public static CreateSavingsPlanResponse unmarshall(CreateSavingsPlanResponse createSavingsPlanResponse, UnmarshallerContext _ctx) { - importSnapshotResponse.setRequestId(_ctx.stringValue("ImportSnapshotResponse.RequestId")); - importSnapshotResponse.setTaskId(_ctx.stringValue("ImportSnapshotResponse.TaskId")); - importSnapshotResponse.setSnapshotId(_ctx.stringValue("ImportSnapshotResponse.SnapshotId")); + createSavingsPlanResponse.setRequestId(_ctx.stringValue("CreateSavingsPlanResponse.RequestId")); + createSavingsPlanResponse.setSavingsPlanId(_ctx.stringValue("CreateSavingsPlanResponse.SavingsPlanId")); + createSavingsPlanResponse.setOrderId(_ctx.stringValue("CreateSavingsPlanResponse.OrderId")); - return importSnapshotResponse; + return createSavingsPlanResponse; } } \ No newline at end of file diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DeleteLaunchTemplateResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DeleteLaunchTemplateResponseUnmarshaller.java index 0003528f1b..48e1da77b5 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DeleteLaunchTemplateResponseUnmarshaller.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DeleteLaunchTemplateResponseUnmarshaller.java @@ -14,6 +14,9 @@ package com.aliyuncs.ecs.transform.v20140526; +import java.util.ArrayList; +import java.util.List; + import com.aliyuncs.ecs.model.v20140526.DeleteLaunchTemplateResponse; import com.aliyuncs.transform.UnmarshallerContext; @@ -23,7 +26,13 @@ public class DeleteLaunchTemplateResponseUnmarshaller { public static DeleteLaunchTemplateResponse unmarshall(DeleteLaunchTemplateResponse deleteLaunchTemplateResponse, UnmarshallerContext _ctx) { deleteLaunchTemplateResponse.setRequestId(_ctx.stringValue("DeleteLaunchTemplateResponse.RequestId")); - deleteLaunchTemplateResponse.setLaunchTemplateId(_ctx.stringValue("DeleteLaunchTemplateResponse.LaunchTemplateId")); + deleteLaunchTemplateResponse.setLaunchTemplateId(_ctx.stringValue("DeleteLaunchTemplateResponse.LaunchTemplateId")); + + List launchTemplateVersionNumbers = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("DeleteLaunchTemplateResponse.LaunchTemplateVersionNumbers.Length"); i++) { + launchTemplateVersionNumbers.add(_ctx.longValue("DeleteLaunchTemplateResponse.LaunchTemplateVersionNumbers["+ i +"]")); + } + deleteLaunchTemplateResponse.setLaunchTemplateVersionNumbers(launchTemplateVersionNumbers); return deleteLaunchTemplateResponse; } diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeActivationsResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeActivationsResponseUnmarshaller.java index cfd00842cc..3fae492f7e 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeActivationsResponseUnmarshaller.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeActivationsResponseUnmarshaller.java @@ -45,6 +45,7 @@ public static DescribeActivationsResponse unmarshall(DescribeActivationsResponse activation.setIpAddressRange(_ctx.stringValue("DescribeActivationsResponse.ActivationList["+ i +"].IpAddressRange")); activation.setTimeToLiveInHours(_ctx.longValue("DescribeActivationsResponse.ActivationList["+ i +"].TimeToLiveInHours")); activation.setActivationId(_ctx.stringValue("DescribeActivationsResponse.ActivationList["+ i +"].ActivationId")); + activation.setResourceGroupId(_ctx.stringValue("DescribeActivationsResponse.ActivationList["+ i +"].ResourceGroupId")); List tags = new ArrayList(); for (int j = 0; j < _ctx.lengthValue("DescribeActivationsResponse.ActivationList["+ i +"].Tags.Length"); j++) { diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeCommandsResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeCommandsResponseUnmarshaller.java index 6ea0a5b061..0cfb5e99aa 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeCommandsResponseUnmarshaller.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeCommandsResponseUnmarshaller.java @@ -50,6 +50,7 @@ public static DescribeCommandsResponse unmarshall(DescribeCommandsResponse descr command.setLatest(_ctx.booleanValue("DescribeCommandsResponse.Commands["+ i +"].Latest")); command.setName(_ctx.stringValue("DescribeCommandsResponse.Commands["+ i +"].Name")); command.setEnableParameter(_ctx.booleanValue("DescribeCommandsResponse.Commands["+ i +"].EnableParameter")); + command.setResourceGroupId(_ctx.stringValue("DescribeCommandsResponse.Commands["+ i +"].ResourceGroupId")); List parameterNames = new ArrayList(); for (int j = 0; j < _ctx.lengthValue("DescribeCommandsResponse.Commands["+ i +"].ParameterNames.Length"); j++) { diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeLaunchTemplateVersionsResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeLaunchTemplateVersionsResponseUnmarshaller.java index 3f21c08f89..e794a5e299 100644 --- a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeLaunchTemplateVersionsResponseUnmarshaller.java +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeLaunchTemplateVersionsResponseUnmarshaller.java @@ -91,6 +91,7 @@ public static DescribeLaunchTemplateVersionsResponse unmarshall(DescribeLaunchTe launchTemplateData.setSystemDiskBurstingEnabled(_ctx.booleanValue("DescribeLaunchTemplateVersionsResponse.LaunchTemplateVersionSets["+ i +"].LaunchTemplateData.SystemDisk.BurstingEnabled")); launchTemplateData.setSystemDiskEncrypted(_ctx.stringValue("DescribeLaunchTemplateVersionsResponse.LaunchTemplateVersionSets["+ i +"].LaunchTemplateData.SystemDisk.Encrypted")); launchTemplateData.setDeletionProtection(_ctx.booleanValue("DescribeLaunchTemplateVersionsResponse.LaunchTemplateVersionSets["+ i +"].LaunchTemplateData.DeletionProtection")); + launchTemplateData.setCreditSpecification(_ctx.stringValue("DescribeLaunchTemplateVersionsResponse.LaunchTemplateVersionSets["+ i +"].LaunchTemplateData.CreditSpecification")); List securityGroupIds = new ArrayList(); for (int j = 0; j < _ctx.lengthValue("DescribeLaunchTemplateVersionsResponse.LaunchTemplateVersionSets["+ i +"].LaunchTemplateData.SecurityGroupIds.Length"); j++) { diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanEstimationResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanEstimationResponseUnmarshaller.java new file mode 100644 index 0000000000..349d190d45 --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanEstimationResponseUnmarshaller.java @@ -0,0 +1,37 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.transform.v20140526; + +import com.aliyuncs.ecs.model.v20140526.DescribeSavingsPlanEstimationResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class DescribeSavingsPlanEstimationResponseUnmarshaller { + + public static DescribeSavingsPlanEstimationResponse unmarshall(DescribeSavingsPlanEstimationResponse describeSavingsPlanEstimationResponse, UnmarshallerContext _ctx) { + + describeSavingsPlanEstimationResponse.setRequestId(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.RequestId")); + describeSavingsPlanEstimationResponse.setResourceId(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.ResourceId")); + describeSavingsPlanEstimationResponse.setInstanceTypeFamily(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.InstanceTypeFamily")); + describeSavingsPlanEstimationResponse.setCommittedAmount(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.CommittedAmount")); + describeSavingsPlanEstimationResponse.setCurrency(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.Currency")); + describeSavingsPlanEstimationResponse.setOfferingType(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.OfferingType")); + describeSavingsPlanEstimationResponse.setPeriodUnit(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.PeriodUnit")); + describeSavingsPlanEstimationResponse.setPeriod(_ctx.integerValue("DescribeSavingsPlanEstimationResponse.Period")); + describeSavingsPlanEstimationResponse.setPlanType(_ctx.stringValue("DescribeSavingsPlanEstimationResponse.PlanType")); + + return describeSavingsPlanEstimationResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanPriceResponseUnmarshaller.java b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanPriceResponseUnmarshaller.java new file mode 100644 index 0000000000..bd8e21bcbb --- /dev/null +++ b/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/transform/v20140526/DescribeSavingsPlanPriceResponseUnmarshaller.java @@ -0,0 +1,55 @@ +/* + * 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. + */ + +package com.aliyuncs.ecs.transform.v20140526; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.ecs.model.v20140526.DescribeSavingsPlanPriceResponse; +import com.aliyuncs.ecs.model.v20140526.DescribeSavingsPlanPriceResponse.PriceInfo; +import com.aliyuncs.ecs.model.v20140526.DescribeSavingsPlanPriceResponse.PriceInfo.Price; +import com.aliyuncs.ecs.model.v20140526.DescribeSavingsPlanPriceResponse.PriceInfo.RulesItem; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class DescribeSavingsPlanPriceResponseUnmarshaller { + + public static DescribeSavingsPlanPriceResponse unmarshall(DescribeSavingsPlanPriceResponse describeSavingsPlanPriceResponse, UnmarshallerContext _ctx) { + + describeSavingsPlanPriceResponse.setRequestId(_ctx.stringValue("DescribeSavingsPlanPriceResponse.RequestId")); + + PriceInfo priceInfo = new PriceInfo(); + + Price price = new Price(); + price.setOriginalPrice(_ctx.floatValue("DescribeSavingsPlanPriceResponse.PriceInfo.Price.OriginalPrice")); + price.setDiscountPrice(_ctx.floatValue("DescribeSavingsPlanPriceResponse.PriceInfo.Price.DiscountPrice")); + price.setTradePrice(_ctx.floatValue("DescribeSavingsPlanPriceResponse.PriceInfo.Price.TradePrice")); + price.setCurrency(_ctx.stringValue("DescribeSavingsPlanPriceResponse.PriceInfo.Price.Currency")); + priceInfo.setPrice(price); + + List rules = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("DescribeSavingsPlanPriceResponse.PriceInfo.Rules.Length"); i++) { + RulesItem rulesItem = new RulesItem(); + rulesItem.setRuleId(_ctx.stringValue("DescribeSavingsPlanPriceResponse.PriceInfo.Rules["+ i +"].RuleId")); + rulesItem.setDescription(_ctx.stringValue("DescribeSavingsPlanPriceResponse.PriceInfo.Rules["+ i +"].Description")); + + rules.add(rulesItem); + } + priceInfo.setRules(rules); + describeSavingsPlanPriceResponse.setPriceInfo(priceInfo); + + return describeSavingsPlanPriceResponse; + } +} \ No newline at end of file