public LifecycleTransition Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleTransition lifecycleTransition = new LifecycleTransition();
            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))
                    {
                        lifecycleTransition.Date = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Days", num))
                    {
                        lifecycleTransition.Days = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("StorageClass", num))
                    {
                        lifecycleTransition.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(lifecycleTransition);
                }
            }
            return(lifecycleTransition);
        }
        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);
        }
Beispiel #3
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);
        }
Beispiel #4
0
        public UIntOptions Unmarshall(XmlUnmarshallerContext context)
        {
            UIntOptions uIntOptions   = new UIntOptions();
            int         originalDepth = context.CurrentDepth;
            int         targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("DefaultValue", targetDepth))
                    {
                        uIntOptions.DefaultValue = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(uIntOptions);
        }
Beispiel #5
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);
        }
Beispiel #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);
        }
Beispiel #7
0
        public LifecycleRuleNoncurrentVersionExpiration Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleNoncurrentVersionExpiration expiration = new LifecycleRuleNoncurrentVersionExpiration();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("NoncurrentDays", targetDepth))
                    {
                        expiration.NoncurrentDays = IntUnmarshaller.GetInstance().Unmarshall(context);

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

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

            StackSummary stackSummary = new StackSummary();



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

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

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

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

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

                if (context.TestExpression("InstancesCount", targetDepth))
                {
                    context.Read();
                    stackSummary.InstancesCount = InstancesCountUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(stackSummary);
        }
        public LifecycleRuleAbortIncompleteMultipartUpload Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleAbortIncompleteMultipartUpload aimu = new LifecycleRuleAbortIncompleteMultipartUpload();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("DaysAfterInitiation", targetDepth))
                    {
                        aimu.DaysAfterInitiation = IntUnmarshaller.GetInstance().Unmarshall(context);

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

            return(aimu);
        }
        public LifecycleRuleNoncurrentVersionExpiration Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleNoncurrentVersionExpiration lifecycleRuleNoncurrentVersionExpiration = new LifecycleRuleNoncurrentVersionExpiration();
            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("NoncurrentDays", num))
                    {
                        lifecycleRuleNoncurrentVersionExpiration.NoncurrentDays = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(lifecycleRuleNoncurrentVersionExpiration);
                }
            }
            return(lifecycleRuleNoncurrentVersionExpiration);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, AssumeRoleResponse response)
        {
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.ReadAtDepth(currentDepth))
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("AssumedRoleUser", num))
                    {
                        AssumedRoleUserUnmarshaller instance = AssumedRoleUserUnmarshaller.Instance;
                        response.AssumedRoleUser = instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("Credentials", num))
                    {
                        CredentialsUnmarshaller instance2 = CredentialsUnmarshaller.Instance;
                        response.Credentials = instance2.Unmarshall(context);
                    }
                    else if (context.TestExpression("PackedPolicySize", num))
                    {
                        IntUnmarshaller instance3 = IntUnmarshaller.get_Instance();
                        response.PackedPolicySize = instance3.Unmarshall(context);
                    }
                }
            }
        }
      public ConnectionOrderStep Unmarshall(JsonUnmarshallerContext context) 
      {
          ConnectionOrderStep connectionOrderStep = new ConnectionOrderStep();
                  
          int originalDepth = context.CurrentDepth;
          int targetDepth = originalDepth + 1;
          while (context.Read())
          {
              if ((context.IsKey) && (context.CurrentDepth == targetDepth))
              {
              context.Read();
              context.Read();
             
            if (context.TestExpression("Number", targetDepth)) 
            {
              connectionOrderStep.Number = StringUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
            if (context.TestExpression("Name", targetDepth)) 
            {
              connectionOrderStep.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
            if (context.TestExpression("Description", targetDepth)) 
            {
              connectionOrderStep.Description = StringUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
            if (context.TestExpression("Owner", targetDepth)) 
            {
              connectionOrderStep.Owner = StringUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
            if (context.TestExpression("Sla", targetDepth)) 
            {
              connectionOrderStep.Sla = IntUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
            if (context.TestExpression("StepState", targetDepth)) 
            {
              connectionOrderStep.StepState = StringUnmarshaller.GetInstance().Unmarshall(context);
              continue; 
            }
 
              } 
              else if (context.IsEndElement && context.CurrentDepth <= originalDepth) 
              { 
                  return connectionOrderStep; 
              } 
          } 
        
        
          return connectionOrderStep; 
      } 
        public AutoScalingThresholds Unmarshall(JsonUnmarshallerContext context)
        {
            AutoScalingThresholds autoScalingThresholds = new AutoScalingThresholds();

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

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

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

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

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

                    if (context.TestExpression("CpuThreshold", targetDepth))
                    {
                        autoScalingThresholds.CpuThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("MemoryThreshold", targetDepth))
                    {
                        autoScalingThresholds.MemoryThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("LoadThreshold", targetDepth))
                    {
                        autoScalingThresholds.LoadThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(autoScalingThresholds);
                }
            }


            return(autoScalingThresholds);
        }
Beispiel #14
0
        public QueryResult Unmarshall(JsonUnmarshallerContext context)
        {
            QueryResult queryResult = new QueryResult();

            queryResult.Items = null;

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

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

                    if (context.TestExpression("Items", targetDepth))
                    {
                        queryResult.Items = new List <Dictionary <string, AttributeValue> >();
                        DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance());
                        while (context.Read())
                        {
                            if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth))
                            {
                                queryResult.Items.Add(unmarshaller.Unmarshall(context));
                            }
                            else if (context.IsEndArray)
                            {
                                break;
                            }
                        }
                        continue;
                    }

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

                    if (context.TestExpression("LastEvaluatedKey", targetDepth))
                    {
                        queryResult.LastEvaluatedKey = KeyUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ConsumedCapacityUnits", targetDepth))
                    {
                        queryResult.ConsumedCapacityUnits = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(queryResult);
                }
            }
            return(queryResult);
        }
        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;
                }
            }
        }
        public HealthCheck Unmarshall(XmlUnmarshallerContext context)
        {
            HealthCheck healthCheck   = new HealthCheck();
            int         originalDepth = context.CurrentDepth;
            int         targetDepth   = originalDepth + 1;

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

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

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

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

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

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

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



            return(healthCheck);
        }
        public Listener Unmarshall(XmlUnmarshallerContext context)
        {
            Listener listener      = new Listener();
            int      originalDepth = context.CurrentDepth;
            int      targetDepth   = originalDepth + 1;

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

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

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

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

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

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

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



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

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.ReadAtDepth(currentDepth))
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("AssumedRoleUser", num))
                    {
                        AssumedRoleUserUnmarshaller instance = AssumedRoleUserUnmarshaller.Instance;
                        response.AssumedRoleUser = instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("Audience", num))
                    {
                        StringUnmarshaller instance2 = StringUnmarshaller.get_Instance();
                        response.Audience = instance2.Unmarshall(context);
                    }
                    else if (context.TestExpression("Credentials", num))
                    {
                        CredentialsUnmarshaller instance3 = CredentialsUnmarshaller.Instance;
                        response.Credentials = instance3.Unmarshall(context);
                    }
                    else if (context.TestExpression("Issuer", num))
                    {
                        StringUnmarshaller instance4 = StringUnmarshaller.get_Instance();
                        response.Issuer = instance4.Unmarshall(context);
                    }
                    else if (context.TestExpression("NameQualifier", num))
                    {
                        StringUnmarshaller instance5 = StringUnmarshaller.get_Instance();
                        response.NameQualifier = instance5.Unmarshall(context);
                    }
                    else if (context.TestExpression("PackedPolicySize", num))
                    {
                        IntUnmarshaller instance6 = IntUnmarshaller.get_Instance();
                        response.PackedPolicySize = instance6.Unmarshall(context);
                    }
                    else if (context.TestExpression("Subject", num))
                    {
                        StringUnmarshaller instance7 = StringUnmarshaller.get_Instance();
                        response.Subject = instance7.Unmarshall(context);
                    }
                    else if (context.TestExpression("SubjectType", num))
                    {
                        StringUnmarshaller instance8 = StringUnmarshaller.get_Instance();
                        response.SubjectType = instance8.Unmarshall(context);
                    }
                }
            }
        }
Beispiel #19
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 HealthCheckConfig Unmarshall(XmlUnmarshallerContext context)
        {
            HealthCheckConfig healthCheckConfig = new HealthCheckConfig();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

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

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

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

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

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



            return(healthCheckConfig);
        }
Beispiel #21
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 VgwTelemetry Unmarshall(XmlUnmarshallerContext context)
        {
            VgwTelemetry vgwTelemetry  = new VgwTelemetry();
            int          originalDepth = context.CurrentDepth;
            int          targetDepth   = originalDepth + 1;

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

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

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

                        continue;
                    }
                    if (context.TestExpression("lastStatusChange", targetDepth))
                    {
                        vgwTelemetry.LastStatusChange = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("statusMessage", targetDepth))
                    {
                        vgwTelemetry.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("acceptedRouteCount", targetDepth))
                    {
                        vgwTelemetry.AcceptedRouteCount = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(vgwTelemetry);
        }
        public Ebs Unmarshall(XmlUnmarshallerContext context)
        {
            Ebs ebs           = new Ebs();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

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

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

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

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

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



            return(ebs);
        }
        public IpPermission Unmarshall(XmlUnmarshallerContext context)
        {
            IpPermission ipPermission  = new IpPermission();
            int          originalDepth = context.CurrentDepth;
            int          targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("fromPort", targetDepth))
                    {
                        ipPermission.FromPort = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("toPort", targetDepth))
                    {
                        ipPermission.ToPort = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("groups/item", targetDepth))
                    {
                        ipPermission.UserIdGroupPairs.Add(UserIdGroupPairUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("ipRanges/item/cidrIp", targetDepth))
                    {
                        ipPermission.IpRanges.Add(StringUnmarshaller.GetInstance().Unmarshall(context));

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



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

            WorkflowExecutionOpenCounts workflowExecutionOpenCounts = new WorkflowExecutionOpenCounts();



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

            while (context.Read())
            {
                if (context.TestExpression("openActivityTasks", targetDepth))
                {
                    context.Read();
                    workflowExecutionOpenCounts.OpenActivityTasks = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openDecisionTasks", targetDepth))
                {
                    context.Read();
                    workflowExecutionOpenCounts.OpenDecisionTasks = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openTimers", targetDepth))
                {
                    context.Read();
                    workflowExecutionOpenCounts.OpenTimers = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openChildWorkflowExecutions", targetDepth))
                {
                    context.Read();
                    workflowExecutionOpenCounts.OpenChildWorkflowExecutions = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(workflowExecutionOpenCounts);
        }
Beispiel #26
0
        public DescribeMaintenanceStartTimeResult Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeMaintenanceStartTimeResult describeMaintenanceStartTimeResult = new DescribeMaintenanceStartTimeResult();

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

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

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

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

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

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

                    if (context.TestExpression("Timezone", targetDepth))
                    {
                        describeMaintenanceStartTimeResult.Timezone = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(describeMaintenanceStartTimeResult);
                }
            }


            return(describeMaintenanceStartTimeResult);
        }
        public AutoScalingThresholds Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            AutoScalingThresholds autoScalingThresholds = new AutoScalingThresholds();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("InstanceCount", targetDepth))
                {
                    autoScalingThresholds.InstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

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

                if (context.TestExpression("CpuThreshold", targetDepth))
                {
                    autoScalingThresholds.CpuThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("MemoryThreshold", targetDepth))
                {
                    autoScalingThresholds.MemoryThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("LoadThreshold", targetDepth))
                {
                    autoScalingThresholds.LoadThreshold = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(autoScalingThresholds);
        }
Beispiel #28
0
        public DescribeSnapshotScheduleResult Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeSnapshotScheduleResult describeSnapshotScheduleResult = new DescribeSnapshotScheduleResult();

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

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

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

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

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

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

                    if (context.TestExpression("Timezone", targetDepth))
                    {
                        describeSnapshotScheduleResult.Timezone = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(describeSnapshotScheduleResult);
                }
            }


            return(describeSnapshotScheduleResult);
        }
Beispiel #29
0
        public VolumeConfiguration Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            VolumeConfiguration volumeConfiguration = new VolumeConfiguration();



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

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

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

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

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

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


            return(volumeConfiguration);
        }
Beispiel #30
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsByTagsResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Bucket", targetDepth))
                    {
                        response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("ContinuationToken", targetDepth))
                    {
                        response.ContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("NextContinuationToken", targetDepth))
                    {
                        response.NextContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("MaxKeys", targetDepth))
                    {
                        response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("IsTruncated", targetDepth))
                    {
                        response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("EncodingType", targetDepth))
                    {
                        response.EncodingType = EncodingType.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context));
                        continue;
                    }
                    if (context.TestExpression("Contents", targetDepth))
                    {
                        response.Contents.Add(TaggedResourceUnmarshaller.Instance.Unmarshall(context));
                    }
                }
            }
        }