class InvocationRequest {

    public static InvocationRequest deserialize(JsonNode[] json) {
        Preconditions.checkState(json.length == 3, "should have three elements");
        Preconditions.checkState(json[0].isTextual(), "first element should be a String");
        Preconditions.checkState(json[1].isObject(), "second element should be a Json");
        Preconditions.checkState(json[2].isTextual(), "third element should be a String");
        return new InvocationRequest(Method.Request.name(json[0].textValue()), (ObjectNode) json[1], MethodCallId.of(json[2].textValue()));
    }

    protected  InvocationRequest(Method.Request.Name method, ObjectNode parameters, MethodCallId methodCallId);

}