public InventoryS3BucketDestination Unmarshall(XmlUnmarshallerContext context) { InventoryS3BucketDestination condition = new InventoryS3BucketDestination(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AccountId", targetDepth)) { condition.AccountId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Bucket", targetDepth)) { condition.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Format", targetDepth)) { condition.InventoryFormat = InventoryFormat.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Prefix", targetDepth)) { condition.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Encryption", targetDepth)) { condition.InventoryEncryption = InventoryEncryptionUnmarshaller.Instance.Unmarshall(context); } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(condition); } } return(condition); }
public InventoryS3BucketDestination Unmarshall(XmlUnmarshallerContext context) { InventoryS3BucketDestination inventoryS3BucketDestination = new InventoryS3BucketDestination(); 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("AccountId", num)) { inventoryS3BucketDestination.AccountId = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Bucket", num)) { inventoryS3BucketDestination.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); } else if (context.TestExpression("Format", num)) { inventoryS3BucketDestination.InventoryFormat = InventoryFormat.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context)); } else if (context.TestExpression("Prefix", num)) { inventoryS3BucketDestination.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { return(inventoryS3BucketDestination); } } return(inventoryS3BucketDestination); }