/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ModifyUserGroupResponse response = new ModifyUserGroupResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("ModifyUserGroupResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ModifyUserGroupResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Engine", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Engine = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinimumEngineVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.MinimumEngineVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PendingChanges", targetDepth)) { var unmarshaller = UserGroupPendingChangesUnmarshaller.Instance; response.PendingChanges = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReplicationGroups/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.ReplicationGroups.Add(item); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UserGroupId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.UserGroupId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UserIds/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.UserIds.Add(item); continue; } } } return; }