public GCMChannelRequest unmarshall(JsonUnmarshallerContext context) throws Exception {
    GCMChannelRequest gCMChannelRequest = new GCMChannelRequest();

    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("ApiKey", targetDepth)) {
          context.nextToken();
          gCMChannelRequest.setApiKey(context.getUnmarshaller(String.class).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 gCMChannelRequest;
  }
  public EndpointLocation unmarshall(JsonUnmarshallerContext context) throws Exception {
    EndpointLocation endpointLocation = new EndpointLocation();

    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("City", targetDepth)) {
          context.nextToken();
          endpointLocation.setCity(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("Country", targetDepth)) {
          context.nextToken();
          endpointLocation.setCountry(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("Latitude", targetDepth)) {
          context.nextToken();
          endpointLocation.setLatitude(context.getUnmarshaller(Double.class).unmarshall(context));
        }
        if (context.testExpression("Longitude", targetDepth)) {
          context.nextToken();
          endpointLocation.setLongitude(context.getUnmarshaller(Double.class).unmarshall(context));
        }
        if (context.testExpression("PostalCode", targetDepth)) {
          context.nextToken();
          endpointLocation.setPostalCode(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("Region", targetDepth)) {
          context.nextToken();
          endpointLocation.setRegion(context.getUnmarshaller(String.class).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 endpointLocation;
  }