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

com.aliyuncs.cspro.transform.v20180315.QuerySecCheckConfigsResponseUnmarshaller 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

There is a newer version: 1.3.2
Show 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.cspro.transform.v20180315;

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

import com.aliyuncs.cspro.model.v20180315.QuerySecCheckConfigsResponse;
import com.aliyuncs.cspro.model.v20180315.QuerySecCheckConfigsResponse.Data;
import com.aliyuncs.cspro.model.v20180315.QuerySecCheckConfigsResponse.Data.OmniSecCheckDTO;
import com.aliyuncs.cspro.model.v20180315.QuerySecCheckConfigsResponse.Data.OmniSecCheckDTO.OmniSecCheckDetailDTO;
import com.aliyuncs.cspro.model.v20180315.QuerySecCheckConfigsResponse.Data.PageInfo;
import com.aliyuncs.transform.UnmarshallerContext;


public class QuerySecCheckConfigsResponseUnmarshaller {

	public static QuerySecCheckConfigsResponse unmarshall(QuerySecCheckConfigsResponse querySecCheckConfigsResponse, UnmarshallerContext context) {
		
		querySecCheckConfigsResponse.setRequestId(context.stringValue("QuerySecCheckConfigsResponse.RequestId"));
		querySecCheckConfigsResponse.setSuccess(context.booleanValue("QuerySecCheckConfigsResponse.Success"));
		querySecCheckConfigsResponse.setCode(context.stringValue("QuerySecCheckConfigsResponse.Code"));
		querySecCheckConfigsResponse.setMessage(context.stringValue("QuerySecCheckConfigsResponse.Message"));

		Data data = new Data();

		PageInfo pageInfo = new PageInfo();
		pageInfo.setCurrentPage(context.integerValue("QuerySecCheckConfigsResponse.Data.PageInfo.CurrentPage"));
		pageInfo.setPageSize(context.integerValue("QuerySecCheckConfigsResponse.Data.PageInfo.PageSize"));
		pageInfo.setTotal(context.integerValue("QuerySecCheckConfigsResponse.Data.PageInfo.Total"));
		data.setPageInfo(pageInfo);

		List list = new ArrayList();
		for (int i = 0; i < context.lengthValue("QuerySecCheckConfigsResponse.Data.List.Length"); i++) {
			OmniSecCheckDTO omniSecCheckDTO = new OmniSecCheckDTO();
			omniSecCheckDTO.setName(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].Name"));
			omniSecCheckDTO.setConfType(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].ConfType"));
			omniSecCheckDTO.setCheckTarget(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckTarget"));
			omniSecCheckDTO.setExtras(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].Extras"));
			omniSecCheckDTO.setValid(context.booleanValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].Valid"));
			omniSecCheckDTO.setAccessible(context.booleanValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].Accessible"));
			omniSecCheckDTO.setId(context.longValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].Id"));

			List checkDetailDTOList = new ArrayList();
			for (int j = 0; j < context.lengthValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckDetailDTOList.Length"); j++) {
				OmniSecCheckDetailDTO omniSecCheckDetailDTO = new OmniSecCheckDetailDTO();
				omniSecCheckDetailDTO.setCheckType(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckDetailDTOList["+ j +"].CheckType"));
				omniSecCheckDetailDTO.setCheckIntervalUnit(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckDetailDTOList["+ j +"].CheckIntervalUnit"));
				omniSecCheckDetailDTO.setCheckIntervalVal(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckDetailDTOList["+ j +"].CheckIntervalVal"));
				omniSecCheckDetailDTO.setCheckExtras(context.stringValue("QuerySecCheckConfigsResponse.Data.List["+ i +"].CheckDetailDTOList["+ j +"].CheckExtras"));

				checkDetailDTOList.add(omniSecCheckDetailDTO);
			}
			omniSecCheckDTO.setCheckDetailDTOList(checkDetailDTOList);

			list.add(omniSecCheckDTO);
		}
		data.setList(list);
		querySecCheckConfigsResponse.setData(data);
	 
	 	return querySecCheckConfigsResponse;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy