public static ListAppVersionsResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListAppVersionsResponse listAppVersionsResponse = new ListAppVersionsResponse();

            listAppVersionsResponse.HttpResponse = _ctx.HttpResponse;
            listAppVersionsResponse.RequestId    = _ctx.StringValue("ListAppVersions.RequestId");
            listAppVersionsResponse.Code         = _ctx.StringValue("ListAppVersions.Code");
            listAppVersionsResponse.Message      = _ctx.StringValue("ListAppVersions.Message");
            listAppVersionsResponse.Success      = _ctx.BooleanValue("ListAppVersions.Success");
            listAppVersionsResponse.ErrorCode    = _ctx.StringValue("ListAppVersions.ErrorCode");

            List <ListAppVersionsResponse.ListAppVersions_PackageVersionEntity> listAppVersionsResponse_data = new List <ListAppVersionsResponse.ListAppVersions_PackageVersionEntity>();

            for (int i = 0; i < _ctx.Length("ListAppVersions.Data.Length"); i++)
            {
                ListAppVersionsResponse.ListAppVersions_PackageVersionEntity packageVersionEntity = new ListAppVersionsResponse.ListAppVersions_PackageVersionEntity();
                packageVersionEntity.Id              = _ctx.StringValue("ListAppVersions.Data[" + i + "].Id");
                packageVersionEntity.CreateTime      = _ctx.StringValue("ListAppVersions.Data[" + i + "].CreateTime");
                packageVersionEntity.WarUrl          = _ctx.StringValue("ListAppVersions.Data[" + i + "].WarUrl");
                packageVersionEntity.Type            = _ctx.StringValue("ListAppVersions.Data[" + i + "].Type");
                packageVersionEntity.BuildPackageUrl = _ctx.StringValue("ListAppVersions.Data[" + i + "].BuildPackageUrl");

                listAppVersionsResponse_data.Add(packageVersionEntity);
            }
            listAppVersionsResponse.Data = listAppVersionsResponse_data;

            return(listAppVersionsResponse);
        }
コード例 #2
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ListAppVersionsResponse response = new ListAppVersionsResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("appVersions", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <AppVersionSummary, AppVersionSummaryUnmarshaller>(AppVersionSummaryUnmarshaller.Instance);
                    response.AppVersions = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("nextToken", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.NextToken = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }