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

com.aliyuncs.drcloud.transform.v20170824.FindKnowledgeListResponseUnmarshaller 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.0.2
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.drcloud.transform.v20170824;

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

import com.aliyuncs.drcloud.model.v20170824.FindKnowledgeListResponse;
import com.aliyuncs.drcloud.model.v20170824.FindKnowledgeListResponse.Data;
import com.aliyuncs.drcloud.model.v20170824.FindKnowledgeListResponse.Data.Result;
import com.aliyuncs.transform.UnmarshallerContext;


public class FindKnowledgeListResponseUnmarshaller {

	public static FindKnowledgeListResponse unmarshall(FindKnowledgeListResponse findKnowledgeListResponse, UnmarshallerContext context) {
		

		Data data = new Data();
		data.setPageNo(context.integerValue("FindKnowledgeListResponse.Data.PageNo"));
		data.setPageSize(context.integerValue("FindKnowledgeListResponse.Data.PageSize"));
		data.setTotal(context.integerValue("FindKnowledgeListResponse.Data.Total"));

		List list = new ArrayList();
		for (int i = 0; i < context.lengthValue("FindKnowledgeListResponse.Data.List.Length"); i++) {
			Result result = new Result();
			result.setKnowledgeId(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].KnowledgeId"));
			result.setName(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].Name"));
			result.setAnswer(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].Answer"));
			result.setCategoryId(context.longValue("FindKnowledgeListResponse.Data.List["+ i +"].CategoryId"));
			result.setCategoryPath(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].CategoryPath"));
			result.setLink(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].Link"));
			result.setRank(context.integerValue("FindKnowledgeListResponse.Data.List["+ i +"].Rank"));
			result.setIsHotknowledge(context.booleanValue("FindKnowledgeListResponse.Data.List["+ i +"].IsHotknowledge"));
			result.setStartTime(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].StartTime"));
			result.setEndTime(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].EndTime"));
			result.setCreatorId(context.longValue("FindKnowledgeListResponse.Data.List["+ i +"].CreatorId"));
			result.setModifierId(context.longValue("FindKnowledgeListResponse.Data.List["+ i +"].ModifierId"));
			result.setGmtCreate(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].GmtCreate"));
			result.setGmtModified(context.stringValue("FindKnowledgeListResponse.Data.List["+ i +"].GmtModified"));

			list.add(result);
		}
		data.setList(list);
		findKnowledgeListResponse.setData(data);
	 
	 	return findKnowledgeListResponse;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy