public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetBucketInventoryConfigurationResponse getBucketInventoryConfigurationResponse = new GetBucketInventoryConfigurationResponse(); while (context.Read()) { if (context.get_IsStartElement()) { UnmarshallResult(context, getBucketInventoryConfigurationResponse); } } return(getBucketInventoryConfigurationResponse); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response) { int currentDepth = context.get_CurrentDepth(); int num = currentDepth + 1; if (context.get_IsStartOfDocument()) { num += 2; } response.InventoryConfiguration = new InventoryConfiguration(); while (context.Read()) { if (context.get_IsStartElement() || context.get_IsAttribute()) { if (context.TestExpression("Destination", num)) { response.InventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context); } else if (context.TestExpression("IsEnabled", num)) { response.InventoryConfiguration.IsEnabled = BoolUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("Filter", num)) { response.InventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context); } else if (context.TestExpression("Id", num)) { response.InventoryConfiguration.InventoryId = StringUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("IncludedObjectVersions", num)) { response.InventoryConfiguration.IncludedObjectVersions = StringUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("Field", num + 1)) { response.InventoryConfiguration.InventoryOptionalFields.Add(StringUnmarshaller.get_Instance().Unmarshall(context)); } else if (context.TestExpression("Schedule", num)) { response.InventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { break; } } }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetBucketInventoryConfigurationResponse response = new GetBucketInventoryConfigurationResponse(); context.AllowEmptyElementLookup.Add("SSE-S3"); while (context.Read()) { if (context.IsStartElement) { UnmarshallResult(context, response); continue; } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } response.InventoryConfiguration = new InventoryConfiguration(); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Destination", targetDepth)) { response.InventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("IsEnabled", targetDepth)) { response.InventoryConfiguration.IsEnabled = BoolUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Filter", targetDepth)) { response.InventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { response.InventoryConfiguration.InventoryId = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("IncludedObjectVersions", targetDepth)) { response.InventoryConfiguration.IncludedObjectVersions = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Field", targetDepth + 1)) { response.InventoryConfiguration.InventoryOptionalFields.Add(StringUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("Schedule", targetDepth)) { response.InventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }