public static ListMediaResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListMediaResponse listMediaResponse = new ListMediaResponse();

            listMediaResponse.HttpResponse   = _ctx.HttpResponse;
            listMediaResponse.Code           = _ctx.StringValue("ListMedia.Code");
            listMediaResponse.HttpStatusCode = _ctx.IntegerValue("ListMedia.HttpStatusCode");
            listMediaResponse.Message        = _ctx.StringValue("ListMedia.Message");
            listMediaResponse.PageNumber     = _ctx.IntegerValue("ListMedia.PageNumber");
            listMediaResponse.PageSize       = _ctx.IntegerValue("ListMedia.PageSize");
            listMediaResponse.RequestId      = _ctx.StringValue("ListMedia.RequestId");
            listMediaResponse.Success        = _ctx.BooleanValue("ListMedia.Success");
            listMediaResponse.TotalCount     = _ctx.IntegerValue("ListMedia.TotalCount");

            List <ListMediaResponse.ListMedia_Media> listMediaResponse_mediaList = new List <ListMediaResponse.ListMedia_Media>();

            for (int i = 0; i < _ctx.Length("ListMedia.MediaList.Length"); i++)
            {
                ListMediaResponse.ListMedia_Media media = new ListMediaResponse.ListMedia_Media();
                media.MediaId = _ctx.StringValue("ListMedia.MediaList[" + i + "].MediaId");
                media.Name    = _ctx.StringValue("ListMedia.MediaList[" + i + "].Name");

                listMediaResponse_mediaList.Add(media);
            }
            listMediaResponse.MediaList = listMediaResponse_mediaList;

            return(listMediaResponse);
        }
Ejemplo n.º 2
0
        public static ListMediaResponse Unmarshall(UnmarshallerContext context)
        {
            ListMediaResponse listMediaResponse = new ListMediaResponse();

            listMediaResponse.HttpResponse  = context.HttpResponse;
            listMediaResponse.RequestId     = context.StringValue("ListMedia.RequestId");
            listMediaResponse.NextPageToken = context.StringValue("ListMedia.NextPageToken");

            List <ListMediaResponse.ListMedia_Media> listMediaResponse_mediaList = new List <ListMediaResponse.ListMedia_Media>();

            for (int i = 0; i < context.Length("ListMedia.MediaList.Length"); i++)
            {
                ListMediaResponse.ListMedia_Media media = new ListMediaResponse.ListMedia_Media();
                media.MediaId      = context.StringValue("ListMedia.MediaList[" + i + "].MediaId");
                media.Title        = context.StringValue("ListMedia.MediaList[" + i + "].Title");
                media.Description  = context.StringValue("ListMedia.MediaList[" + i + "].Description");
                media.CoverURL     = context.StringValue("ListMedia.MediaList[" + i + "].CoverURL");
                media.CateId       = context.LongValue("ListMedia.MediaList[" + i + "].CateId");
                media.Duration     = context.StringValue("ListMedia.MediaList[" + i + "].Duration");
                media.Format       = context.StringValue("ListMedia.MediaList[" + i + "].Format");
                media.Size         = context.StringValue("ListMedia.MediaList[" + i + "].Size");
                media.Bitrate      = context.StringValue("ListMedia.MediaList[" + i + "].Bitrate");
                media.Width        = context.StringValue("ListMedia.MediaList[" + i + "].Width");
                media.Height       = context.StringValue("ListMedia.MediaList[" + i + "].Height");
                media.Fps          = context.StringValue("ListMedia.MediaList[" + i + "].Fps");
                media.PublishState = context.StringValue("ListMedia.MediaList[" + i + "].PublishState");
                media.CensorState  = context.StringValue("ListMedia.MediaList[" + i + "].CensorState");
                media.CreationTime = context.StringValue("ListMedia.MediaList[" + i + "].CreationTime");

                List <string> media_tags = new List <string>();
                for (int j = 0; j < context.Length("ListMedia.MediaList[" + i + "].Tags.Length"); j++)
                {
                    media_tags.Add(context.StringValue("ListMedia.MediaList[" + i + "].Tags[" + j + "]"));
                }
                media.Tags = media_tags;

                List <string> media_runIdList = new List <string>();
                for (int j = 0; j < context.Length("ListMedia.MediaList[" + i + "].RunIdList.Length"); j++)
                {
                    media_runIdList.Add(context.StringValue("ListMedia.MediaList[" + i + "].RunIdList[" + j + "]"));
                }
                media.RunIdList = media_runIdList;

                ListMediaResponse.ListMedia_Media.ListMedia_File file = new ListMediaResponse.ListMedia_Media.ListMedia_File();
                file.URL   = context.StringValue("ListMedia.MediaList[" + i + "].File.URL");
                file.State = context.StringValue("ListMedia.MediaList[" + i + "].File.State");
                media.File = file;

                listMediaResponse_mediaList.Add(media);
            }
            listMediaResponse.MediaList = listMediaResponse_mediaList;

            return(listMediaResponse);
        }
Ejemplo n.º 3
0
        public static ListMediaResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListMediaResponse listMediaResponse = new ListMediaResponse();

            listMediaResponse.HttpResponse = _ctx.HttpResponse;
            listMediaResponse.Code         = _ctx.StringValue("ListMedia.Code");
            listMediaResponse.Success      = _ctx.BooleanValue("ListMedia.Success");
            listMediaResponse.Message      = _ctx.StringValue("ListMedia.Message");
            listMediaResponse.RequestId    = _ctx.StringValue("ListMedia.RequestId");
            listMediaResponse.PageNumber   = _ctx.IntegerValue("ListMedia.PageNumber");
            listMediaResponse.PageSize     = _ctx.IntegerValue("ListMedia.PageSize");
            listMediaResponse.Total        = _ctx.LongValue("ListMedia.Total");

            List <ListMediaResponse.ListMedia_Media> listMediaResponse_model = new List <ListMediaResponse.ListMedia_Media>();

            for (int i = 0; i < _ctx.Length("ListMedia.Model.Length"); i++)
            {
                ListMediaResponse.ListMedia_Media media = new ListMediaResponse.ListMedia_Media();
                media.CreateTime   = _ctx.LongValue("ListMedia.Model[" + i + "].CreateTime");
                media.ModifyTime   = _ctx.LongValue("ListMedia.Model[" + i + "].ModifyTime");
                media.TenantId     = _ctx.StringValue("ListMedia.Model[" + i + "].TenantId");
                media.MediaName    = _ctx.StringValue("ListMedia.Model[" + i + "].MediaName");
                media.MediaId      = _ctx.StringValue("ListMedia.Model[" + i + "].MediaId");
                media.MediaType    = _ctx.StringValue("ListMedia.Model[" + i + "].MediaType");
                media.FirstScene   = _ctx.StringValue("ListMedia.Model[" + i + "].FirstScene");
                media.SecondScene  = _ctx.StringValue("ListMedia.Model[" + i + "].SecondScene");
                media.MediaStatus  = _ctx.StringValue("ListMedia.Model[" + i + "].MediaStatus");
                media.AccessStatus = _ctx.StringValue("ListMedia.Model[" + i + "].AccessStatus");
                media.Os           = _ctx.StringValue("ListMedia.Model[" + i + "].Os");
                media.Config       = _ctx.StringValue("ListMedia.Model[" + i + "].Config");
                media.KeyWords     = _ctx.StringValue("ListMedia.Model[" + i + "].KeyWords");
                media.AccessWay    = _ctx.StringValue("ListMedia.Model[" + i + "].AccessWay");
                media.ExtInfo      = _ctx.StringValue("ListMedia.Model[" + i + "].ExtInfo");
                media.Version      = _ctx.LongValue("ListMedia.Model[" + i + "].Version");

                listMediaResponse_model.Add(media);
            }
            listMediaResponse.Model = listMediaResponse_model;

            return(listMediaResponse);
        }