コード例 #1
0
        public LocalSecondaryIndexDescription Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            LocalSecondaryIndexDescription localSecondaryIndexDescription = new LocalSecondaryIndexDescription();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("IndexName", targetDepth))
                {
                    localSecondaryIndexDescription.IndexName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("KeySchema", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <KeySchemaElement, KeySchemaElementUnmarshaller>(
                        KeySchemaElementUnmarshaller.GetInstance());
                    localSecondaryIndexDescription.KeySchema = unmarshaller.Unmarshall(context);

                    continue;
                }

                if (context.TestExpression("Projection", targetDepth))
                {
                    localSecondaryIndexDescription.Projection = ProjectionUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("IndexSizeBytes", targetDepth))
                {
                    localSecondaryIndexDescription.IndexSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ItemCount", targetDepth))
                {
                    localSecondaryIndexDescription.ItemCount = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(localSecondaryIndexDescription);
        }
コード例 #2
0
        public CustomErrorResponse Unmarshall(XmlUnmarshallerContext context)
        {
            CustomErrorResponse customErrorResponse = new CustomErrorResponse();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

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

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

                        continue;
                    }
                    if (context.TestExpression("ErrorCachingMinTTL", targetDepth))
                    {
                        customErrorResponse.ErrorCachingMinTTL = LongUnmarshaller.GetInstance().Unmarshall(context);

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



            return(customErrorResponse);
        }
コード例 #3
0
        public PartDetail Unmarshall(XmlUnmarshallerContext context)
        {
            PartDetail partsItem     = new PartDetail();
            int        originalDepth = context.CurrentDepth;
            int        targetDepth   = originalDepth + 1;

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

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

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

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

                        continue;
                    }
                    if (context.TestExpression("Size", targetDepth))
                    {
                        partsItem.Size = LongUnmarshaller.GetInstance().Unmarshall(context);

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



            return(partsItem);
        }
コード例 #4
0
        public PriceSchedule Unmarshall(XmlUnmarshallerContext context)
        {
            PriceSchedule priceSchedule = new PriceSchedule();
            int           originalDepth = context.CurrentDepth;
            int           targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("term", targetDepth))
                    {
                        priceSchedule.Term = LongUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("price", targetDepth))
                    {
                        priceSchedule.Price = DoubleUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("currencyCode", targetDepth))
                    {
                        priceSchedule.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("active", targetDepth))
                    {
                        priceSchedule.Active = BoolUnmarshaller.GetInstance().Unmarshall(context);

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



            return(priceSchedule);
        }
コード例 #5
0
        public DiskImageDescription Unmarshall(XmlUnmarshallerContext context)
        {
            DiskImageDescription diskImageDescription = new DiskImageDescription();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("size", targetDepth))
                    {
                        diskImageDescription.Size = LongUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("importManifestUrl", targetDepth))
                    {
                        diskImageDescription.ImportManifestUrl = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("checksum", targetDepth))
                    {
                        diskImageDescription.Checksum = StringUnmarshaller.GetInstance().Unmarshall(context);

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



            return(diskImageDescription);
        }
コード例 #6
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeVaultResponse response = new DescribeVaultResponse();

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

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

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

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

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

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

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

            return(response);
        }
        public TrustedAdvisorResourcesSummary Unmarshall(JsonUnmarshallerContext context)
        {
            TrustedAdvisorResourcesSummary trustedAdvisorResourcesSummary = new TrustedAdvisorResourcesSummary();

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

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

                    if (context.TestExpression("ResourcesProcessed", targetDepth))
                    {
                        trustedAdvisorResourcesSummary.ResourcesProcessed = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ResourcesFlagged", targetDepth))
                    {
                        trustedAdvisorResourcesSummary.ResourcesFlagged = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ResourcesIgnored", targetDepth))
                    {
                        trustedAdvisorResourcesSummary.ResourcesIgnored = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ResourcesSuppressed", targetDepth))
                    {
                        trustedAdvisorResourcesSummary.ResourcesSuppressed = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(trustedAdvisorResourcesSummary);
                }
            }


            return(trustedAdvisorResourcesSummary);
        }
コード例 #8
0
        public ProvisionedThroughputDescription Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ProvisionedThroughputDescription provisionedThroughputDescription = new ProvisionedThroughputDescription();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("LastIncreaseDateTime", targetDepth))
                {
                    provisionedThroughputDescription.LastIncreaseDateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

                if (context.TestExpression("NumberOfDecreasesToday", targetDepth))
                {
                    provisionedThroughputDescription.NumberOfDecreasesToday = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ReadCapacityUnits", targetDepth))
                {
                    provisionedThroughputDescription.ReadCapacityUnits = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("WriteCapacityUnits", targetDepth))
                {
                    provisionedThroughputDescription.WriteCapacityUnits = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(provisionedThroughputDescription);
        }
        public VolumeRecoveryPointInfo Unmarshall(JsonUnmarshallerContext context)
        {
            VolumeRecoveryPointInfo volumeRecoveryPointInfo = new VolumeRecoveryPointInfo();

            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))
                    {
                        volumeRecoveryPointInfo.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeSizeInBytes", targetDepth))
                    {
                        volumeRecoveryPointInfo.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeUsageInBytes", targetDepth))
                    {
                        volumeRecoveryPointInfo.VolumeUsageInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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


            return(volumeRecoveryPointInfo);
        }
コード例 #10
0
        public UploadListElement Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            UploadListElement uploadListElement = new UploadListElement();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("MultipartUploadId", targetDepth))
                {
                    uploadListElement.MultipartUploadId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

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

                if (context.TestExpression("PartSizeInBytes", targetDepth))
                {
                    uploadListElement.PartSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

            return(uploadListElement);
        }
        public ChildWorkflowExecutionCompletedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ChildWorkflowExecutionCompletedEventAttributes childWorkflowExecutionCompletedEventAttributes = new ChildWorkflowExecutionCompletedEventAttributes();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("workflowExecution", targetDepth))
                {
                    childWorkflowExecutionCompletedEventAttributes.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("workflowType", targetDepth))
                {
                    childWorkflowExecutionCompletedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("result", targetDepth))
                {
                    childWorkflowExecutionCompletedEventAttributes.Result = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("initiatedEventId", targetDepth))
                {
                    childWorkflowExecutionCompletedEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startedEventId", targetDepth))
                {
                    childWorkflowExecutionCompletedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(childWorkflowExecutionCompletedEventAttributes);
        }
        public ActivityTaskTimedOutEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes = new ActivityTaskTimedOutEventAttributes();

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

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

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

                    if (context.TestExpression("ScheduledEventId", targetDepth))
                    {
                        activityTaskTimedOutEventAttributes.ScheduledEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("StartedEventId", targetDepth))
                    {
                        activityTaskTimedOutEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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


            return(activityTaskTimedOutEventAttributes);
        }
        public ProvisionedThroughputDescription Unmarshall(JsonUnmarshallerContext context)
        {
            ProvisionedThroughputDescription provisionedThroughputDescription = new ProvisionedThroughputDescription();

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

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

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

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

                    if (context.TestExpression("ReadCapacityUnits", targetDepth))
                    {
                        provisionedThroughputDescription.ReadCapacityUnits = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("WriteCapacityUnits", targetDepth))
                    {
                        provisionedThroughputDescription.WriteCapacityUnits = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(provisionedThroughputDescription);
                }
            }


            return(provisionedThroughputDescription);
        }
        public TimerStartedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            TimerStartedEventAttributes timerStartedEventAttributes = new TimerStartedEventAttributes();

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

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

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

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

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

                    if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth))
                    {
                        timerStartedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(timerStartedEventAttributes);
                }
            }


            return(timerStartedEventAttributes);
        }
