All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyuncs.sae.transform.v20190506.DescribeApplicationInstancesResponseUnmarshaller Maven / Gradle / Ivy

Go to download

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.DescribeApplicationInstancesResponse;
import com.aliyuncs.sae.model.v20190506.DescribeApplicationInstancesResponse.Data;
import com.aliyuncs.sae.model.v20190506.DescribeApplicationInstancesResponse.Data.Instance;
import com.aliyuncs.transform.UnmarshallerContext;


public class DescribeApplicationInstancesResponseUnmarshaller {

	public static DescribeApplicationInstancesResponse unmarshall(DescribeApplicationInstancesResponse describeApplicationInstancesResponse, UnmarshallerContext _ctx) {
		
		describeApplicationInstancesResponse.setRequestId(_ctx.stringValue("DescribeApplicationInstancesResponse.RequestId"));
		describeApplicationInstancesResponse.setMessage(_ctx.stringValue("DescribeApplicationInstancesResponse.Message"));
		describeApplicationInstancesResponse.setTraceId(_ctx.stringValue("DescribeApplicationInstancesResponse.TraceId"));
		describeApplicationInstancesResponse.setErrorCode(_ctx.stringValue("DescribeApplicationInstancesResponse.ErrorCode"));
		describeApplicationInstancesResponse.setCode(_ctx.stringValue("DescribeApplicationInstancesResponse.Code"));
		describeApplicationInstancesResponse.setSuccess(_ctx.booleanValue("DescribeApplicationInstancesResponse.Success"));

		Data data = new Data();
		data.setCurrentPage(_ctx.integerValue("DescribeApplicationInstancesResponse.Data.CurrentPage"));
		data.setTotalSize(_ctx.integerValue("DescribeApplicationInstancesResponse.Data.TotalSize"));
		data.setPageSize(_ctx.integerValue("DescribeApplicationInstancesResponse.Data.PageSize"));

		List instances = new ArrayList();
		for (int i = 0; i < _ctx.lengthValue("DescribeApplicationInstancesResponse.Data.Instances.Length"); i++) {
			Instance instance = new Instance();
			instance.setCreateTimeStamp(_ctx.longValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].CreateTimeStamp"));
			instance.setVSwitchId(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].VSwitchId"));
			instance.setInstanceContainerStatus(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].InstanceContainerStatus"));
			instance.setInstanceHealthStatus(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].InstanceHealthStatus"));
			instance.setInstanceContainerRestarts(_ctx.longValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].InstanceContainerRestarts"));
			instance.setGroupId(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].GroupId"));
			instance.setInstanceContainerIp(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].InstanceContainerIp"));
			instance.setInstanceId(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].InstanceId"));
			instance.setImageUrl(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].ImageUrl"));
			instance.setPackageVersion(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].PackageVersion"));
			instance.setEip(_ctx.stringValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].Eip"));
			instance.setFinishTimeStamp(_ctx.longValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].FinishTimeStamp"));
			instance.setDebugStatus(_ctx.booleanValue("DescribeApplicationInstancesResponse.Data.Instances["+ i +"].DebugStatus"));

			instances.add(instance);
		}
		data.setInstances(instances);
		describeApplicationInstancesResponse.setData(data);
	 
	 	return describeApplicationInstancesResponse;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy