Exemplo n.º 1
0
        public static ListInstanceResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListInstanceResponse listInstanceResponse = new ListInstanceResponse();

            listInstanceResponse.HttpResponse = _ctx.HttpResponse;
            listInstanceResponse.Code         = _ctx.StringValue("ListInstance.code");
            listInstanceResponse.Message      = _ctx.StringValue("ListInstance.message");
            listInstanceResponse.RequestId    = _ctx.StringValue("ListInstance.requestId");

            List <ListInstanceResponse.ListInstance_ResultItem> listInstanceResponse_result = new List <ListInstanceResponse.ListInstance_ResultItem>();

            for (int i = 0; i < _ctx.Length("ListInstance.Result.Length"); i++)
            {
                ListInstanceResponse.ListInstance_ResultItem resultItem = new ListInstanceResponse.ListInstance_ResultItem();
                resultItem.ChargeType     = _ctx.StringValue("ListInstance.Result[" + i + "].chargeType");
                resultItem.CommodityCode  = _ctx.StringValue("ListInstance.Result[" + i + "].commodityCode");
                resultItem.DataSetVersion = _ctx.StringValue("ListInstance.Result[" + i + "].dataSetVersion");
                resultItem.ExpiredTime    = _ctx.StringValue("ListInstance.Result[" + i + "].expiredTime");
                resultItem.GmtCreate      = _ctx.StringValue("ListInstance.Result[" + i + "].gmtCreate");
                resultItem.GmtModified    = _ctx.StringValue("ListInstance.Result[" + i + "].gmtModified");
                resultItem.Industry       = _ctx.StringValue("ListInstance.Result[" + i + "].industry");
                resultItem.InstanceId     = _ctx.StringValue("ListInstance.Result[" + i + "].instanceId");
                resultItem.LockMode       = _ctx.StringValue("ListInstance.Result[" + i + "].lockMode");
                resultItem.Name           = _ctx.StringValue("ListInstance.Result[" + i + "].name");
                resultItem.RegionId       = _ctx.StringValue("ListInstance.Result[" + i + "].regionId");
                resultItem.Status         = _ctx.StringValue("ListInstance.Result[" + i + "].status");
                resultItem.Type           = _ctx.StringValue("ListInstance.Result[" + i + "].type");

                listInstanceResponse_result.Add(resultItem);
            }
            listInstanceResponse.Result = listInstanceResponse_result;

            return(listInstanceResponse);
        }
        public static ListInstanceResponse Unmarshall(UnmarshallerContext context)
        {
            ListInstanceResponse listInstanceResponse = new ListInstanceResponse();

            listInstanceResponse.HttpResponse = context.HttpResponse;
            listInstanceResponse.RequestId    = context.StringValue("ListInstance.RequestId");
            listInstanceResponse.Code         = context.StringValue("ListInstance.Code");
            listInstanceResponse.Message      = context.StringValue("ListInstance.Message");

            List <ListInstanceResponse.ListInstance_ResultItem> listInstanceResponse_result = new List <ListInstanceResponse.ListInstance_ResultItem>();

            for (int i = 0; i < context.Length("ListInstance.Result.Length"); i++)
            {
                ListInstanceResponse.ListInstance_ResultItem resultItem = new ListInstanceResponse.ListInstance_ResultItem();
                resultItem.InstanceId     = context.StringValue("ListInstance.Result[" + i + "].InstanceId");
                resultItem.ChargeType     = context.StringValue("ListInstance.Result[" + i + "].ChargeType");
                resultItem.RegionId       = context.StringValue("ListInstance.Result[" + i + "].RegionId");
                resultItem.Name           = context.StringValue("ListInstance.Result[" + i + "].Name");
                resultItem.Type           = context.StringValue("ListInstance.Result[" + i + "].Type");
                resultItem.ExpiredTime    = context.StringValue("ListInstance.Result[" + i + "].ExpiredTime");
                resultItem.GmtCreate      = context.StringValue("ListInstance.Result[" + i + "].GmtCreate");
                resultItem.GmtModified    = context.StringValue("ListInstance.Result[" + i + "].GmtModified");
                resultItem.Status         = context.StringValue("ListInstance.Result[" + i + "].Status");
                resultItem.Industry       = context.StringValue("ListInstance.Result[" + i + "].Industry");
                resultItem.Scene          = context.StringValue("ListInstance.Result[" + i + "].Scene");
                resultItem.DataSetVersion = context.StringValue("ListInstance.Result[" + i + "].DataSetVersion");
                resultItem.CommodityCode  = context.StringValue("ListInstance.Result[" + i + "].CommodityCode");
                resultItem.LockMode       = context.StringValue("ListInstance.Result[" + i + "].LockMode");

                listInstanceResponse_result.Add(resultItem);
            }
            listInstanceResponse.Result = listInstanceResponse_result;

            return(listInstanceResponse);
        }