public DescribeAutoScalingNotificationTypesResult Unmarshall(UnmarshallerContext context) { DescribeAutoScalingNotificationTypesResult describeAutoScalingNotificationTypesResult = new DescribeAutoScalingNotificationTypesResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AutoScalingNotificationTypes/member", targetDepth)) { describeAutoScalingNotificationTypesResult.AutoScalingNotificationTypes.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(describeAutoScalingNotificationTypesResult); } } return(describeAutoScalingNotificationTypesResult); }
public JobFlowDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } JobFlowDetail jobFlowDetail = new JobFlowDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { 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)) { var unmarshaller = new ListUnmarshaller <StepDetail, StepDetailUnmarshaller>( StepDetailUnmarshaller.GetInstance()); jobFlowDetail.Steps = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BootstrapActions", targetDepth)) { var unmarshaller = new ListUnmarshaller <BootstrapActionDetail, BootstrapActionDetailUnmarshaller>( BootstrapActionDetailUnmarshaller.GetInstance()); jobFlowDetail.BootstrapActions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportedProducts", targetDepth)) { var unmarshaller = new ListUnmarshaller <String, StringUnmarshaller>( StringUnmarshaller.GetInstance()); jobFlowDetail.SupportedProducts = unmarshaller.Unmarshall(context); 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; } } return(jobFlowDetail); }
public ReservedNode Unmarshall(XmlUnmarshallerContext context) { ReservedNode reservedNode = new ReservedNode(); 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("ReservedNodeId", targetDepth)) { reservedNode.ReservedNodeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReservedNodeOfferingId", targetDepth)) { reservedNode.ReservedNodeOfferingId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NodeType", targetDepth)) { reservedNode.NodeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartTime", targetDepth)) { reservedNode.StartTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Duration", targetDepth)) { reservedNode.Duration = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("FixedPrice", targetDepth)) { reservedNode.FixedPrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UsagePrice", targetDepth)) { reservedNode.UsagePrice = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CurrencyCode", targetDepth)) { reservedNode.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NodeCount", targetDepth)) { reservedNode.NodeCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { reservedNode.State = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("OfferingType", targetDepth)) { reservedNode.OfferingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RecurringCharges/RecurringCharge", targetDepth)) { reservedNode.RecurringCharges.Add(RecurringChargeUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservedNode); } } return(reservedNode); }
public TrustedAdvisorCheckSummary Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } TrustedAdvisorCheckSummary trustedAdvisorCheckSummary = new TrustedAdvisorCheckSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("checkId", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.CheckId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("timestamp", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.Timestamp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("hasFlaggedResources", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.HasFlaggedResources = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("resourcesSummary", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.ResourcesSummary = TrustedAdvisorResourcesSummaryUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("categorySpecificSummary", targetDepth)) { context.Read(); trustedAdvisorCheckSummary.CategorySpecificSummary = TrustedAdvisorCategorySpecificSummaryUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(trustedAdvisorCheckSummary); } } return(trustedAdvisorCheckSummary); }
public BatchGetItemResult Unmarshall(JsonUnmarshallerContext context) { BatchGetItemResult batchGetItemResult = new BatchGetItemResult(); batchGetItemResult.Responses = null; batchGetItemResult.UnprocessedKeys = 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("Responses", targetDepth)) { batchGetItemResult.Responses = new Dictionary <String, BatchResponse>(); KeyValueUnmarshaller <string, BatchResponse, StringUnmarshaller, BatchResponseUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, BatchResponse, StringUnmarshaller, BatchResponseUnmarshaller>(StringUnmarshaller.GetInstance(), BatchResponseUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, BatchResponse> kvp = unmarshaller.Unmarshall(context); batchGetItemResult.Responses.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("UnprocessedKeys", targetDepth)) { batchGetItemResult.UnprocessedKeys = new Dictionary <String, KeysAndAttributes>(); KeyValueUnmarshaller <string, KeysAndAttributes, StringUnmarshaller, KeysAndAttributesUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, KeysAndAttributes, StringUnmarshaller, KeysAndAttributesUnmarshaller>(StringUnmarshaller.GetInstance(), KeysAndAttributesUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, KeysAndAttributes> kvp = unmarshaller.Unmarshall(context); batchGetItemResult.UnprocessedKeys.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(batchGetItemResult); } } return(batchGetItemResult); }
public CloudFrontOriginAccessIdentityList Unmarshall(XmlUnmarshallerContext context) { CloudFrontOriginAccessIdentityList cloudFrontOriginAccessIdentityList = new CloudFrontOriginAccessIdentityList(); 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)) { cloudFrontOriginAccessIdentityList.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { cloudFrontOriginAccessIdentityList.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { cloudFrontOriginAccessIdentityList.MaxItems = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { cloudFrontOriginAccessIdentityList.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { cloudFrontOriginAccessIdentityList.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Items/CloudFrontOriginAccessIdentitySummary", targetDepth)) { cloudFrontOriginAccessIdentityList.Items.Add(CloudFrontOriginAccessIdentitySummaryUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(cloudFrontOriginAccessIdentityList); } } return(cloudFrontOriginAccessIdentityList); }
public NetworkInterface Unmarshall(XmlUnmarshallerContext context) { NetworkInterface networkInterface = new NetworkInterface(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("networkInterfaceId", targetDepth)) { networkInterface.NetworkInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { networkInterface.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("vpcId", targetDepth)) { networkInterface.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("availabilityZone", targetDepth)) { networkInterface.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { networkInterface.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ownerId", targetDepth)) { networkInterface.OwnerId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("requesterId", targetDepth)) { networkInterface.RequesterId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("requesterManaged", targetDepth)) { networkInterface.RequesterManaged = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { networkInterface.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("macAddress", targetDepth)) { networkInterface.MacAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddress", targetDepth)) { networkInterface.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateDnsName", targetDepth)) { networkInterface.PrivateDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("sourceDestCheck", targetDepth)) { networkInterface.SourceDestCheck = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { networkInterface.Groups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("attachment", targetDepth)) { networkInterface.Attachment = NetworkInterfaceAttachmentUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("association", targetDepth)) { networkInterface.Association = NetworkInterfaceAssociationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { networkInterface.TagSet.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("privateIpAddressesSet/item", targetDepth)) { networkInterface.PrivateIpAddresses.Add(NetworkInterfacePrivateIpAddressUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(networkInterface); } } return(networkInterface); }
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; }
public GetIdentityVerificationAttributesResult Unmarshall(XmlUnmarshallerContext context) { GetIdentityVerificationAttributesResult getIdentityVerificationAttributesResult = new GetIdentityVerificationAttributesResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("VerificationAttributes/entry", targetDepth)) { KeyValueUnmarshaller <string, IdentityVerificationAttributes, StringUnmarshaller, IdentityVerificationAttributesUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, IdentityVerificationAttributes, StringUnmarshaller, IdentityVerificationAttributesUnmarshaller>(StringUnmarshaller.GetInstance(), IdentityVerificationAttributesUnmarshaller.GetInstance()); KeyValuePair <string, IdentityVerificationAttributes> kvp = unmarshaller.Unmarshall(context); getIdentityVerificationAttributesResult.VerificationAttributes.Add(kvp.Key, kvp.Value); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(getIdentityVerificationAttributesResult); } } return(getIdentityVerificationAttributesResult); }
public ReservedInstancesOffering Unmarshall(XmlUnmarshallerContext context) { ReservedInstancesOffering reservedInstancesOffering = new ReservedInstancesOffering(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("reservedInstancesOfferingId", targetDepth)) { reservedInstancesOffering.ReservedInstancesOfferingId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceType", targetDepth)) { reservedInstancesOffering.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("availabilityZone", targetDepth)) { reservedInstancesOffering.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("duration", targetDepth)) { reservedInstancesOffering.Duration = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("usagePrice", targetDepth)) { reservedInstancesOffering.UsagePrice = FloatUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("fixedPrice", targetDepth)) { reservedInstancesOffering.FixedPrice = FloatUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("productDescription", targetDepth)) { reservedInstancesOffering.ProductDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceTenancy", targetDepth)) { reservedInstancesOffering.InstanceTenancy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("currencyCode", targetDepth)) { reservedInstancesOffering.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("offeringType", targetDepth)) { reservedInstancesOffering.OfferingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("recurringCharges/item", targetDepth)) { reservedInstancesOffering.RecurringCharges.Add(RecurringChargeUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("marketplace", targetDepth)) { reservedInstancesOffering.Marketplace = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("pricingDetailsSet/item", targetDepth)) { reservedInstancesOffering.PricingDetails.Add(PricingDetailUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservedInstancesOffering); } } return(reservedInstancesOffering); }
public Stack Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } Stack stack = new Stack(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("StackId", targetDepth)) { stack.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { stack.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Arn", targetDepth)) { stack.Arn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Region", targetDepth)) { stack.Region = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { stack.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Attributes", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <String, String, StringUnmarshaller, StringUnmarshaller>( StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); stack.Attributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceRoleArn", targetDepth)) { stack.ServiceRoleArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultInstanceProfileArn", targetDepth)) { stack.DefaultInstanceProfileArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultOs", targetDepth)) { stack.DefaultOs = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("HostnameTheme", targetDepth)) { stack.HostnameTheme = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultAvailabilityZone", targetDepth)) { stack.DefaultAvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultSubnetId", targetDepth)) { stack.DefaultSubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CustomJson", targetDepth)) { stack.CustomJson = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ConfigurationManager", targetDepth)) { stack.ConfigurationManager = StackConfigurationManagerUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ChefConfiguration", targetDepth)) { stack.ChefConfiguration = ChefConfigurationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UseCustomCookbooks", targetDepth)) { stack.UseCustomCookbooks = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UseOpsworksSecurityGroups", targetDepth)) { stack.UseOpsworksSecurityGroups = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CustomCookbooksSource", targetDepth)) { stack.CustomCookbooksSource = SourceUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultSshKeyName", targetDepth)) { stack.DefaultSshKeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { stack.CreatedAt = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultRootDeviceType", targetDepth)) { stack.DefaultRootDeviceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(stack); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreatePrivateVirtualInterfaceResponse response = new CreatePrivateVirtualInterfaceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ownerAccount", targetDepth)) { response.OwnerAccount = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceId", targetDepth)) { response.VirtualInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("location", targetDepth)) { response.Location = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("connectionId", targetDepth)) { response.ConnectionId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceType", targetDepth)) { response.VirtualInterfaceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceName", targetDepth)) { response.VirtualInterfaceName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("vlan", targetDepth)) { response.Vlan = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("asn", targetDepth)) { response.Asn = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("authKey", targetDepth)) { response.AuthKey = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("amazonAddress", targetDepth)) { response.AmazonAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("customerAddress", targetDepth)) { response.CustomerAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceState", targetDepth)) { response.VirtualInterfaceState = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("customerRouterConfig", targetDepth)) { response.CustomerRouterConfig = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("virtualGatewayId", targetDepth)) { response.VirtualGatewayId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("routeFilterPrefixes", targetDepth)) { var unmarshaller = new ListUnmarshaller <RouteFilterPrefix, RouteFilterPrefixUnmarshaller>( RouteFilterPrefixUnmarshaller.GetInstance()); response.RouteFilterPrefixes = unmarshaller.Unmarshall(context); continue; } } return(response); }
public ImportInstanceVolumeDetailItem Unmarshall(XmlUnmarshallerContext context) { ImportInstanceVolumeDetailItem importInstanceVolumeDetailItem = new ImportInstanceVolumeDetailItem(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("bytesConverted", targetDepth)) { importInstanceVolumeDetailItem.BytesConverted = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("availabilityZone", targetDepth)) { importInstanceVolumeDetailItem.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("image", targetDepth)) { importInstanceVolumeDetailItem.Image = DiskImageDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("volume", targetDepth)) { importInstanceVolumeDetailItem.Volume = DiskImageVolumeDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { importInstanceVolumeDetailItem.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("statusMessage", targetDepth)) { importInstanceVolumeDetailItem.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { importInstanceVolumeDetailItem.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(importInstanceVolumeDetailItem); } } return(importInstanceVolumeDetailItem); }
public AttributeValue Unmarshall(JsonUnmarshallerContext context) { AttributeValue attributeValue = new AttributeValue(); attributeValue.SS = null; attributeValue.NS = null; attributeValue.BS = 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("S", targetDepth)) { attributeValue.S = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("N", targetDepth)) { attributeValue.N = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("B", targetDepth)) { attributeValue.B = MemoryStreamUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SS", targetDepth)) { attributeValue.SS = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { attributeValue.SS.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("NS", targetDepth)) { attributeValue.NS = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { attributeValue.NS.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("BS", targetDepth)) { attributeValue.BS = new List <MemoryStream>(); MemoryStreamUnmarshaller unmarshaller = MemoryStreamUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { attributeValue.BS.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(attributeValue); } } return(attributeValue); }
public Instance Unmarshall(XmlUnmarshallerContext context) { Instance instance = new Instance(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("instanceId", targetDepth)) { instance.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("imageId", targetDepth)) { instance.ImageId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceState", targetDepth)) { instance.State = InstanceStateUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateDnsName", targetDepth)) { instance.PrivateDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("dnsName", targetDepth)) { instance.PublicDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("reason", targetDepth)) { instance.StateTransitionReason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("keyName", targetDepth)) { instance.KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("amiLaunchIndex", targetDepth)) { instance.AmiLaunchIndex = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("productCodes/item", targetDepth)) { instance.ProductCodes.Add(ProductCodeUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("instanceType", targetDepth)) { instance.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("launchTime", targetDepth)) { instance.LaunchTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("placement", targetDepth)) { instance.Placement = PlacementUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("kernelId", targetDepth)) { instance.KernelId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ramdiskId", targetDepth)) { instance.RamdiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("platform", targetDepth)) { instance.Platform = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("monitoring", targetDepth)) { instance.Monitoring = MonitoringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { instance.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("vpcId", targetDepth)) { instance.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddress", targetDepth)) { instance.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ipAddress", targetDepth)) { instance.PublicIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("stateReason", targetDepth)) { instance.StateReason = StateReasonUnmarshaller.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("rootDeviceName", targetDepth)) { instance.RootDeviceName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("blockDeviceMapping/item", targetDepth)) { instance.BlockDeviceMappings.Add(InstanceBlockDeviceMappingUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("virtualizationType", targetDepth)) { instance.VirtualizationType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceLifecycle", targetDepth)) { instance.InstanceLifecycle = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("spotInstanceRequestId", targetDepth)) { instance.SpotInstanceRequestId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("license", targetDepth)) { instance.License = InstanceLicenseUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("clientToken", targetDepth)) { instance.ClientToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { instance.Tags.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { instance.SecurityGroups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("sourceDestCheck", targetDepth)) { instance.SourceDestCheck = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("hypervisor", targetDepth)) { instance.Hypervisor = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceSet/item", targetDepth)) { instance.NetworkInterfaces.Add(InstanceNetworkInterfaceUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("iamInstanceProfile", targetDepth)) { instance.IamInstanceProfile = IamInstanceProfileUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ebsOptimized", targetDepth)) { instance.EbsOptimized = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("sriovNetSupport", targetDepth)) { instance.SriovNetSupport = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(instance); } } return(instance); }
public Event Unmarshall(XmlUnmarshallerContext context) { Event eventValue = new Event(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SourceIdentifier", targetDepth)) { eventValue.SourceIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceType", targetDepth)) { eventValue.SourceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { eventValue.Message = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EventCategories/EventCategory", targetDepth)) { eventValue.EventCategories.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Severity", targetDepth)) { eventValue.Severity = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Date", targetDepth)) { eventValue.Date = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EventId", targetDepth)) { eventValue.EventId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(eventValue); } } return(eventValue); }
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateEnvironmentResponse 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("EnvironmentName", targetDepth)) { response.EnvironmentName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { response.EnvironmentId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplicationName", targetDepth)) { response.ApplicationName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionLabel", targetDepth)) { response.VersionLabel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SolutionStackName", targetDepth)) { response.SolutionStackName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TemplateName", targetDepth)) { response.TemplateName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { response.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EndpointURL", targetDepth)) { response.EndpointURL = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CNAME", targetDepth)) { response.CNAME = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateCreated", targetDepth)) { response.DateCreated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateUpdated", targetDepth)) { response.DateUpdated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { response.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Health", targetDepth)) { response.Health = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { response.Resources = EnvironmentResourcesDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Tier", targetDepth)) { response.Tier = EnvironmentTierUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public JobFlowDetail Unmarshall(UnmarshallerContext context) { JobFlowDetail jobFlowDetail = new JobFlowDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { 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("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/member", targetDepth)) { jobFlowDetail.Steps.Add(StepDetailUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("BootstrapActions/member", targetDepth)) { jobFlowDetail.BootstrapActions.Add(BootstrapActionDetailUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(jobFlowDetail); } } return(jobFlowDetail); }
public ReplicationDestination Unmarshall(XmlUnmarshallerContext context) { ReplicationDestination destination = new ReplicationDestination(); 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)) { destination.BucketArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { destination.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Account", targetDepth)) { destination.AccountId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AccessControlTranslation", targetDepth)) { destination.AccessControlTranslation = AccessControlTranslationUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("EncryptionConfiguration", targetDepth)) { destination.EncryptionConfiguration = EncryptionConfigurationUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("ReplicationTime", targetDepth)) { destination.ReplicationTime = ReplicationTimeUnmarshaller.Instance.Unmarshall(context); } if (context.TestExpression("Metrics", targetDepth)) { destination.Metrics = MetricsUnmarshaller.Instance.Unmarshall(context); } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(destination); } } return(destination); }
public Volume Unmarshall(XmlUnmarshallerContext context) { Volume volume = new Volume(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("volumeId", targetDepth)) { volume.VolumeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("size", targetDepth)) { volume.Size = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("snapshotId", targetDepth)) { volume.SnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("availabilityZone", targetDepth)) { volume.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { volume.State = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("createTime", targetDepth)) { volume.CreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("attachmentSet/item", targetDepth)) { volume.Attachments.Add(VolumeAttachmentUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { volume.Tags.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("volumeType", targetDepth)) { volume.VolumeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("iops", targetDepth)) { volume.Iops = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(volume); } } return(volume); }
public StorediSCSIVolume Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } StorediSCSIVolume storediSCSIVolume = new StorediSCSIVolume(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { 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; } } return(storediSCSIVolume); }
public DisableAvailabilityZonesForLoadBalancerResult Unmarshall(XmlUnmarshallerContext context) { DisableAvailabilityZonesForLoadBalancerResult disableAvailabilityZonesForLoadBalancerResult = new DisableAvailabilityZonesForLoadBalancerResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AvailabilityZones/member", targetDepth)) { disableAvailabilityZonesForLoadBalancerResult.AvailabilityZones.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(disableAvailabilityZonesForLoadBalancerResult); } } return(disableAvailabilityZonesForLoadBalancerResult); }
public StreamDescription Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } StreamDescription streamDescription = new StreamDescription(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("StreamName", targetDepth)) { context.Read(); streamDescription.StreamName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StreamARN", targetDepth)) { context.Read(); streamDescription.StreamARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StreamStatus", targetDepth)) { context.Read(); streamDescription.StreamStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Shards", targetDepth)) { context.Read(); streamDescription.Shards = new List <Shard>(); ShardUnmarshaller unmarshaller = ShardUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } streamDescription.Shards.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("HasMoreShards", targetDepth)) { context.Read(); streamDescription.HasMoreShards = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(streamDescription); } } return(streamDescription); }
public SignalExternalWorkflowExecutionInitiatedEventAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } SignalExternalWorkflowExecutionInitiatedEventAttributes signalExternalWorkflowExecutionInitiatedEventAttributes = new SignalExternalWorkflowExecutionInitiatedEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("workflowId", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("runId", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.RunId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("signalName", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.SignalName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("input", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("control", targetDepth)) { context.Read(); signalExternalWorkflowExecutionInitiatedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(signalExternalWorkflowExecutionInitiatedEventAttributes); } } return(signalExternalWorkflowExecutionInitiatedEventAttributes); }
public Activity Unmarshall(XmlUnmarshallerContext context) { Activity activity = new Activity(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ActivityId", targetDepth)) { activity.ActivityId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutoScalingGroupName", targetDepth)) { activity.AutoScalingGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { activity.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Cause", targetDepth)) { activity.Cause = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartTime", targetDepth)) { activity.StartTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EndTime", targetDepth)) { activity.EndTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { activity.StatusCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { activity.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Progress", targetDepth)) { activity.Progress = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Details", targetDepth)) { activity.Details = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(activity); } } return(activity); }
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 ElasticLoadBalancer Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } ElasticLoadBalancer elasticLoadBalancer = new ElasticLoadBalancer(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("ElasticLoadBalancerName", targetDepth)) { context.Read(); elasticLoadBalancer.ElasticLoadBalancerName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Region", targetDepth)) { context.Read(); elasticLoadBalancer.Region = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DnsName", targetDepth)) { context.Read(); elasticLoadBalancer.DnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { context.Read(); elasticLoadBalancer.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LayerId", targetDepth)) { context.Read(); elasticLoadBalancer.LayerId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { context.Read(); elasticLoadBalancer.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZones", targetDepth)) { context.Read(); elasticLoadBalancer.AvailabilityZones = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } elasticLoadBalancer.AvailabilityZones.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("SubnetIds", targetDepth)) { context.Read(); elasticLoadBalancer.SubnetIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } elasticLoadBalancer.SubnetIds.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("Ec2InstanceIds", targetDepth)) { context.Read(); elasticLoadBalancer.Ec2InstanceIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } elasticLoadBalancer.Ec2InstanceIds.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return(elasticLoadBalancer); } } return(elasticLoadBalancer); }
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 MetricAlarm Unmarshall(XmlUnmarshallerContext context) { MetricAlarm metricAlarm = new MetricAlarm(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AlarmName", targetDepth)) { metricAlarm.AlarmName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AlarmArn", targetDepth)) { metricAlarm.AlarmArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AlarmDescription", targetDepth)) { metricAlarm.AlarmDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AlarmConfigurationUpdatedTimestamp", targetDepth)) { metricAlarm.AlarmConfigurationUpdatedTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ActionsEnabled", targetDepth)) { metricAlarm.ActionsEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("OKActions/member", targetDepth)) { metricAlarm.OKActions.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("AlarmActions/member", targetDepth)) { metricAlarm.AlarmActions.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("InsufficientDataActions/member", targetDepth)) { metricAlarm.InsufficientDataActions.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("StateValue", targetDepth)) { metricAlarm.StateValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StateReason", targetDepth)) { metricAlarm.StateReason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StateReasonData", targetDepth)) { metricAlarm.StateReasonData = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StateUpdatedTimestamp", targetDepth)) { metricAlarm.StateUpdatedTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MetricName", targetDepth)) { metricAlarm.MetricName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Namespace", targetDepth)) { metricAlarm.Namespace = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Statistic", targetDepth)) { metricAlarm.Statistic = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Dimensions/member", targetDepth)) { metricAlarm.Dimensions.Add(DimensionUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Period", targetDepth)) { metricAlarm.Period = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Unit", targetDepth)) { metricAlarm.Unit = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EvaluationPeriods", targetDepth)) { metricAlarm.EvaluationPeriods = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Threshold", targetDepth)) { metricAlarm.Threshold = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ComparisonOperator", targetDepth)) { metricAlarm.ComparisonOperator = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(metricAlarm); } } return(metricAlarm); }
public GetItemResult Unmarshall(JsonUnmarshallerContext context) { GetItemResult getItemResult = new GetItemResult(); getItemResult.Item = 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("Item", targetDepth)) { getItemResult.Item = new Dictionary <String, AttributeValue>(); KeyValueUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, AttributeValue> kvp = unmarshaller.Unmarshall(context); getItemResult.Item.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("ConsumedCapacity", targetDepth)) { getItemResult.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(getItemResult); } } return(getItemResult); }