Gson LinkedTreeMap Exception while converting to GoogleChat Card

My Sample code, I am trying for converting string to Card.class, but i am getting this exception. I have searched the stackoverflow, and found that linkedmaptree exception can be removed if the class is specified. But I am still getting the error.

reference for library https://googleapis.dev/java/google-api-services-chat/latest/

public class Main {
    public static void main (String args[]) throws Exception {
        Message msg= new Message();
        String request="{header={title=\"hello\"}}";
        msg.setCards(Collections.singletonList(GsonUtils.GSON.fromJson(request, Card.class)));

    }
}




java.lang.IllegalArgumentException: Can not set com.google.api.services.chat.v1.model.CardHeader field com.google.api.services.chat.v1.model.Card.header to com.google.gson.internal.LinkedTreeMap
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:1.8.0_121]
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:1.8.0_121]
    at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) ~[?:1.8.0_121]
    at java.lang.reflect.Field.set(Field.java:764) ~[?:1.8.0_121]
    at com.google.api.client.util.FieldInfo.setFieldValue(FieldInfo.java:275) ~[scalable-node.jar:?]
    at com.google.api.client.util.FieldInfo.setValue(FieldInfo.java:231) ~[scalable-node.jar:?]
    at com.google.api.client.util.GenericData.put(GenericData.java:98) ~[scalable-node.jar:?]
    at com.google.api.client.util.GenericData.put(GenericData.java:43) ~[scalable-node.jar:?]
    at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:188) ~[scalable-node.jar:?]
    at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[scalable-node.jar:?]
    at io.gsonfire.gson.HooksTypeAdapter.deserialize(HooksTypeAdapter.java:86) ~[scalable-node.jar:?]
    at io.gsonfire.gson.HooksTypeAdapter.read(HooksTypeAdapter.java:54) ~[scalable-node.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:927) ~[scalable-node.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:994) ~[scalable-node.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:967) ~[scalable-node.jar:?]
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum