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

com.aliyuncs.alb.transform.v20200616.ListHealthCheckTemplatesResponseUnmarshaller 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.alb.transform.v20200616;

import java.util.ArrayList;
import java.util.List;

import com.aliyuncs.alb.model.v20200616.ListHealthCheckTemplatesResponse;
import com.aliyuncs.alb.model.v20200616.ListHealthCheckTemplatesResponse.HealthCheckTemplate;
import com.aliyuncs.alb.model.v20200616.ListHealthCheckTemplatesResponse.HealthCheckTemplate.Tag;
import com.aliyuncs.transform.UnmarshallerContext;


public class ListHealthCheckTemplatesResponseUnmarshaller {

	public static ListHealthCheckTemplatesResponse unmarshall(ListHealthCheckTemplatesResponse listHealthCheckTemplatesResponse, UnmarshallerContext _ctx) {
		
		listHealthCheckTemplatesResponse.setRequestId(_ctx.stringValue("ListHealthCheckTemplatesResponse.RequestId"));
		listHealthCheckTemplatesResponse.setMaxResults(_ctx.integerValue("ListHealthCheckTemplatesResponse.MaxResults"));
		listHealthCheckTemplatesResponse.setNextToken(_ctx.stringValue("ListHealthCheckTemplatesResponse.NextToken"));
		listHealthCheckTemplatesResponse.setTotalCount(_ctx.integerValue("ListHealthCheckTemplatesResponse.TotalCount"));

		List healthCheckTemplates = new ArrayList();
		for (int i = 0; i < _ctx.lengthValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates.Length"); i++) {
			HealthCheckTemplate healthCheckTemplate = new HealthCheckTemplate();
			healthCheckTemplate.setHealthCheckConnectPort(_ctx.integerValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckConnectPort"));
			healthCheckTemplate.setHealthCheckHost(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckHost"));
			healthCheckTemplate.setHealthCheckHttpVersion(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckHttpVersion"));
			healthCheckTemplate.setHealthCheckInterval(_ctx.integerValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckInterval"));
			healthCheckTemplate.setHealthCheckMethod(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckMethod"));
			healthCheckTemplate.setHealthCheckPath(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckPath"));
			healthCheckTemplate.setHealthCheckProtocol(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckProtocol"));
			healthCheckTemplate.setHealthCheckTemplateId(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckTemplateId"));
			healthCheckTemplate.setHealthCheckTemplateName(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckTemplateName"));
			healthCheckTemplate.setHealthCheckTimeout(_ctx.integerValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckTimeout"));
			healthCheckTemplate.setHealthyThreshold(_ctx.integerValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthyThreshold"));
			healthCheckTemplate.setUnhealthyThreshold(_ctx.integerValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].UnhealthyThreshold"));
			healthCheckTemplate.setHealthCheckTcpFastCloseEnabled(_ctx.booleanValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckTcpFastCloseEnabled"));
			healthCheckTemplate.setServiceManagedEnabled(_ctx.booleanValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].ServiceManagedEnabled"));
			healthCheckTemplate.setServiceManagedMode(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].ServiceManagedMode"));

			List healthCheckHttpCodes = new ArrayList();
			for (int j = 0; j < _ctx.lengthValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckHttpCodes.Length"); j++) {
				healthCheckHttpCodes.add(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckHttpCodes["+ j +"]"));
			}
			healthCheckTemplate.setHealthCheckHttpCodes(healthCheckHttpCodes);

			List healthCheckCodes = new ArrayList();
			for (int j = 0; j < _ctx.lengthValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckCodes.Length"); j++) {
				healthCheckCodes.add(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].HealthCheckCodes["+ j +"]"));
			}
			healthCheckTemplate.setHealthCheckCodes(healthCheckCodes);

			List tags = new ArrayList();
			for (int j = 0; j < _ctx.lengthValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].Tags.Length"); j++) {
				Tag tag = new Tag();
				tag.setKey(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].Tags["+ j +"].Key"));
				tag.setValue(_ctx.stringValue("ListHealthCheckTemplatesResponse.HealthCheckTemplates["+ i +"].Tags["+ j +"].Value"));

				tags.add(tag);
			}
			healthCheckTemplate.setTags(tags);

			healthCheckTemplates.add(healthCheckTemplate);
		}
		listHealthCheckTemplatesResponse.setHealthCheckTemplates(healthCheckTemplates);
	 
	 	return listHealthCheckTemplatesResponse;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy