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

com.contentstack.cms.stack.AssetResponse Maven / Gradle / Ivy

Go to download

Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an API-first approach

There is a newer version: 1.6.1
Show newest version
package com.contentstack.cms.stack;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import java.util.Map;

public class AssetResponse {
    @SerializedName("asset")
    private Map rawJson; // Store the full asset JSON

    private AssetPojo assetPojo; 

    public AssetPojo getAssetPojo() {
        if (assetPojo == null && rawJson != null) {
            assetPojo = new Gson().fromJson(new Gson().toJson(rawJson), AssetPojo.class);
        }
        return assetPojo;
    }
    public Map getRawJson() {
        return rawJson;
    }
    @Override
    public String toString() {
        return new com.google.gson.GsonBuilder().setPrettyPrinting().create().toJson(this);
    }
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy