public static InstancePrivateIpAddressUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new InstancePrivateIpAddressUnmarshaller();
            }

            return(instance);
        }
Exemplo n.º 2
0
        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);
        }