All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vk.api.sdk.oneofs.BaseStickerOneOf Maven / Gradle / Ivy

Go to download

Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.

There is a newer version: 1.0.16
Show newest version
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.oneofs;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.vk.api.sdk.objects.base.StickerNew;
import com.vk.api.sdk.objects.base.StickerOld;

public class BaseStickerOneOf {
    private JsonObject data;

    private Gson gson;

    public BaseStickerOneOf(JsonObject data) {
        this.data = data;
        gson = new Gson();
    }

    public JsonObject getRaw() {
        return data;
    }

    public StickerOld getOneOf0() {
        return gson.fromJson(data.toString(), StickerOld.class);
    }

    public StickerNew getOneOf1() {
        return gson.fromJson(data.toString(), StickerNew.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy