
com.contentstack.cms.stack.AssetResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cms Show documentation
Show all versions of cms Show documentation
Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
API-first approach
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