@Override public void deserialize(ProtocolBuffer buffer) { flags = buffer.readInt(); id = buffer.readInt(); from_id = buffer.readInt(); to_id = (TLPeer) buffer.readTLObject(APIContext.getInstance()); date = buffer.readInt(); action = (TLMessageAction) buffer.readTLObject(APIContext.getInstance()); }
@Override public void deserialize(ProtocolBuffer buffer) { chat_id = buffer.readInt(); admin_id = buffer.readInt(); participants = (TLVector<TLChatParticipant>) buffer.readTLObject(APIContext.getInstance()); version = buffer.readInt(); }
@Override public void deserialize(ProtocolBuffer buffer) { random_id = buffer.readLong(); chat_id = buffer.readInt(); date = buffer.readInt(); bytes = buffer.readBytes(); file = (TLEncryptedFile) buffer.readTLObject(APIContext.getInstance()); }
public static WindowsAppLink loadJSON(String json, APIContext context) { WindowsAppLink windowsAppLink = getGson().fromJson(json, WindowsAppLink.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); JsonElement o2 = parser.parse(windowsAppLink.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } if (!o1.equals(o2)) { context.log("[Warning] When parsing response, object is not consistent with JSON:"); context.log("[JSON]" + o1); context.log("[Object]" + o2); } ; } windowsAppLink.context = context; windowsAppLink.rawValue = json; return windowsAppLink; }
public static AdsInsights loadJSON(String json, APIContext context) { AdsInsights adsInsights = getGson().fromJson(json, AdsInsights.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); JsonElement o2 = parser.parse(adsInsights.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } if (!o1.equals(o2)) { context.log("[Warning] When parsing response, object is not consistent with JSON:"); context.log("[JSON]" + o1); context.log("[Object]" + o2); } ; } adsInsights.mContext = context; adsInsights.rawValue = json; return adsInsights; }
public static TargetingProductAudienceSpec loadJSON(String json, APIContext context) { TargetingProductAudienceSpec targetingProductAudienceSpec = getGson().fromJson(json, TargetingProductAudienceSpec.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); JsonElement o2 = parser.parse(targetingProductAudienceSpec.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } if (!o1.equals(o2)) { context.log("[Warning] When parsing response, object is not consistent with JSON:"); context.log("[JSON]" + o1); context.log("[Object]" + o2); } ; } targetingProductAudienceSpec.context = context; targetingProductAudienceSpec.rawValue = json; return targetingProductAudienceSpec; }
public static ProfilePictureSource loadJSON(String json, APIContext context) { ProfilePictureSource profilePictureSource = getGson().fromJson(json, ProfilePictureSource.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); JsonElement o2 = parser.parse(profilePictureSource.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } if (!o1.equals(o2)) { context.log("[Warning] When parsing response, object is not consistent with JSON:"); context.log("[JSON]" + o1); context.log("[Object]" + o2); } ; } profilePictureSource.mContext = context; profilePictureSource.rawValue = json; return profilePictureSource; }
@Override public void deserialize(ProtocolBuffer buffer) { messages = (TLVector<TLMessage>) buffer.readTLObject(APIContext.getInstance()); chats = (TLVector<TLChat>) buffer.readTLObject(APIContext.getInstance()); users = (TLVector<TLUser>) buffer.readTLObject(APIContext.getInstance()); }