Not able to get Image (Snapshot) Size
Closed this issue · 4 comments
vishalzanzrukia commented
I am trying to run below code snap.
DigitalOceanClient client = new DigitalOceanClient("token");
Snapshots snapshots = client.getAvailableSnapshots(1, 10);
snapshots.getSnapshots().stream().forEach(System.out::println);
I can see below output com.myjeeva.digitalocean.pojo.Snapshot@548a24a[id=24949980,name=ZivSumitTunServerTestOpenVAS,distribution=<null>,slug=<null>,availablePublic=false,regions=[blr1],createdDate=Thu May 18 15:23:34 IST 2017,minDiskSize=40,size=7.66,type=<null>,rateLimit=<null>]
I am able to get size
in console, but when I try access getSize()
method of Snapshot
, there is no such method.
Can we resolve this by adding getSize()
in Snapshot
class?
jeevatkm commented
Wow, you're correct Snapshot/Image has attribute
@SerializedName("size_gigabytes")
private Double size;
But no getter, setter. I will do.
jeevatkm commented
I have just published 2.12-SNAPSHOT
to OSS Sonatype, you can use this for the development.
vishalzanzrukia commented
Thanks @jeevatkm
jeevatkm commented
Releasing it today.