Example #1
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ListPipelinesResponse response = new ListPipelinesResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("pipelineIdList", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <PipelineIdName, PipelineIdNameUnmarshaller>(
                        PipelineIdNameUnmarshaller.GetInstance());
                    response.PipelineIdList = unmarshaller.Unmarshall(context);

                    continue;
                }

                if (context.TestExpression("marker", targetDepth))
                {
                    response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("hasMoreResults", targetDepth))
                {
                    response.HasMoreResults = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public VpnConnectionOptions Unmarshall(XmlUnmarshallerContext context)
        {
            VpnConnectionOptions vpnConnectionOptions = new VpnConnectionOptions();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 1;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("staticRoutesOnly", targetDepth))
                    {
                        vpnConnectionOptions.StaticRoutesOnly = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(vpnConnectionOptions);
                }
            }



            return(vpnConnectionOptions);
        }
        public AddCommunicationToCaseResult Unmarshall(JsonUnmarshallerContext context)
        {
            AddCommunicationToCaseResult addCommunicationToCaseResult = new AddCommunicationToCaseResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Result", targetDepth))
                    {
                        addCommunicationToCaseResult.Result = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(addCommunicationToCaseResult);
                }
            }


            return(addCommunicationToCaseResult);
        }
        public CancelJobResult Unmarshall(XmlUnmarshallerContext context)
        {
            CancelJobResult cancelJobResult = new CancelJobResult();
            int             originalDepth   = context.CurrentDepth;
            int             targetDepth     = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Success", targetDepth))
                    {
                        cancelJobResult.Success = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(cancelJobResult);
                }
            }



            return(cancelJobResult);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, CancelJobResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Success", targetDepth))
                    {
                        response.Success = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }



            return;
        }
Example #6
0
        public VolumeiSCSIAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            VolumeiSCSIAttributes volumeiSCSIAttributes = new VolumeiSCSIAttributes();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("TargetARN", targetDepth))
                {
                    context.Read();
                    volumeiSCSIAttributes.TargetARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("NetworkInterfaceId", targetDepth))
                {
                    context.Read();
                    volumeiSCSIAttributes.NetworkInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("NetworkInterfacePort", targetDepth))
                {
                    context.Read();
                    volumeiSCSIAttributes.NetworkInterfacePort = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("LunNumber", targetDepth))
                {
                    context.Read();
                    volumeiSCSIAttributes.LunNumber = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ChapEnabled", targetDepth))
                {
                    context.Read();
                    volumeiSCSIAttributes.ChapEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(volumeiSCSIAttributes);
                }
            }


            return(volumeiSCSIAttributes);
        }
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            QueryObjectsResponse response = new QueryObjectsResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ids", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <String, StringUnmarshaller>(
                        StringUnmarshaller.GetInstance());
                    response.Ids = unmarshaller.Unmarshall(context);

                    continue;
                }

                if (context.TestExpression("marker", targetDepth))
                {
                    response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("hasMoreResults", targetDepth))
                {
                    response.HasMoreResults = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Example #8
0
        public Trail Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            Trail trail = new Trail();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("Name", targetDepth))
                {
                    context.Read();
                    trail.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("S3BucketName", targetDepth))
                {
                    context.Read();
                    trail.S3BucketName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("S3KeyPrefix", targetDepth))
                {
                    context.Read();
                    trail.S3KeyPrefix = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("SnsTopicName", targetDepth))
                {
                    context.Read();
                    trail.SnsTopicName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("IncludeGlobalServiceEvents", targetDepth))
                {
                    context.Read();
                    trail.IncludeGlobalServiceEvents = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(trail);
                }
            }


            return(trail);
        }
Example #9
0
        public WorkflowExecutionCount Unmarshall(JsonUnmarshallerContext context)
        {
            WorkflowExecutionCount workflowExecutionCount = new WorkflowExecutionCount();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Count", targetDepth))
                    {
                        workflowExecutionCount.Count = IntUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("Truncated", targetDepth))
                    {
                        workflowExecutionCount.Truncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(workflowExecutionCount);
                }
            }


            return(workflowExecutionCount);
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeVolumeAttributeResponse response = new DescribeVolumeAttributeResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("volumeId", targetDepth))
                    {
                        response.VolumeId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("autoEnableIO/value", targetDepth))
                    {
                        response.AutoEnableIO = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("productCodes/item", targetDepth))
                    {
                        response.ProductCodes.Add(ProductCodeUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
            }


            return(response);
        }
        public PendingTaskCount Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            PendingTaskCount pendingTaskCount = new PendingTaskCount();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("count", targetDepth))
                {
                    pendingTaskCount.Count = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("truncated", targetDepth))
                {
                    pendingTaskCount.Truncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(pendingTaskCount);
        }
        public ActivityTaskStatus Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            ActivityTaskStatus activityTaskStatus = new ActivityTaskStatus();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("cancelRequested", targetDepth))
                {
                    context.Read();
                    activityTaskStatus.CancelRequested = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(activityTaskStatus);
                }
            }


            return(activityTaskStatus);
        }
        public UserProfile Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            UserProfile userProfile = new UserProfile();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("IamUserArn", targetDepth))
                {
                    context.Read();
                    userProfile.IamUserArn = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("Name", targetDepth))
                {
                    context.Read();
                    userProfile.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("SshUsername", targetDepth))
                {
                    context.Read();
                    userProfile.SshUsername = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("SshPublicKey", targetDepth))
                {
                    context.Read();
                    userProfile.SshPublicKey = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("AllowSelfManagement", targetDepth))
                {
                    context.Read();
                    userProfile.AllowSelfManagement = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(userProfile);
                }
            }


            return(userProfile);
        }
Example #14
0
        public LifecycleRuleExpiration Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleExpiration lifecycleRuleExpiration = new LifecycleRuleExpiration();
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("Date", num))
                    {
                        lifecycleRuleExpiration.Date = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Days", num))
                    {
                        lifecycleRuleExpiration.Days = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("ExpiredObjectDeleteMarker", num))
                    {
                        lifecycleRuleExpiration.ExpiredObjectDeleteMarker = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(lifecycleRuleExpiration);
                }
            }
            return(lifecycleRuleExpiration);
        }
Example #15
0
        public InstanceMonitoring Unmarshall(XmlUnmarshallerContext context)
        {
            InstanceMonitoring instanceMonitoring = new InstanceMonitoring();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Enabled", targetDepth))
                    {
                        instanceMonitoring.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(instanceMonitoring);
                }
            }



            return(instanceMonitoring);
        }
        public Permission Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            Permission permission = new Permission();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("StackId", targetDepth))
                {
                    context.Read();
                    permission.StackId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("IamUserArn", targetDepth))
                {
                    context.Read();
                    permission.IamUserArn = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("AllowSsh", targetDepth))
                {
                    context.Read();
                    permission.AllowSsh = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("AllowSudo", targetDepth))
                {
                    context.Read();
                    permission.AllowSudo = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("Level", targetDepth))
                {
                    context.Read();
                    permission.Level = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(permission);
                }
            }


            return(permission);
        }
Example #17
0
        public ChefConfiguration Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ChefConfiguration chefConfiguration = new ChefConfiguration();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ManageBerkshelf", targetDepth))
                {
                    chefConfiguration.ManageBerkshelf = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("BerkshelfVersion", targetDepth))
                {
                    chefConfiguration.BerkshelfVersion = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(chefConfiguration);
        }
        public ReportTaskProgressResult Unmarshall(JsonUnmarshallerContext context)
        {
            ReportTaskProgressResult reportTaskProgressResult = new ReportTaskProgressResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Canceled", targetDepth))
                    {
                        reportTaskProgressResult.Canceled = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(reportTaskProgressResult);
                }
            }


            return(reportTaskProgressResult);
        }
Example #19
0
        public CrossZoneLoadBalancing Unmarshall(XmlUnmarshallerContext context) 
        {
            CrossZoneLoadBalancing crossZoneLoadBalancing = new CrossZoneLoadBalancing();
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            
            if (context.IsStartOfDocument) 
               targetDepth += 2;
            
            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Enabled", targetDepth))
                    {
                        crossZoneLoadBalancing.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return crossZoneLoadBalancing;
                }
            }
                        


            return crossZoneLoadBalancing;
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeVpcAttributeResponse response = new DescribeVpcAttributeResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("vpcId", targetDepth))
                    {
                        response.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("enableDnsSupport/value", targetDepth))
                    {
                        response.EnableDnsSupport = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("enableDnsHostnames/value", targetDepth))
                    {
                        response.EnableDnsHostnames = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
            }


            return(response);
        }
        public ActivityTaskStatus Unmarshall(JsonUnmarshallerContext context)
        {
            ActivityTaskStatus activityTaskStatus = new ActivityTaskStatus();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("CancelRequested", targetDepth))
                    {
                        activityTaskStatus.CancelRequested = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(activityTaskStatus);
                }
            }


            return(activityTaskStatus);
        }
Example #22
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ListStreamsResponse response = new ListStreamsResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("StreamNames", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <String, StringUnmarshaller>(
                        StringUnmarshaller.GetInstance());
                    response.StreamNames = unmarshaller.Unmarshall(context);

                    continue;
                }

                if (context.TestExpression("HasMoreStreams", targetDepth))
                {
                    response.HasMoreStreams = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Example #23
0
        public PolicyStatus Unmarshall(XmlUnmarshallerContext context)
        {
            PolicyStatus policyStatus  = new PolicyStatus();
            int          originalDepth = context.CurrentDepth;
            int          targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("IsPublic", targetDepth))
                    {
                        policyStatus.IsPublic = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(policyStatus);
                }
            }

            return(policyStatus);
        }
        public TrustedAdvisorCheckSummary Unmarshall(JsonUnmarshallerContext context)
        {
            TrustedAdvisorCheckSummary trustedAdvisorCheckSummary = new TrustedAdvisorCheckSummary();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("CheckId", targetDepth))
                    {
                        trustedAdvisorCheckSummary.CheckId = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("Timestamp", targetDepth))
                    {
                        trustedAdvisorCheckSummary.Timestamp = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("Status", targetDepth))
                    {
                        trustedAdvisorCheckSummary.Status = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("HasFlaggedResources", targetDepth))
                    {
                        trustedAdvisorCheckSummary.HasFlaggedResources = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ResourcesSummary", targetDepth))
                    {
                        trustedAdvisorCheckSummary.ResourcesSummary = TrustedAdvisorResourcesSummaryUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("CategorySpecificSummary", targetDepth))
                    {
                        trustedAdvisorCheckSummary.CategorySpecificSummary = TrustedAdvisorCategorySpecificSummaryUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(trustedAdvisorCheckSummary);
                }
            }


            return(trustedAdvisorCheckSummary);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsResponse response)
        {
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("IsTruncated", num))
                    {
                        response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("NextMarker", num))
                    {
                        response.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Contents", num))
                    {
                        S3Object s3Object = ContentsItemUnmarshaller.Instance.Unmarshall(context);
                        s3Object.BucketName = response.Name;
                        response.S3Objects.Add(s3Object);
                    }
                    else if (context.TestExpression("Name", num))
                    {
                        response.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Prefix", num))
                    {
                        response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Delimiter", num))
                    {
                        response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("MaxKeys", num))
                    {
                        response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("CommonPrefixes", num))
                    {
                        string text = CommonPrefixesItemUnmarshaller.Instance.Unmarshall(context);
                        if (text != null)
                        {
                            response.CommonPrefixes.Add(text);
                        }
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    break;
                }
            }
        }
        private static void UnmarshallResult(JsonUnmarshallerContext context, UpdateTrailResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("Name", targetDepth))
                {
                    context.Read();
                    response.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("S3BucketName", targetDepth))
                {
                    context.Read();
                    response.S3BucketName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("S3KeyPrefix", targetDepth))
                {
                    context.Read();
                    response.S3KeyPrefix = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("SnsTopicName", targetDepth))
                {
                    context.Read();
                    response.SnsTopicName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("IncludeGlobalServiceEvents", targetDepth))
                {
                    context.Read();
                    response.IncludeGlobalServiceEvents = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("trail", targetDepth))
                {
                    context.Read();
                    response.Trail = TrailUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return;
                }
            }

            return;
        }
Example #27
0
        public InstanceNetworkInterfaceAttachment Unmarshall(XmlUnmarshallerContext context)
        {
            InstanceNetworkInterfaceAttachment instanceNetworkInterfaceAttachment = new InstanceNetworkInterfaceAttachment();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 1;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("attachmentId", targetDepth))
                    {
                        instanceNetworkInterfaceAttachment.AttachmentId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("deviceIndex", targetDepth))
                    {
                        instanceNetworkInterfaceAttachment.DeviceIndex = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("status", targetDepth))
                    {
                        instanceNetworkInterfaceAttachment.Status = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("attachTime", targetDepth))
                    {
                        instanceNetworkInterfaceAttachment.AttachTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("deleteOnTermination", targetDepth))
                    {
                        instanceNetworkInterfaceAttachment.DeleteOnTermination = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(instanceNetworkInterfaceAttachment);
                }
            }



            return(instanceNetworkInterfaceAttachment);
        }
        public TagDescription Unmarshall(XmlUnmarshallerContext context)
        {
            TagDescription tagDescription = new TagDescription();
            int            originalDepth  = context.CurrentDepth;
            int            targetDepth    = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ResourceId", targetDepth))
                    {
                        tagDescription.ResourceId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ResourceType", targetDepth))
                    {
                        tagDescription.ResourceType = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Key", targetDepth))
                    {
                        tagDescription.Key = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Value", targetDepth))
                    {
                        tagDescription.Value = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PropagateAtLaunch", targetDepth))
                    {
                        tagDescription.PropagateAtLaunch = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(tagDescription);
                }
            }



            return(tagDescription);
        }
Example #29
0
        public OptionStatus Unmarshall(XmlUnmarshallerContext context)
        {
            OptionStatus optionStatus  = new OptionStatus();
            int          originalDepth = context.CurrentDepth;
            int          targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CreationDate", targetDepth))
                    {
                        optionStatus.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("UpdateDate", targetDepth))
                    {
                        optionStatus.UpdateDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("UpdateVersion", targetDepth))
                    {
                        optionStatus.UpdateVersion = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("State", targetDepth))
                    {
                        optionStatus.State = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PendingDeletion", targetDepth))
                    {
                        optionStatus.PendingDeletion = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(optionStatus);
                }
            }



            return(optionStatus);
        }
        public ListHealthChecksResult Unmarshall(XmlUnmarshallerContext context)
        {
            ListHealthChecksResult listHealthChecksResult = new ListHealthChecksResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("HealthChecks/HealthCheck", targetDepth))
                    {
                        listHealthChecksResult.HealthChecks.Add(HealthCheckUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("Marker", targetDepth))
                    {
                        listHealthChecksResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("IsTruncated", targetDepth))
                    {
                        listHealthChecksResult.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NextMarker", targetDepth))
                    {
                        listHealthChecksResult.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("MaxItems", targetDepth))
                    {
                        listHealthChecksResult.MaxItems = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(listHealthChecksResult);
                }
            }



            return(listHealthChecksResult);
        }