コード例 #15
0
        public S3Object Unmarshall(XmlUnmarshallerContext context)
        {
            S3Object s3Object     = new S3Object();
            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("ETag", num))
                    {
                        s3Object.ETag = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Key", num))
                    {
                        s3Object.Key = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("LastModified", num))
                    {
                        s3Object.LastModified = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Owner", num))
                    {
                        s3Object.Owner = OwnerUnmarshaller.Instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("Size", num))
                    {
                        s3Object.Size = LongUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("StorageClass", num))
                    {
                        s3Object.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(s3Object);
                }
            }
            return(s3Object);
        }
コード例 #16
0
        public CancelTimerFailedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes = new CancelTimerFailedEventAttributes();



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

            while (context.Read())
            {
                if (context.TestExpression("timerId", targetDepth))
                {
                    context.Read();
                    cancelTimerFailedEventAttributes.TimerId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("cause", targetDepth))
                {
                    context.Read();
                    cancelTimerFailedEventAttributes.Cause = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("decisionTaskCompletedEventId", targetDepth))
                {
                    context.Read();
                    cancelTimerFailedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(cancelTimerFailedEventAttributes);
        }
コード例 #17
0
        public DecisionTaskTimedOutEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes = new DecisionTaskTimedOutEventAttributes();



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

            while (context.Read())
            {
                if (context.TestExpression("timeoutType", targetDepth))
                {
                    context.Read();
                    decisionTaskTimedOutEventAttributes.TimeoutType = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("scheduledEventId", targetDepth))
                {
                    context.Read();
                    decisionTaskTimedOutEventAttributes.ScheduledEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startedEventId", targetDepth))
                {
                    context.Read();
                    decisionTaskTimedOutEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(decisionTaskTimedOutEventAttributes);
        }
コード例 #18
0
        public TrustedAdvisorCheckRefreshStatus Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            TrustedAdvisorCheckRefreshStatus trustedAdvisorCheckRefreshStatus = new TrustedAdvisorCheckRefreshStatus();



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

            while (context.Read())
            {
                if (context.TestExpression("checkId", targetDepth))
                {
                    context.Read();
                    trustedAdvisorCheckRefreshStatus.CheckId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

                if (context.TestExpression("millisUntilNextRefreshable", targetDepth))
                {
                    context.Read();
                    trustedAdvisorCheckRefreshStatus.MillisUntilNextRefreshable = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(trustedAdvisorCheckRefreshStatus);
        }
コード例 #19
0
        public MarkerRecordedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            MarkerRecordedEventAttributes markerRecordedEventAttributes = new MarkerRecordedEventAttributes();



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

            while (context.Read())
            {
                if (context.TestExpression("markerName", targetDepth))
                {
                    context.Read();
                    markerRecordedEventAttributes.MarkerName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("details", targetDepth))
                {
                    context.Read();
                    markerRecordedEventAttributes.Details = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("decisionTaskCompletedEventId", targetDepth))
                {
                    context.Read();
                    markerRecordedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


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

            ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes = new ActivityTaskCompletedEventAttributes();



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

            while (context.Read())
            {
                if (context.TestExpression("result", targetDepth))
                {
                    context.Read();
                    activityTaskCompletedEventAttributes.Result = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("scheduledEventId", targetDepth))
                {
                    context.Read();
                    activityTaskCompletedEventAttributes.ScheduledEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startedEventId", targetDepth))
                {
                    context.Read();
                    activityTaskCompletedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(activityTaskCompletedEventAttributes);
        }
コード例 #21
0
        public DescribeDBLogFilesDetails Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeDBLogFilesDetails describeDBLogFilesDetails = new DescribeDBLogFilesDetails();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("LastWritten", targetDepth))
                    {
                        describeDBLogFilesDetails.LastWritten = LongUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Size", targetDepth))
                    {
                        describeDBLogFilesDetails.Size = LongUnmarshaller.GetInstance().Unmarshall(context);

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



            return(describeDBLogFilesDetails);
        }
        public DecisionTaskCompletedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes = new DecisionTaskCompletedEventAttributes();

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

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

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

                    if (context.TestExpression("ScheduledEventId", targetDepth))
                    {
                        decisionTaskCompletedEventAttributes.ScheduledEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("StartedEventId", targetDepth))
                    {
                        decisionTaskCompletedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(decisionTaskCompletedEventAttributes);
                }
            }


            return(decisionTaskCompletedEventAttributes);
        }
コード例 #23
0
        public VolumeRecoveryPointInfo Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            VolumeRecoveryPointInfo volumeRecoveryPointInfo = new VolumeRecoveryPointInfo();


            int targetDepth = context.CurrentDepth;

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

                if (context.TestExpression("VolumeSizeInBytes", targetDepth))
                {
                    volumeRecoveryPointInfo.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeUsageInBytes", targetDepth))
                {
                    volumeRecoveryPointInfo.VolumeUsageInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

            return(volumeRecoveryPointInfo);
        }
        public MarkerRecordedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            MarkerRecordedEventAttributes markerRecordedEventAttributes = new MarkerRecordedEventAttributes();

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

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

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

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

                    if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth))
                    {
                        markerRecordedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(markerRecordedEventAttributes);
                }
            }


            return(markerRecordedEventAttributes);
        }
コード例 #25
0
        public TapeRecoveryPointInfo Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            TapeRecoveryPointInfo tapeRecoveryPointInfo = new TapeRecoveryPointInfo();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("TapeARN", targetDepth))
                {
                    tapeRecoveryPointInfo.TapeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

                if (context.TestExpression("TapeSizeInBytes", targetDepth))
                {
                    tapeRecoveryPointInfo.TapeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

            return(tapeRecoveryPointInfo);
        }
        public ActivityTaskFailedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes = new ActivityTaskFailedEventAttributes();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("reason", targetDepth))
                {
                    activityTaskFailedEventAttributes.Reason = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("details", targetDepth))
                {
                    activityTaskFailedEventAttributes.Details = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("scheduledEventId", targetDepth))
                {
                    activityTaskFailedEventAttributes.ScheduledEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startedEventId", targetDepth))
                {
                    activityTaskFailedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(activityTaskFailedEventAttributes);
        }
コード例 #27
0
        public TimerStartedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            TimerStartedEventAttributes timerStartedEventAttributes = new TimerStartedEventAttributes();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("timerId", targetDepth))
                {
                    timerStartedEventAttributes.TimerId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("control", targetDepth))
                {
                    timerStartedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startToFireTimeout", targetDepth))
                {
                    timerStartedEventAttributes.StartToFireTimeout = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("decisionTaskCompletedEventId", targetDepth))
                {
                    timerStartedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(timerStartedEventAttributes);
        }
コード例 #28
0
        public CreateStorediSCSIVolumeResult Unmarshall(JsonUnmarshallerContext context)
        {
            CreateStorediSCSIVolumeResult createStorediSCSIVolumeResult = new CreateStorediSCSIVolumeResult();

            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))
                    {
                        createStorediSCSIVolumeResult.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeSizeInBytes", targetDepth))
                    {
                        createStorediSCSIVolumeResult.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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


            return(createStorediSCSIVolumeResult);
        }
        public TrustedAdvisorResourcesSummary Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            TrustedAdvisorResourcesSummary trustedAdvisorResourcesSummary = new TrustedAdvisorResourcesSummary();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("resourcesProcessed", targetDepth))
                {
                    trustedAdvisorResourcesSummary.ResourcesProcessed = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("resourcesFlagged", targetDepth))
                {
                    trustedAdvisorResourcesSummary.ResourcesFlagged = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("resourcesIgnored", targetDepth))
                {
                    trustedAdvisorResourcesSummary.ResourcesIgnored = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("resourcesSuppressed", targetDepth))
                {
                    trustedAdvisorResourcesSummary.ResourcesSuppressed = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(trustedAdvisorResourcesSummary);
        }
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeUploadBufferResponse response = new DescribeUploadBufferResponse();

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

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

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

                    continue;
                }

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

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

            return(response);
        }