public ConfirmConnectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ConfirmConnectionResult confirmConnectionResult = new ConfirmConnectionResult();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("connectionState", targetDepth)) {
          context.nextToken();
          confirmConnectionResult.setConnectionState(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return confirmConnectionResult;
  }
  public Location unmarshall(JsonUnmarshallerContext context) throws Exception {
    Location location = new Location();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("locationCode", targetDepth)) {
          context.nextToken();
          location.setLocationCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("locationName", targetDepth)) {
          context.nextToken();
          location.setLocationName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return location;
  }
  public DescribeOfferingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    DescribeOfferingsResult describeOfferingsResult = new DescribeOfferingsResult();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("offerings", targetDepth)) {
          describeOfferingsResult.setOfferings(
              new ListUnmarshaller<Offering>(OfferingJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return describeOfferingsResult;
  }
  public VirtualInterface unmarshall(JsonUnmarshallerContext context) throws Exception {
    VirtualInterface virtualInterface = new VirtualInterface();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("ownerAccount", targetDepth)) {
          context.nextToken();
          virtualInterface.setOwnerAccount(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("virtualInterfaceId", targetDepth)) {
          context.nextToken();
          virtualInterface.setVirtualInterfaceId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("location", targetDepth)) {
          context.nextToken();
          virtualInterface.setLocation(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("connectionId", targetDepth)) {
          context.nextToken();
          virtualInterface.setConnectionId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("virtualInterfaceType", targetDepth)) {
          context.nextToken();
          virtualInterface.setVirtualInterfaceType(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("virtualInterfaceName", targetDepth)) {
          context.nextToken();
          virtualInterface.setVirtualInterfaceName(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("vlan", targetDepth)) {
          context.nextToken();
          virtualInterface.setVlan(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("asn", targetDepth)) {
          context.nextToken();
          virtualInterface.setAsn(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("authKey", targetDepth)) {
          context.nextToken();
          virtualInterface.setAuthKey(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("amazonAddress", targetDepth)) {
          context.nextToken();
          virtualInterface.setAmazonAddress(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("customerAddress", targetDepth)) {
          context.nextToken();
          virtualInterface.setCustomerAddress(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("virtualInterfaceState", targetDepth)) {
          context.nextToken();
          virtualInterface.setVirtualInterfaceState(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("customerRouterConfig", targetDepth)) {
          context.nextToken();
          virtualInterface.setCustomerRouterConfig(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("virtualGatewayId", targetDepth)) {
          context.nextToken();
          virtualInterface.setVirtualGatewayId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("routeFilterPrefixes", targetDepth)) {
          virtualInterface.setRouteFilterPrefixes(
              new ListUnmarshaller<RouteFilterPrefix>(
                      RouteFilterPrefixJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return virtualInterface;
  }
  public AllocateConnectionOnInterconnectResult unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    AllocateConnectionOnInterconnectResult allocateConnectionOnInterconnectResult =
        new AllocateConnectionOnInterconnectResult();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("ownerAccount", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setOwnerAccount(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("connectionId", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setConnectionId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("connectionName", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setConnectionName(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("connectionState", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setConnectionState(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("region", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setRegion(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("location", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setLocation(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("bandwidth", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setBandwidth(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("vlan", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setVlan(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("partnerName", targetDepth)) {
          context.nextToken();
          allocateConnectionOnInterconnectResult.setPartnerName(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return allocateConnectionOnInterconnectResult;
  }