public static VpcPeeringConnectionVpcInfoUnmarshaller GetInstance() { if (instance == null) { instance = new VpcPeeringConnectionVpcInfoUnmarshaller(); } return(instance); }
public VpcPeeringConnection Unmarshall(XmlUnmarshallerContext context) { VpcPeeringConnection vpcPeeringConnection = new VpcPeeringConnection(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("accepterVpcInfo", targetDepth)) { vpcPeeringConnection.AccepterVpcInfo = VpcPeeringConnectionVpcInfoUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("expirationTime", targetDepth)) { vpcPeeringConnection.ExpirationTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("requesterVpcInfo", targetDepth)) { vpcPeeringConnection.RequesterVpcInfo = VpcPeeringConnectionVpcInfoUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { vpcPeeringConnection.Status = VpcPeeringConnectionStateReasonUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { vpcPeeringConnection.Tags.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("vpcPeeringConnectionId", targetDepth)) { vpcPeeringConnection.VpcPeeringConnectionId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(vpcPeeringConnection); } } return(vpcPeeringConnection); }