com.aliyuncs.sae.transform.v20190506.DescribeInstanceSpecificationsResponseUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-sae Show documentation
Show all versions of aliyun-java-sdk-sae Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
The newest version!
/*
* 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.sae.transform.v20190506;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sae.model.v20190506.DescribeInstanceSpecificationsResponse;
import com.aliyuncs.sae.model.v20190506.DescribeInstanceSpecificationsResponse.DataItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribeInstanceSpecificationsResponseUnmarshaller {
public static DescribeInstanceSpecificationsResponse unmarshall(DescribeInstanceSpecificationsResponse describeInstanceSpecificationsResponse, UnmarshallerContext _ctx) {
describeInstanceSpecificationsResponse.setRequestId(_ctx.stringValue("DescribeInstanceSpecificationsResponse.RequestId"));
describeInstanceSpecificationsResponse.setMessage(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Message"));
describeInstanceSpecificationsResponse.setTraceId(_ctx.stringValue("DescribeInstanceSpecificationsResponse.TraceId"));
describeInstanceSpecificationsResponse.setErrorCode(_ctx.stringValue("DescribeInstanceSpecificationsResponse.ErrorCode"));
describeInstanceSpecificationsResponse.setCode(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Code"));
describeInstanceSpecificationsResponse.setSuccess(_ctx.booleanValue("DescribeInstanceSpecificationsResponse.Success"));
List data = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("DescribeInstanceSpecificationsResponse.Data.Length"); i++) {
DataItem dataItem = new DataItem();
dataItem.setCpu(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].Cpu"));
dataItem.setVersion(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].Version"));
dataItem.setMemory(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].Memory"));
dataItem.setSpecInfo(_ctx.stringValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].SpecInfo"));
dataItem.setId(_ctx.integerValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].Id"));
dataItem.setEnable(_ctx.booleanValue("DescribeInstanceSpecificationsResponse.Data["+ i +"].Enable"));
data.add(dataItem);
}
describeInstanceSpecificationsResponse.setData(data);
return describeInstanceSpecificationsResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy