public static GroupIdentifierUnmarshaller GetInstance() { if (instance == null) { instance = new GroupIdentifierUnmarshaller(); } return(instance); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeNetworkInterfaceAttributeResponse response = new DescribeNetworkInterfaceAttributeResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("networkInterfaceId", targetDepth)) { response.NetworkInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("description/value", targetDepth)) { response.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("sourceDestCheck/value", targetDepth)) { response.SourceDestCheck = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { response.Groups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("attachment", targetDepth)) { response.Attachment = NetworkInterfaceAttachmentUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return(response); }
public LaunchSpecification Unmarshall(XmlUnmarshallerContext context) { LaunchSpecification launchSpecification = new LaunchSpecification(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("imageId", targetDepth)) { launchSpecification.ImageId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("keyName", targetDepth)) { launchSpecification.KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { launchSpecification.AllSecurityGroups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("groupSet/item/groupName", targetDepth)) { launchSpecification.SecurityGroups.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("userData", targetDepth)) { launchSpecification.UserData = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("addressingType", targetDepth)) { launchSpecification.AddressingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceType", targetDepth)) { launchSpecification.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("placement", targetDepth)) { launchSpecification.Placement = SpotPlacementUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("kernelId", targetDepth)) { launchSpecification.KernelId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ramdiskId", targetDepth)) { launchSpecification.RamdiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("blockDeviceMapping/item", targetDepth)) { launchSpecification.BlockDeviceMappings.Add(BlockDeviceMappingUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("monitoring/enabled", targetDepth)) { launchSpecification.MonitoringEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { launchSpecification.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceSet/item", targetDepth)) { launchSpecification.NetworkInterfaces.Add(InstanceNetworkInterfaceSpecificationUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("iamInstanceProfile", targetDepth)) { launchSpecification.IamInstanceProfile = IamInstanceProfileSpecificationUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ebsOptimized", targetDepth)) { launchSpecification.EbsOptimized = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(launchSpecification); } } return(launchSpecification); }
public Instance Unmarshall(XmlUnmarshallerContext context) { Instance instance = new Instance(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("instanceId", targetDepth)) { instance.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("imageId", targetDepth)) { instance.ImageId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceState", targetDepth)) { instance.State = InstanceStateUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateDnsName", targetDepth)) { instance.PrivateDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("dnsName", targetDepth)) { instance.PublicDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("reason", targetDepth)) { instance.StateTransitionReason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("keyName", targetDepth)) { instance.KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("amiLaunchIndex", targetDepth)) { instance.AmiLaunchIndex = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("productCodes/item", targetDepth)) { instance.ProductCodes.Add(ProductCodeUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("instanceType", targetDepth)) { instance.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("launchTime", targetDepth)) { instance.LaunchTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("placement", targetDepth)) { instance.Placement = PlacementUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("kernelId", targetDepth)) { instance.KernelId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ramdiskId", targetDepth)) { instance.RamdiskId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("platform", targetDepth)) { instance.Platform = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("monitoring", targetDepth)) { instance.Monitoring = MonitoringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("subnetId", targetDepth)) { instance.SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("vpcId", targetDepth)) { instance.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddress", targetDepth)) { instance.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ipAddress", targetDepth)) { instance.PublicIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("stateReason", targetDepth)) { instance.StateReason = StateReasonUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("architecture", targetDepth)) { instance.Architecture = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("rootDeviceType", targetDepth)) { instance.RootDeviceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("rootDeviceName", targetDepth)) { instance.RootDeviceName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("blockDeviceMapping/item", targetDepth)) { instance.BlockDeviceMappings.Add(InstanceBlockDeviceMappingUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("virtualizationType", targetDepth)) { instance.VirtualizationType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("instanceLifecycle", targetDepth)) { instance.InstanceLifecycle = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("spotInstanceRequestId", targetDepth)) { instance.SpotInstanceRequestId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("clientToken", targetDepth)) { instance.ClientToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { instance.Tags.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { instance.SecurityGroups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("sourceDestCheck", targetDepth)) { instance.SourceDestCheck = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("hypervisor", targetDepth)) { instance.Hypervisor = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceSet/item", targetDepth)) { instance.NetworkInterfaces.Add(InstanceNetworkInterfaceUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("iamInstanceProfile", targetDepth)) { instance.IamInstanceProfile = IamInstanceProfileUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ebsOptimized", targetDepth)) { instance.EbsOptimized = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("sriovNetSupport", targetDepth)) { instance.SriovNetSupport = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(instance); } } return(instance); }
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); }
public Reservation Unmarshall(XmlUnmarshallerContext context) { Reservation reservation = new Reservation(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("reservationId", targetDepth)) { reservation.ReservationId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ownerId", targetDepth)) { reservation.OwnerId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("requesterId", targetDepth)) { reservation.RequesterId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("groupSet/item", targetDepth)) { reservation.Groups.Add(GroupIdentifierUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("groupSet/item/groupName", targetDepth)) { reservation.GroupNames.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("instancesSet/item", targetDepth)) { reservation.Instances.Add(InstanceUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservation); } } return(reservation); }