/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateNetworkInterfacePermissionResponse response = new CreateNetworkInterfacePermissionResponse(); 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("interfacePermission", targetDepth)) { var unmarshaller = NetworkInterfacePermissionUnmarshaller.Instance; response.InterfacePermission = unmarshaller.Unmarshall(context); continue; } } } return(response); }
public static CreateNetworkInterfacePermissionResponse Unmarshall(UnmarshallerContext context) { CreateNetworkInterfacePermissionResponse createNetworkInterfacePermissionResponse = new CreateNetworkInterfacePermissionResponse(); createNetworkInterfacePermissionResponse.HttpResponse = context.HttpResponse; createNetworkInterfacePermissionResponse.RequestId = context.StringValue("CreateNetworkInterfacePermission.RequestId"); CreateNetworkInterfacePermissionResponse.CreateNetworkInterfacePermission_NetworkInterfacePermission networkInterfacePermission = new CreateNetworkInterfacePermissionResponse.CreateNetworkInterfacePermission_NetworkInterfacePermission(); networkInterfacePermission.AccountId = context.LongValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.AccountId"); networkInterfacePermission.ServiceName = context.StringValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.ServiceName"); networkInterfacePermission.NetworkInterfaceId = context.StringValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.NetworkInterfaceId"); networkInterfacePermission.NetworkInterfacePermissionId = context.StringValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.NetworkInterfacePermissionId"); networkInterfacePermission.Permission = context.StringValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.Permission"); networkInterfacePermission.PermissionState = context.StringValue("CreateNetworkInterfacePermission.NetworkInterfacePermission.PermissionState"); createNetworkInterfacePermissionResponse.NetworkInterfacePermission = networkInterfacePermission; return(createNetworkInterfacePermissionResponse); }