public DistributionSummary Unmarshall(XmlUnmarshallerContext context) { DistributionSummary distributionSummary = new DistributionSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Id", targetDepth)) { distributionSummary.Id = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { distributionSummary.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { distributionSummary.LastModifiedTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { distributionSummary.DomainName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Aliases", targetDepth)) { distributionSummary.Aliases = AliasesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Origins", targetDepth)) { distributionSummary.Origins = OriginsUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultCacheBehavior", targetDepth)) { distributionSummary.DefaultCacheBehavior = DefaultCacheBehaviorUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CacheBehaviors", targetDepth)) { distributionSummary.CacheBehaviors = CacheBehaviorsUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { distributionSummary.Comment = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PriceClass", targetDepth)) { distributionSummary.PriceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { distributionSummary.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(distributionSummary); } } return(distributionSummary); }
public S3ObjectVersion Unmarshall(XmlUnmarshallerContext context) { S3ObjectVersion versionsItem = new S3ObjectVersion(); 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)) { versionsItem.ETag = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsLatest", targetDepth)) { versionsItem.IsLatest = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { versionsItem.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastModified", targetDepth)) { versionsItem.LastModified = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { versionsItem.Owner = OwnerUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Size", targetDepth)) { versionsItem.Size = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { versionsItem.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionId", targetDepth)) { versionsItem.VersionId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(versionsItem); } } return(versionsItem); }
public StreamingDistributionConfig Unmarshall(XmlUnmarshallerContext context) { StreamingDistributionConfig streamingDistributionConfig = new StreamingDistributionConfig(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CallerReference", targetDepth)) { streamingDistributionConfig.CallerReference = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("S3Origin", targetDepth)) { streamingDistributionConfig.S3Origin = S3OriginUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Aliases", targetDepth)) { streamingDistributionConfig.Aliases = AliasesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { streamingDistributionConfig.Comment = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Logging", targetDepth)) { streamingDistributionConfig.Logging = StreamingLoggingConfigUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TrustedSigners", targetDepth)) { streamingDistributionConfig.TrustedSigners = TrustedSignersUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PriceClass", targetDepth)) { streamingDistributionConfig.PriceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { streamingDistributionConfig.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(streamingDistributionConfig); } } return(streamingDistributionConfig); }
public StorediSCSIVolume Unmarshall(JsonUnmarshallerContext context) { StorediSCSIVolume storediSCSIVolume = new StorediSCSIVolume(); 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)) { storediSCSIVolume.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeId", targetDepth)) { storediSCSIVolume.VolumeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeType", targetDepth)) { storediSCSIVolume.VolumeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeStatus", targetDepth)) { storediSCSIVolume.VolumeStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeSizeInBytes", targetDepth)) { storediSCSIVolume.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeProgress", targetDepth)) { storediSCSIVolume.VolumeProgress = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeDiskId", targetDepth)) { storediSCSIVolume.VolumeDiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceSnapshotId", targetDepth)) { storediSCSIVolume.SourceSnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreservedExistingData", targetDepth)) { storediSCSIVolume.PreservedExistingData = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VolumeiSCSIAttributes", targetDepth)) { storediSCSIVolume.VolumeiSCSIAttributes = VolumeiSCSIAttributesUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(storediSCSIVolume); } } return(storediSCSIVolume); }
public ReservedDBInstance Unmarshall(XmlUnmarshallerContext context) { ReservedDBInstance reservedDBInstance = new ReservedDBInstance(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ReservedDBInstanceId", targetDepth)) { reservedDBInstance.ReservedDBInstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReservedDBInstancesOfferingId", targetDepth)) { reservedDBInstance.ReservedDBInstancesOfferingId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceClass", targetDepth)) { reservedDBInstance.DBInstanceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartTime", targetDepth)) { reservedDBInstance.StartTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Duration", targetDepth)) { reservedDBInstance.Duration = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("FixedPrice", targetDepth)) { reservedDBInstance.FixedPrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UsagePrice", targetDepth)) { reservedDBInstance.UsagePrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CurrencyCode", targetDepth)) { reservedDBInstance.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceCount", targetDepth)) { reservedDBInstance.DBInstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ProductDescription", targetDepth)) { reservedDBInstance.ProductDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("OfferingType", targetDepth)) { reservedDBInstance.OfferingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MultiAZ", targetDepth)) { reservedDBInstance.MultiAZ = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { reservedDBInstance.State = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RecurringCharges/RecurringCharge", targetDepth)) { reservedDBInstance.RecurringCharges.Add(RecurringChargeUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservedDBInstance); } } return(reservedDBInstance); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListPartsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { response.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PartNumberMarker", targetDepth)) { response.PartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextPartNumberMarker", targetDepth)) { response.NextPartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxParts", targetDepth)) { response.MaxParts = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Part", targetDepth)) { response.Parts.Add(PartDetailUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("Initiator", targetDepth)) { response.Initiator = InitiatorUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { response.Owner = OwnerUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { response.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListPartsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { response.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PartNumberMarker", targetDepth)) { response.PartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextPartNumberMarker", targetDepth)) { response.NextPartNumberMarker = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxParts", targetDepth)) { response.MaxParts = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Part", targetDepth)) { response.Parts.Add(PartDetailUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("Initiator", targetDepth)) { response.Initiator = InitiatorUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { response.Owner = OwnerUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { response.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortDateHeader)) { response.AbortDate = S3Transforms.ToDateTime(responseData.GetHeaderValue(HeaderKeys.XAmzAbortDateHeader)); } if (responseData.IsHeaderPresent(HeaderKeys.XAmzAbortRuleIdHeader)) { response.AbortRuleId = S3Transforms.ToString(responseData.GetHeaderValue(HeaderKeys.XAmzAbortRuleIdHeader)); } if (responseData.IsHeaderPresent(S3Constants.AmzHeaderRequestCharged)) { response.RequestCharged = RequestCharged.FindValue(responseData.GetHeaderValue(S3Constants.AmzHeaderRequestCharged)); } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsV2Response response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Contents", targetDepth)) { // adding the bucket name into the S3Object instance enables // a better pipelining experience in PowerShell var s3Object = ContentsItemUnmarshaller.Instance.Unmarshall(context); s3Object.BucketName = response.Name; response.S3Objects.Add(s3Object); continue; } if (context.TestExpression("Name", targetDepth)) { response.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Prefix", targetDepth)) { response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Delimiter", targetDepth)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxKeys", targetDepth)) { response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CommonPrefixes", targetDepth)) { var prefix = CommonPrefixesItemUnmarshaller.Instance.Unmarshall(context); if (prefix != null) { response.CommonPrefixes.Add(prefix); } continue; } if (context.TestExpression("EncodingType", targetDepth)) { response.Encoding = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeyCount", targetDepth)) { response.KeyCount = IntUnmarshaller.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("StartAfter", targetDepth)) { response.StartAfter = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public LatLonOptions Unmarshall(XmlUnmarshallerContext context) { LatLonOptions latLonOptions = new LatLonOptions(); 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)) { latLonOptions.DefaultValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceField", targetDepth)) { latLonOptions.SourceField = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("FacetEnabled", targetDepth)) { latLonOptions.FacetEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchEnabled", targetDepth)) { latLonOptions.SearchEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReturnEnabled", targetDepth)) { latLonOptions.ReturnEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SortEnabled", targetDepth)) { latLonOptions.SortEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(latLonOptions); } } return(latLonOptions); }
public JobFlowInstancesDetail Unmarshall(JsonUnmarshallerContext context) { JobFlowInstancesDetail jobFlowInstancesDetail = new JobFlowInstancesDetail(); jobFlowInstancesDetail.InstanceGroups = 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("MasterInstanceType", targetDepth)) { jobFlowInstancesDetail.MasterInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterPublicDnsName", targetDepth)) { jobFlowInstancesDetail.MasterPublicDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterInstanceId", targetDepth)) { jobFlowInstancesDetail.MasterInstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SlaveInstanceType", targetDepth)) { jobFlowInstancesDetail.SlaveInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceCount", targetDepth)) { jobFlowInstancesDetail.InstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceGroups", targetDepth)) { jobFlowInstancesDetail.InstanceGroups = new List <InstanceGroupDetail>(); InstanceGroupDetailUnmarshaller unmarshaller = InstanceGroupDetailUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { jobFlowInstancesDetail.InstanceGroups.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("NormalizedInstanceHours", targetDepth)) { jobFlowInstancesDetail.NormalizedInstanceHours = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2KeyName", targetDepth)) { jobFlowInstancesDetail.Ec2KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2SubnetId", targetDepth)) { jobFlowInstancesDetail.Ec2SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Placement", targetDepth)) { jobFlowInstancesDetail.Placement = PlacementTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeepJobFlowAliveWhenNoSteps", targetDepth)) { jobFlowInstancesDetail.KeepJobFlowAliveWhenNoSteps = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TerminationProtected", targetDepth)) { jobFlowInstancesDetail.TerminationProtected = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("HadoopVersion", targetDepth)) { jobFlowInstancesDetail.HadoopVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(jobFlowInstancesDetail); } } return(jobFlowInstancesDetail); }
private static void UnmarshallResult(JsonUnmarshallerContext context, ValidatePipelineDefinitionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("validationErrors", targetDepth)) { context.Read(); response.ValidationErrors = new List <ValidationError>(); ValidationErrorUnmarshaller unmarshaller = ValidationErrorUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.ValidationErrors.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("validationWarnings", targetDepth)) { context.Read(); response.ValidationWarnings = new List <ValidationWarning>(); ValidationWarningUnmarshaller unmarshaller = ValidationWarningUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.ValidationWarnings.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("errored", targetDepth)) { context.Read(); response.Errored = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }
public DescribeJobResult Unmarshall(JsonUnmarshallerContext context) { DescribeJobResult describeJobResult = new DescribeJobResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("JobId", targetDepth)) { describeJobResult.JobId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { describeJobResult.JobDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { describeJobResult.Action = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { describeJobResult.ArchiveId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { describeJobResult.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { describeJobResult.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { describeJobResult.Completed = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { describeJobResult.StatusCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { describeJobResult.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { describeJobResult.ArchiveSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { describeJobResult.InventorySizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { describeJobResult.SNSTopic = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { describeJobResult.CompletionDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { describeJobResult.SHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { describeJobResult.ArchiveSHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { describeJobResult.RetrievalByteRange = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(describeJobResult); } } return(describeJobResult); }
public DomainStatus Unmarshall(XmlUnmarshallerContext context) { DomainStatus domainStatus = new DomainStatus(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DomainId", targetDepth)) { domainStatus.DomainId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { domainStatus.DomainName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Created", targetDepth)) { domainStatus.Created = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Deleted", targetDepth)) { domainStatus.Deleted = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NumSearchableDocs", targetDepth)) { domainStatus.NumSearchableDocs = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DocService", targetDepth)) { domainStatus.DocService = ServiceEndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchService", targetDepth)) { domainStatus.SearchService = ServiceEndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RequiresIndexDocuments", targetDepth)) { domainStatus.RequiresIndexDocuments = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Processing", targetDepth)) { domainStatus.Processing = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchInstanceType", targetDepth)) { domainStatus.SearchInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchPartitionCount", targetDepth)) { domainStatus.SearchPartitionCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchInstanceCount", targetDepth)) { domainStatus.SearchInstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(domainStatus); } } return(domainStatus); }
public ConfigurationOptionDescription Unmarshall(UnmarshallerContext context) { ConfigurationOptionDescription configurationOptionDescription = new ConfigurationOptionDescription(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Namespace", targetDepth)) { configurationOptionDescription.Namespace = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { configurationOptionDescription.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultValue", targetDepth)) { configurationOptionDescription.DefaultValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ChangeSeverity", targetDepth)) { configurationOptionDescription.ChangeSeverity = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UserDefined", targetDepth)) { configurationOptionDescription.UserDefined = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ValueType", targetDepth)) { configurationOptionDescription.ValueType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ValueOptions/member", targetDepth)) { configurationOptionDescription.ValueOptions.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("MinValue", targetDepth)) { configurationOptionDescription.MinValue = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxValue", targetDepth)) { configurationOptionDescription.MaxValue = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxLength", targetDepth)) { configurationOptionDescription.MaxLength = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Regex", targetDepth)) { configurationOptionDescription.Regex = OptionRestrictionRegexUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(configurationOptionDescription); } } return(configurationOptionDescription); }
public App Unmarshall(JsonUnmarshallerContext context) { App app = new App(); app.Domains = null; app.Attributes = 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("AppId", targetDepth)) { app.AppId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { app.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Shortname", targetDepth)) { app.Shortname = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { app.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { app.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { app.Type = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AppSource", targetDepth)) { app.AppSource = SourceUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Domains", targetDepth)) { app.Domains = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { app.Domains.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("EnableSsl", targetDepth)) { app.EnableSsl = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SslConfiguration", targetDepth)) { app.SslConfiguration = SslConfigurationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Attributes", targetDepth)) { app.Attributes = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); app.Attributes.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("CreatedAt", targetDepth)) { app.CreatedAt = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(app); } } return(app); }
public JobFlowInstancesDetail Unmarshall(XmlUnmarshallerContext context) { JobFlowInstancesDetail jobFlowInstancesDetail = new JobFlowInstancesDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("MasterInstanceType", targetDepth)) { jobFlowInstancesDetail.MasterInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterPublicDnsName", targetDepth)) { jobFlowInstancesDetail.MasterPublicDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterInstanceId", targetDepth)) { jobFlowInstancesDetail.MasterInstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SlaveInstanceType", targetDepth)) { jobFlowInstancesDetail.SlaveInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceCount", targetDepth)) { jobFlowInstancesDetail.InstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceGroups/member", targetDepth)) { jobFlowInstancesDetail.InstanceGroups.Add(InstanceGroupDetailUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("NormalizedInstanceHours", targetDepth)) { jobFlowInstancesDetail.NormalizedInstanceHours = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2KeyName", targetDepth)) { jobFlowInstancesDetail.Ec2KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2SubnetId", targetDepth)) { jobFlowInstancesDetail.Ec2SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Placement", targetDepth)) { jobFlowInstancesDetail.Placement = PlacementTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeepJobFlowAliveWhenNoSteps", targetDepth)) { jobFlowInstancesDetail.KeepJobFlowAliveWhenNoSteps = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TerminationProtected", targetDepth)) { jobFlowInstancesDetail.TerminationProtected = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("HadoopVersion", targetDepth)) { jobFlowInstancesDetail.HadoopVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(jobFlowInstancesDetail); } } return(jobFlowInstancesDetail); }
public EventSubscription Unmarshall(XmlUnmarshallerContext context) { EventSubscription eventSubscription = new EventSubscription(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CustomerAwsId", targetDepth)) { eventSubscription.CustomerAwsId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CustSubscriptionId", targetDepth)) { eventSubscription.CustSubscriptionId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SnsTopicArn", targetDepth)) { eventSubscription.SnsTopicArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { eventSubscription.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubscriptionCreationTime", targetDepth)) { eventSubscription.SubscriptionCreationTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceType", targetDepth)) { eventSubscription.SourceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceIdsList/SourceId", targetDepth)) { eventSubscription.SourceIdsList.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("EventCategoriesList/EventCategory", targetDepth)) { eventSubscription.EventCategoriesList.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Severity", targetDepth)) { eventSubscription.Severity = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { eventSubscription.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(eventSubscription); } } return(eventSubscription); }
public LaunchSpecification Unmarshall(XmlUnmarshallerContext context) { LaunchSpecification launchSpecification = new LaunchSpecification(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("imageId", targetDepth)) { launchSpecification.ImageId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("keyName", targetDepth)) { launchSpecification.KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { launchSpecification.AllSecurityGroups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("groupSet/item/groupName", targetDepth)) { launchSpecification.SecurityGroups.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("userData", targetDepth)) { launchSpecification.UserData = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("addressingType", targetDepth)) { launchSpecification.AddressingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceType", targetDepth)) { launchSpecification.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("placement", targetDepth)) { launchSpecification.Placement = SpotPlacementUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("kernelId", targetDepth)) { launchSpecification.KernelId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ramdiskId", targetDepth)) { launchSpecification.RamdiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("blockDeviceMapping/item", targetDepth)) { launchSpecification.BlockDeviceMappings.Add(BlockDeviceMappingUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("monitoring/enabled", targetDepth)) { launchSpecification.MonitoringEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { launchSpecification.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceSet/item", targetDepth)) { launchSpecification.NetworkInterfaces.Add(InstanceNetworkInterfaceSpecificationUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("iamInstanceProfile", targetDepth)) { launchSpecification.IamInstanceProfile = IamInstanceProfileSpecificationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ebsOptimized", targetDepth)) { launchSpecification.EbsOptimized = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(launchSpecification); } } return(launchSpecification); }
public PutPipelineDefinitionResult Unmarshall(JsonUnmarshallerContext context) { PutPipelineDefinitionResult putPipelineDefinitionResult = new PutPipelineDefinitionResult(); putPipelineDefinitionResult.ValidationErrors = null; putPipelineDefinitionResult.ValidationWarnings = 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("ValidationErrors", targetDepth)) { putPipelineDefinitionResult.ValidationErrors = new List <ValidationError>(); ValidationErrorUnmarshaller unmarshaller = ValidationErrorUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { putPipelineDefinitionResult.ValidationErrors.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("ValidationWarnings", targetDepth)) { putPipelineDefinitionResult.ValidationWarnings = new List <ValidationWarning>(); ValidationWarningUnmarshaller unmarshaller = ValidationWarningUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { putPipelineDefinitionResult.ValidationWarnings.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("Errored", targetDepth)) { putPipelineDefinitionResult.Errored = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(putPipelineDefinitionResult); } } return(putPipelineDefinitionResult); }
public OptionGroupOptionSetting Unmarshall(XmlUnmarshallerContext context) { OptionGroupOptionSetting optionGroupOptionSetting = new OptionGroupOptionSetting(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SettingName", targetDepth)) { optionGroupOptionSetting.SettingName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SettingDescription", targetDepth)) { optionGroupOptionSetting.SettingDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultValue", targetDepth)) { optionGroupOptionSetting.DefaultValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplyType", targetDepth)) { optionGroupOptionSetting.ApplyType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllowedValues", targetDepth)) { optionGroupOptionSetting.AllowedValues = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsModifiable", targetDepth)) { optionGroupOptionSetting.IsModifiable = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(optionGroupOptionSetting); } } return(optionGroupOptionSetting); }
public ReservedDBInstancesOffering Unmarshall(UnmarshallerContext context) { ReservedDBInstancesOffering reservedDBInstancesOffering = new ReservedDBInstancesOffering(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ReservedDBInstancesOfferingId", targetDepth)) { reservedDBInstancesOffering.ReservedDBInstancesOfferingId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceClass", targetDepth)) { reservedDBInstancesOffering.DBInstanceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Duration", targetDepth)) { reservedDBInstancesOffering.Duration = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("FixedPrice", targetDepth)) { reservedDBInstancesOffering.FixedPrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UsagePrice", targetDepth)) { reservedDBInstancesOffering.UsagePrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CurrencyCode", targetDepth)) { reservedDBInstancesOffering.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ProductDescription", targetDepth)) { reservedDBInstancesOffering.ProductDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MultiAZ", targetDepth)) { reservedDBInstancesOffering.MultiAZ = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservedDBInstancesOffering); } } return(reservedDBInstancesOffering); }
public LaunchConfiguration Unmarshall(XmlUnmarshallerContext context) { LaunchConfiguration launchConfiguration = new LaunchConfiguration(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("LaunchConfigurationName", targetDepth)) { launchConfiguration.LaunchConfigurationName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LaunchConfigurationARN", targetDepth)) { launchConfiguration.LaunchConfigurationARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ImageId", targetDepth)) { launchConfiguration.ImageId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeyName", targetDepth)) { launchConfiguration.KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SecurityGroups/member", targetDepth)) { launchConfiguration.SecurityGroups.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("UserData", targetDepth)) { launchConfiguration.UserData = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceType", targetDepth)) { launchConfiguration.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KernelId", targetDepth)) { launchConfiguration.KernelId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RamdiskId", targetDepth)) { launchConfiguration.RamdiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("BlockDeviceMappings/member", targetDepth)) { launchConfiguration.BlockDeviceMappings.Add(BlockDeviceMappingUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("InstanceMonitoring", targetDepth)) { launchConfiguration.InstanceMonitoring = InstanceMonitoringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SpotPrice", targetDepth)) { launchConfiguration.SpotPrice = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IamInstanceProfile", targetDepth)) { launchConfiguration.IamInstanceProfile = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { launchConfiguration.CreatedTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EbsOptimized", targetDepth)) { launchConfiguration.EbsOptimized = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(launchConfiguration); } } return(launchConfiguration); }
public KeysAndAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } KeysAndAttributes keysAndAttributes = new KeysAndAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("Keys", targetDepth)) { context.Read(); keysAndAttributes.Keys = new List <Dictionary <string, AttributeValue> >(); DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } keysAndAttributes.Keys.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("AttributesToGet", targetDepth)) { context.Read(); keysAndAttributes.AttributesToGet = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } keysAndAttributes.AttributesToGet.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("ConsistentRead", targetDepth)) { context.Read(); keysAndAttributes.ConsistentRead = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(keysAndAttributes); } } return(keysAndAttributes); }
public Instance Unmarshall(JsonUnmarshallerContext context) { Instance instance = new Instance(); instance.LayerIds = null; instance.SecurityGroupIds = 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("InstanceId", targetDepth)) { instance.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2InstanceId", targetDepth)) { instance.Ec2InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Hostname", targetDepth)) { instance.Hostname = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { instance.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LayerIds", targetDepth)) { instance.LayerIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { instance.LayerIds.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("SecurityGroupIds", targetDepth)) { instance.SecurityGroupIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { instance.SecurityGroupIds.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("InstanceType", targetDepth)) { instance.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceProfileArn", targetDepth)) { instance.InstanceProfileArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { instance.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Os", targetDepth)) { instance.Os = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AmiId", targetDepth)) { instance.AmiId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZone", targetDepth)) { instance.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PublicDns", targetDepth)) { instance.PublicDns = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PrivateDns", targetDepth)) { instance.PrivateDns = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PublicIp", targetDepth)) { instance.PublicIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PrivateIp", targetDepth)) { instance.PrivateIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ElasticIp", targetDepth)) { instance.ElasticIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutoScalingType", targetDepth)) { instance.AutoScalingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshKeyName", targetDepth)) { instance.SshKeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshHostRsaKeyFingerprint", targetDepth)) { instance.SshHostRsaKeyFingerprint = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshHostDsaKeyFingerprint", targetDepth)) { instance.SshHostDsaKeyFingerprint = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { instance.CreatedAt = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastServiceErrorId", targetDepth)) { instance.LastServiceErrorId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Architecture", targetDepth)) { instance.Architecture = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RootDeviceType", targetDepth)) { instance.RootDeviceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RootDeviceVolumeId", targetDepth)) { instance.RootDeviceVolumeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstallUpdatesOnBoot", targetDepth)) { instance.InstallUpdatesOnBoot = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(instance); } } return(instance); }
private static void UnmarshallResult(XmlUnmarshallerContext context, EnableLoggingResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("LoggingEnabled", targetDepth)) { response.LoggingEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("BucketName", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("S3KeyPrefix", targetDepth)) { response.S3KeyPrefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastSuccessfulDeliveryTime", targetDepth)) { response.LastSuccessfulDeliveryTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureTime", targetDepth)) { response.LastFailureTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureMessage", targetDepth)) { response.LastFailureMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public JobFlowDetail Unmarshall(JsonUnmarshallerContext context) { JobFlowDetail jobFlowDetail = new JobFlowDetail(); jobFlowDetail.Steps = null; jobFlowDetail.BootstrapActions = null; jobFlowDetail.SupportedProducts = 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("JobFlowId", targetDepth)) { jobFlowDetail.JobFlowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { jobFlowDetail.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LogUri", targetDepth)) { jobFlowDetail.LogUri = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AmiVersion", targetDepth)) { jobFlowDetail.AmiVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ExecutionStatusDetail", targetDepth)) { jobFlowDetail.ExecutionStatusDetail = JobFlowExecutionStatusDetailUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Instances", targetDepth)) { jobFlowDetail.Instances = JobFlowInstancesDetailUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Steps", targetDepth)) { jobFlowDetail.Steps = new List <StepDetail>(); StepDetailUnmarshaller unmarshaller = StepDetailUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { jobFlowDetail.Steps.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("BootstrapActions", targetDepth)) { jobFlowDetail.BootstrapActions = new List <BootstrapActionDetail>(); BootstrapActionDetailUnmarshaller unmarshaller = BootstrapActionDetailUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { jobFlowDetail.BootstrapActions.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("SupportedProducts", targetDepth)) { jobFlowDetail.SupportedProducts = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { jobFlowDetail.SupportedProducts.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("VisibleToAllUsers", targetDepth)) { jobFlowDetail.VisibleToAllUsers = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("JobFlowRole", targetDepth)) { jobFlowDetail.JobFlowRole = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(jobFlowDetail); } } return(jobFlowDetail); }
public Parameter Unmarshall(XmlUnmarshallerContext context) { Parameter parameter = new Parameter(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ParameterName", targetDepth)) { parameter.ParameterName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ParameterValue", targetDepth)) { parameter.ParameterValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { parameter.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Source", targetDepth)) { parameter.Source = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplyType", targetDepth)) { parameter.ApplyType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DataType", targetDepth)) { parameter.DataType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllowedValues", targetDepth)) { parameter.AllowedValues = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsModifiable", targetDepth)) { parameter.IsModifiable = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MinimumEngineVersion", targetDepth)) { parameter.MinimumEngineVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplyMethod", targetDepth)) { parameter.ApplyMethod = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(parameter); } } return(parameter); }
public InvalidationList Unmarshall(XmlUnmarshallerContext context) { InvalidationList invalidationList = new InvalidationList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Marker", targetDepth)) { invalidationList.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { invalidationList.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { invalidationList.MaxItems = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { invalidationList.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { invalidationList.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Items/InvalidationSummary", targetDepth)) { invalidationList.Items.Add(InvalidationSummaryUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(invalidationList); } } return(invalidationList); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListVersionsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("IsTruncated", targetDepth)) { response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeyMarker", targetDepth)) { response.KeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Delimiter", targetDepth)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionIdMarker", targetDepth)) { response.VersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextKeyMarker", targetDepth)) { response.NextKeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextVersionIdMarker", targetDepth)) { response.NextVersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Version", targetDepth)) { response.Versions.Add(VersionsItemUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("DeleteMarker", targetDepth)) { var version = VersionsItemUnmarshaller.Instance.Unmarshall(context); version.IsDeleteMarker = true; response.Versions.Add(version); continue; } if (context.TestExpression("Name", targetDepth)) { response.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Prefix", targetDepth)) { response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxKeys", targetDepth)) { response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CommonPrefixes", targetDepth)) { var prefix = CommonPrefixesItemUnmarshaller.Instance.Unmarshall(context); if (prefix != null) { response.CommonPrefixes.Add(prefix); } continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListVersionsResponse 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("KeyMarker", num)) { response.KeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Delimiter", num)) { response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("VersionIdMarker", num)) { response.VersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("NextKeyMarker", num)) { response.NextKeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("NextVersionIdMarker", num)) { response.NextVersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Version", num)) { response.Versions.Add(VersionsItemUnmarshaller.Instance.Unmarshall(context)); } else if (context.TestExpression("DeleteMarker", num)) { S3ObjectVersion s3ObjectVersion = VersionsItemUnmarshaller.Instance.Unmarshall(context); s3ObjectVersion.IsDeleteMarker = true; response.Versions.Add(s3ObjectVersion); } 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("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; } } }