public static InstanceNetworkInterfaceAssociationUnmarshaller GetInstance() { if (instance == null) { instance = new InstanceNetworkInterfaceAssociationUnmarshaller(); } return(instance); }
public InstancePrivateIpAddress Unmarshall(XmlUnmarshallerContext context) { InstancePrivateIpAddress instancePrivateIpAddress = new InstancePrivateIpAddress(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("privateIpAddress", targetDepth)) { instancePrivateIpAddress.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateDnsName", targetDepth)) { instancePrivateIpAddress.PrivateDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("primary", targetDepth)) { instancePrivateIpAddress.Primary = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("association", targetDepth)) { instancePrivateIpAddress.Association = InstanceNetworkInterfaceAssociationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(instancePrivateIpAddress); } } return(instancePrivateIpAddress); }
public InstanceNetworkInterface Unmarshall(XmlUnmarshallerContext context) { InstanceNetworkInterface instanceNetworkInterface = new InstanceNetworkInterface(); 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)) { instanceNetworkInterface.NetworkInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { instanceNetworkInterface.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("vpcId", targetDepth)) { instanceNetworkInterface.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { instanceNetworkInterface.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ownerId", targetDepth)) { instanceNetworkInterface.OwnerId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { instanceNetworkInterface.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddress", targetDepth)) { instanceNetworkInterface.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateDnsName", targetDepth)) { instanceNetworkInterface.PrivateDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("sourceDestCheck", targetDepth)) { instanceNetworkInterface.SourceDestCheck = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { instanceNetworkInterface.Groups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("attachment", targetDepth)) { instanceNetworkInterface.Attachment = InstanceNetworkInterfaceAttachmentUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("association", targetDepth)) { instanceNetworkInterface.Association = InstanceNetworkInterfaceAssociationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddressesSet/item", targetDepth)) { instanceNetworkInterface.PrivateIpAddresses.Add(InstancePrivateIpAddressUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(instanceNetworkInterface); } } return(instanceNetworkInterface); }