/*
 * 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.linkwan.transform.v20190301;

import com.aliyuncs.linkwan.model.v20190301.GetNodeTupleOrderResponse;
import com.aliyuncs.linkwan.model.v20190301.GetNodeTupleOrderResponse.Data;
import com.aliyuncs.transform.UnmarshallerContext;


public class GetNodeTupleOrderResponseUnmarshaller {

	public static GetNodeTupleOrderResponse unmarshall(GetNodeTupleOrderResponse getNodeTupleOrderResponse, UnmarshallerContext _ctx) {
		
		getNodeTupleOrderResponse.setRequestId(_ctx.stringValue("GetNodeTupleOrderResponse.RequestId"));
		getNodeTupleOrderResponse.setSuccess(_ctx.booleanValue("GetNodeTupleOrderResponse.Success"));

		Data data = new Data();
		data.setOrderId(_ctx.stringValue("GetNodeTupleOrderResponse.Data.OrderId"));
		data.setIsKpm(_ctx.booleanValue("GetNodeTupleOrderResponse.Data.IsKpm"));
		data.setOrderState(_ctx.stringValue("GetNodeTupleOrderResponse.Data.OrderState"));
		data.setRequiredCount(_ctx.longValue("GetNodeTupleOrderResponse.Data.RequiredCount"));
		data.setCreatedMillis(_ctx.longValue("GetNodeTupleOrderResponse.Data.CreatedMillis"));
		data.setAcceptedMillis(_ctx.longValue("GetNodeTupleOrderResponse.Data.AcceptedMillis"));
		getNodeTupleOrderResponse.setData(data);
	 
	 	return getNodeTupleOrderResponse;
	}
}