public static ListOTAJobByDeviceResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListOTAJobByDeviceResponse listOTAJobByDeviceResponse = new ListOTAJobByDeviceResponse();

            listOTAJobByDeviceResponse.HttpResponse = _ctx.HttpResponse;
            listOTAJobByDeviceResponse.RequestId    = _ctx.StringValue("ListOTAJobByDevice.RequestId");
            listOTAJobByDeviceResponse.Success      = _ctx.BooleanValue("ListOTAJobByDevice.Success");
            listOTAJobByDeviceResponse.Code         = _ctx.StringValue("ListOTAJobByDevice.Code");
            listOTAJobByDeviceResponse.ErrorMessage = _ctx.StringValue("ListOTAJobByDevice.ErrorMessage");
            listOTAJobByDeviceResponse.Total        = _ctx.IntegerValue("ListOTAJobByDevice.Total");
            listOTAJobByDeviceResponse.PageSize     = _ctx.IntegerValue("ListOTAJobByDevice.PageSize");
            listOTAJobByDeviceResponse.PageCount    = _ctx.IntegerValue("ListOTAJobByDevice.PageCount");
            listOTAJobByDeviceResponse.CurrentPage  = _ctx.IntegerValue("ListOTAJobByDevice.CurrentPage");

            List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo> listOTAJobByDeviceResponse_data = new List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo>();

            for (int i = 0; i < _ctx.Length("ListOTAJobByDevice.Data.Length"); i++)
            {
                ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo simpleOTAJobInfo = new ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo();
                simpleOTAJobInfo.JobId           = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].JobId");
                simpleOTAJobInfo.UtcCreate       = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcCreate");
                simpleOTAJobInfo.UtcModified     = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcModified");
                simpleOTAJobInfo.ProductKey      = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].ProductKey");
                simpleOTAJobInfo.FirmwareId      = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].FirmwareId");
                simpleOTAJobInfo.UtcStartTime    = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcStartTime");
                simpleOTAJobInfo.UtcEndTime      = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcEndTime");
                simpleOTAJobInfo.JobStatus       = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].JobStatus");
                simpleOTAJobInfo.JobType         = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].JobType");
                simpleOTAJobInfo.TargetSelection = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].TargetSelection");
                simpleOTAJobInfo.SelectionType   = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].SelectionType");

                List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo.ListOTAJobByDevice_OtaTagDTO> simpleOTAJobInfo_tags = new List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo.ListOTAJobByDevice_OtaTagDTO>();
                for (int j = 0; j < _ctx.Length("ListOTAJobByDevice.Data[" + i + "].Tags.Length"); j++)
                {
                    ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo.ListOTAJobByDevice_OtaTagDTO otaTagDTO = new ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo.ListOTAJobByDevice_OtaTagDTO();
                    otaTagDTO.Key    = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].Tags[" + j + "].Key");
                    otaTagDTO._Value = _ctx.StringValue("ListOTAJobByDevice.Data[" + i + "].Tags[" + j + "].Value");

                    simpleOTAJobInfo_tags.Add(otaTagDTO);
                }
                simpleOTAJobInfo.Tags = simpleOTAJobInfo_tags;

                listOTAJobByDeviceResponse_data.Add(simpleOTAJobInfo);
            }
            listOTAJobByDeviceResponse.Data = listOTAJobByDeviceResponse_data;

            return(listOTAJobByDeviceResponse);
        }
Esempio n. 2
0
        public static ListOTAJobByDeviceResponse Unmarshall(UnmarshallerContext context)
        {
            ListOTAJobByDeviceResponse listOTAJobByDeviceResponse = new ListOTAJobByDeviceResponse();

            listOTAJobByDeviceResponse.HttpResponse = context.HttpResponse;
            listOTAJobByDeviceResponse.RequestId    = context.StringValue("ListOTAJobByDevice.RequestId");
            listOTAJobByDeviceResponse.Success      = context.BooleanValue("ListOTAJobByDevice.Success");
            listOTAJobByDeviceResponse.Code         = context.StringValue("ListOTAJobByDevice.Code");
            listOTAJobByDeviceResponse.ErrorMessage = context.StringValue("ListOTAJobByDevice.ErrorMessage");
            listOTAJobByDeviceResponse.Total        = context.IntegerValue("ListOTAJobByDevice.Total");
            listOTAJobByDeviceResponse.PageSize     = context.IntegerValue("ListOTAJobByDevice.PageSize");
            listOTAJobByDeviceResponse.PageCount    = context.IntegerValue("ListOTAJobByDevice.PageCount");
            listOTAJobByDeviceResponse.CurrentPage  = context.IntegerValue("ListOTAJobByDevice.CurrentPage");

            List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo> listOTAJobByDeviceResponse_data = new List <ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo>();

            for (int i = 0; i < context.Length("ListOTAJobByDevice.Data.Length"); i++)
            {
                ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo simpleOTAJobInfo = new ListOTAJobByDeviceResponse.ListOTAJobByDevice_SimpleOTAJobInfo();
                simpleOTAJobInfo.JobId           = context.StringValue("ListOTAJobByDevice.Data[" + i + "].JobId");
                simpleOTAJobInfo.UtcCreate       = context.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcCreate");
                simpleOTAJobInfo.UtcModified     = context.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcModified");
                simpleOTAJobInfo.ProductKey      = context.StringValue("ListOTAJobByDevice.Data[" + i + "].ProductKey");
                simpleOTAJobInfo.FirmwareId      = context.StringValue("ListOTAJobByDevice.Data[" + i + "].FirmwareId");
                simpleOTAJobInfo.UtcStartTime    = context.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcStartTime");
                simpleOTAJobInfo.UtcEndTime      = context.StringValue("ListOTAJobByDevice.Data[" + i + "].UtcEndTime");
                simpleOTAJobInfo.JobStatus       = context.StringValue("ListOTAJobByDevice.Data[" + i + "].JobStatus");
                simpleOTAJobInfo.JobType         = context.StringValue("ListOTAJobByDevice.Data[" + i + "].JobType");
                simpleOTAJobInfo.TargetSelection = context.StringValue("ListOTAJobByDevice.Data[" + i + "].TargetSelection");
                simpleOTAJobInfo.SelectionType   = context.StringValue("ListOTAJobByDevice.Data[" + i + "].SelectionType");

                listOTAJobByDeviceResponse_data.Add(simpleOTAJobInfo);
            }
            listOTAJobByDeviceResponse.Data = listOTAJobByDeviceResponse_data;

            return(listOTAJobByDeviceResponse);
        }