public enum ActionType {
  @SerializedName("create")
  CREATE("create"),

  @SerializedName("reboot")
  REBOOT("reboot"),

  @SerializedName("power_cycle")
  POWER_CYCLE("power_cycle"),

  @SerializedName("shutdown")
  SHUTDOWN("shutdown"),

  @SerializedName("power_off")
  POWER_OFF("power_off"),

  @SerializedName("power_on")
  POWER_ON("power_on"),

  @SerializedName("password_reset")
  PASSWORD_RESET("password_reset"),

  @SerializedName("resize")
  RESIZE("resize"),

  @SerializedName("restore")
  RESTORE("restore"),

  @SerializedName("rebuild")
  REBUILD("rebuild"),

  @SerializedName("rename")
  RENAME("rename"),

  @SerializedName("change_kernel")
  CHANGE_KERNEL("change_kernel"),

  @SerializedName("enable_ipv6")
  ENABLE_IPV6("enable_ipv6"),

  @SerializedName("enable_backups")
  ENABLE_BACKUPS("enable_backups"),

  @SerializedName("disable_backups")
  DISABLE_BACKUPS("disable_backups"),

  @SerializedName("enable_private_networking")
  ENABLE_PRIVATE_NETWORKING("enable_private_networking"),

  @SerializedName("snapshot")
  SNAPSHOT("snapshot"),

  @SerializedName("backup")
  BACKUP("backup"),

  @SerializedName("transfer")
  TRANSFER("transfer"),

  @SerializedName("convert")
  CONVERT("convert"),

  @SerializedName("convert_to_snapshot")
  CONVERT_TO_SNAPSHOT("convert_to_snapshot"),

  @SerializedName("distribution")
  DISTRIBUTION("distribution"),

  @SerializedName("application")
  APPLICATION("application"),

  @SerializedName("assign_ip")
  ASSIGN_FLOATING_IP("assign_ip"),

  @SerializedName("unassign_ip")
  UNASSIGN_FLOATING_IP("unassign_ip"),

  @SerializedName("reserve_ip")
  RESERVE_FLOATING_IP("reserve_ip"),

  @SerializedName(
      value = "attach",
      alternate = {"attach_volume"})
  ATTACH("attach"),

  @SerializedName(
      value = "detach",
      alternate = {"detach_volume"})
  DETACH("detach");

  private String value;

  private ActionType(String value) {
    this.value = value;
  }

  @Override
  public String toString() {
    return this.value;
  }

  public static ActionType fromValue(String value) {
    if (StringUtils.isBlank(value)) {
      throw new IllegalArgumentException("Value cannot be null or empty!");
    }

    for (ActionType dat : ActionType.values()) {
      if (value.equalsIgnoreCase(dat.value)) {
        return dat;
      }
    }

    throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
  }
} public class DigitalOceanException extends Exception {

  static final long serialVersionUID = -925220451573356906L;

  private String id;

  private int httpStatusCode;

  public DigitalOceanException(String msg) {
    super(msg);
  }

  public DigitalOceanException(String msg, Throwable t) {
    super(msg, t);
  }

  public DigitalOceanException(String msg, String id, int statusCode) {
    super(msg);
    this.id = id;
    this.httpStatusCode = statusCode;
  }

  /** @return the id */
  public String getId() {
    return id;
  }

  /** @return the httpStatusCode */
  public int getHttpStatusCode() {
    return httpStatusCode;
  }
} public class RequestUnsuccessfulException extends Exception {

  private static final long serialVersionUID = 6949447731150358499L;

  public RequestUnsuccessfulException(String msg) {
    super(msg);
  }

  public RequestUnsuccessfulException(String msg, Throwable t) {
    super(msg, t);
  }
} public class Account extends Base {

  private static final long serialVersionUID = 5951525501167424430L;

  private String email;

  private String uuid;

  @SerializedName("droplet_limit")
  private Integer dropletLimit;

  @SerializedName("email_verified")
  private boolean isEmailVerified;

  private String status;

  @SerializedName("status_message")
  private String statusMessage;

  @SerializedName("floating_ip_limit")
  private Integer floatingIPLimit;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the email */
  public String getEmail() {
    return email;
  }

  /** @param email the email to set */
  public void setEmail(String email) {
    this.email = email;
  }

  /** @return the uuid */
  public String getUuid() {
    return uuid;
  }

  /** @param uuid the uuid to set */
  public void setUuid(String uuid) {
    this.uuid = uuid;
  }

  /** @return the dropletLimit */
  public Integer getDropletLimit() {
    return dropletLimit;
  }

  /** @param dropletLimit the dropletLimit to set */
  public void setDropletLimit(Integer dropletLimit) {
    this.dropletLimit = dropletLimit;
  }

  /** @return the isEmailVerified */
  public boolean isEmailVerified() {
    return isEmailVerified;
  }

  /** @param isEmailVerified the isEmailVerified to set */
  public void setEmailVerified(boolean isEmailVerified) {
    this.isEmailVerified = isEmailVerified;
  }

  /** @return the status */
  public String getStatus() {
    return status;
  }

  /** @param status the status to set */
  public void setStatus(String status) {
    this.status = status;
  }

  /** @return the statusMessage */
  public String getStatusMessage() {
    return statusMessage;
  }

  /** @param statusMessage the statusMessage to set */
  public void setStatusMessage(String statusMessage) {
    this.statusMessage = statusMessage;
  }

  /** @return the floatingIPLimit */
  public Integer getFloatingIPLimit() {
    return floatingIPLimit;
  }

  /** @param floatingIPLimit the floatingIPLimit to set */
  public void setFloatingIPLimit(Integer floatingIPLimit) {
    this.floatingIPLimit = floatingIPLimit;
  }
} public class Action extends Base {

  private static final long serialVersionUID = 5951525501167424430L;

  private Integer id;

  @SerializedName("resource_id")
  private Long resourceId;

  private ActionStatus status;

  private ActionType type;

  @SerializedName("resource_type")
  private ResourceType resourceType;

  @SerializedName("started_at")
  private Date startedAt;

  @SerializedName("completed_at")
  private Date completedAt;

  private Region region;

  @SerializedName("region_slug")
  private String regionSlug;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public Integer getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(Integer id) {
    this.id = id;
  }

  /** @return the resourceId */
  public Long getResourceId() {
    return resourceId;
  }

  /** @param resourceId the resourceId to set */
  public void setResourceId(Long resourceId) {
    this.resourceId = resourceId;
  }

  /** @return the status */
  public ActionStatus getStatus() {
    return status;
  }

  /** @param status the status to set */
  public void setStatus(ActionStatus status) {
    this.status = status;
  }

  /** @return the type */
  public ActionType getType() {
    return type;
  }

  /** @param type the type to set */
  public void setType(ActionType type) {
    this.type = type;
  }

  /** @return the resourceType */
  public ResourceType getResourceType() {
    return resourceType;
  }

  /** @param resourceType the resourceType to set */
  public void setResourceType(ResourceType resourceType) {
    this.resourceType = resourceType;
  }

  /** @return the startedAt */
  public Date getStartedAt() {
    return startedAt;
  }

  /** @param startedAt the startedAt to set */
  public void setStartedAt(Date startedAt) {
    this.startedAt = startedAt;
  }

  /** @return the completedAt */
  public Date getCompletedAt() {
    return completedAt;
  }

  /** @param completedAt the completedAt to set */
  public void setCompletedAt(Date completedAt) {
    this.completedAt = completedAt;
  }

  /** @return the region */
  public Region getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(Region region) {
    this.region = region;
  }

  /** @return the regionSlug */
  public String getRegionSlug() {
    return regionSlug;
  }

  /** @param regionSlug the regionSlug to set */
  public void setRegionSlug(String regionSlug) {
    this.regionSlug = regionSlug;
  }
} public class Actions extends Base {

  private static final long serialVersionUID = 7510681873537152716L;

  private List<Action> actions;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the actions */
  public List<Action> getActions() {
    return actions;
  }

  /** @param actions the actions to set */
  public void setActions(List<Action> actions) {
    this.actions = actions;
  }
} public class Backups extends Base {

  private static final long serialVersionUID = 1799833528333920392L;

  List<Backup> backups;

  /** @return the backups */
  public List<Backup> getBackups() {
    return backups;
  }

  /** @param backups the backups to set */
  public void setBackups(List<Backup> backups) {
    this.backups = backups;
  }
} public class Certificate extends Base {

  private static final long serialVersionUID = -7525532097995479493L;

  private String id;

  @Expose private String name;

  @SerializedName("not_after")
  private String notAfter;

  @SerializedName("sha1_fingerprint")
  private String sha1Fingerprint;

  @SerializedName("created_at")
  private Date createdDate;

  @Expose
  @SerializedName("private_key")
  private String privateKey;

  @Expose
  @SerializedName("leaf_certificate")
  private String leafCertificate;

  @Expose
  @SerializedName("certificate_chain")
  private String certificateChain;

  @Expose private CertificateState state;

  @Expose
  @SerializedName("dns_names")
  private List<String> dnsNames;

  @Expose private String type;

  /** Default Constructor. */
  public Certificate() {
    // default constructor
  }

  /**
   * Constructor for new certificate create request.
   *
   * @param name the name for the certificate
   * @param privateKey the private key
   * @param leafCertificate the leaf certificate
   * @param certificateChain the certificate chain
   */
  public Certificate(
      String name, String privateKey, String leafCertificate, String certificateChain) {
    this.name = name;
    this.privateKey = privateKey;
    this.leafCertificate = leafCertificate;
    this.certificateChain = certificateChain;
  }

  /**
   * Constructor for new Let's Encrypt certificate create request.
   *
   * @param name the name for the certificate
   * @param type the type of the certificate
   * @param dnsNames list of dns names
   */
  public Certificate(String name, String type, List<String> dnsNames) {
    this.name = name;
    this.type = type;
    this.dnsNames = dnsNames;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public String getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(String id) {
    this.id = id;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the notAfter */
  public String getNotAfter() {
    return notAfter;
  }

  /** @param notAfter the notAfter to set */
  public void setNotAfter(String notAfter) {
    this.notAfter = notAfter;
  }

  /** @return the sha1Fingerprint */
  public String getSha1Fingerprint() {
    return sha1Fingerprint;
  }

  /** @param sha1Fingerprint the sha1Fingerprint to set */
  public void setSha1Fingerprint(String sha1Fingerprint) {
    this.sha1Fingerprint = sha1Fingerprint;
  }

  /** @return the createdDate */
  public Date getCreatedDate() {
    return createdDate;
  }

  /** @param createdDate the createdDate to set */
  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  /** @return the privateKey */
  public String getPrivateKey() {
    return privateKey;
  }

  /** @param privateKey the privateKey to set */
  public void setPrivateKey(String privateKey) {
    this.privateKey = privateKey;
  }

  /** @return the leafCertificate */
  public String getLeafCertificate() {
    return leafCertificate;
  }

  /** @param leafCertificate the leafCertificate to set */
  public void setLeafCertificate(String leafCertificate) {
    this.leafCertificate = leafCertificate;
  }

  /** @return the certificateChain */
  public String getCertificateChain() {
    return certificateChain;
  }

  /** @param certificateChain the certificateChain to set */
  public void setCertificateChain(String certificateChain) {
    this.certificateChain = certificateChain;
  }

  /** @return the state */
  public CertificateState getState() {
    return state;
  }

  /** @param state the state to set */
  public void setState(CertificateState state) {
    this.state = state;
  }

  /** @return the dnsNames */
  public List<String> getDnsNames() {
    return dnsNames;
  }

  /** @param dnsNames the dnsNames to set */
  public void setDnsNames(List<String> dnsNames) {
    this.dnsNames = dnsNames;
  }

  /** @return the type */
  public String getType() {
    return type;
  }

  /** @param type the type to set */
  public void setType(String type) {
    this.type = type;
  }
} public class Certificates extends Base {

  private static final long serialVersionUID = -6122243268483320321L;

  private List<Certificate> certificates;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the certificates */
  public List<Certificate> getCertificates() {
    return certificates;
  }

  /** @param certificates the certificates to set */
  public void setCertificates(List<Certificate> certificates) {
    this.certificates = certificates;
  }
} public class Delete extends Response {

  private static final long serialVersionUID = -3552374545843268569L;

  /** Default Constructor */
  public Delete() {
    // Default Constructor
  }

  /**
   * Parameterized Constructor
   *
   * @param isRequestSuccess whether delete is success or not
   */
  public Delete(Boolean isRequestSuccess) {
    super(isRequestSuccess);
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }
} public class Domain extends Base {

  private static final long serialVersionUID = 5958407274594550472L;

  @Expose private String name;

  @SerializedName("ttl")
  private Integer timeToLive;

  @SerializedName("zone_file")
  private String zoneFile;

  @Expose
  @SerializedName("ip_address")
  private String ipAddress;

  public Domain() {
    // Default Constructor
  }

  public Domain(String name, String ipAddress) {
    this.name = name;
    this.ipAddress = ipAddress;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the timeToLive */
  public Integer getTimeToLive() {
    return timeToLive;
  }

  /** @param timeToLive the timeToLive to set */
  public void setTimeToLive(Integer timeToLive) {
    this.timeToLive = timeToLive;
  }

  /** @return the zoneFile */
  public String getZoneFile() {
    return zoneFile;
  }

  /** @param zoneFile the zoneFile to set */
  public void setZoneFile(String zoneFile) {
    this.zoneFile = zoneFile;
  }

  /** @return the ipAddress */
  public String getIpAddress() {
    return ipAddress;
  }

  /** @param ipAddress the ipAddress to set */
  public void setIpAddress(String ipAddress) {
    this.ipAddress = ipAddress;
  }
} public class DomainRecord extends Base {

  private static final long serialVersionUID = 5656335027984698525L;

  private Integer id;

  @Expose private String type;

  @Expose private String name;

  @Expose private String data;

  @Expose private Integer priority;

  @Expose private Integer port;

  @Expose private Integer weight;

  @Expose private Integer ttl;

  @Expose private Integer flags;

  @Expose private CaaTagType tag;

  public DomainRecord() {
    // Default Constructor
  }

  public DomainRecord(String name) {
    this.name = name;
  }

  public DomainRecord(String name, String type) {
    this(name, null, type, null, null, null);
  }

  public DomainRecord(String name, String data, String type) {
    this(name, data, type, null, null, null);
  }

  public DomainRecord(
      String name, String data, String type, Integer priority, Integer port, Integer weight) {
    this(name, data, type, priority, null, null, null);
  }

  public DomainRecord(
      String name,
      String data,
      String type,
      Integer priority,
      Integer port,
      Integer weight,
      Integer ttl) {
    this.name = name;
    this.data = data;
    this.type = type;
    this.priority = priority;
    this.port = port;
    this.weight = weight;
    this.ttl = ttl;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public Integer getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(Integer id) {
    this.id = id;
  }

  /** @return the type */
  public String getType() {
    return type;
  }

  /** @param type the type to set */
  public void setType(String type) {
    this.type = type;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the data */
  public String getData() {
    return data;
  }

  /** @param data the data to set */
  public void setData(String data) {
    this.data = data;
  }

  /** @return the priority */
  public Integer getPriority() {
    return priority;
  }

  /** @param priority the priority to set */
  public void setPriority(Integer priority) {
    this.priority = priority;
  }

  /** @return the port */
  public Integer getPort() {
    return port;
  }

  /** @param port the port to set */
  public void setPort(Integer port) {
    this.port = port;
  }

  /** @return the weight */
  public Integer getWeight() {
    return weight;
  }

  /** @param weight the weight to set */
  public void setWeight(Integer weight) {
    this.weight = weight;
  }

  /** @return the TTL, in seconds */
  public Integer getTtl() {
    return ttl;
  }

  /** @param ttl the TTL, in seconds */
  public void setTtl(Integer ttl) {
    this.ttl = ttl;
  }

  /** @return the flags */
  public Integer getFlags() {
    return flags;
  }

  /** @param flags the flags to set */
  public void setFlags(Integer flags) {
    this.flags = flags;
  }

  /** @return the tag */
  public CaaTagType getTag() {
    return tag;
  }

  /** @param tag the tag to set */
  public void setTag(CaaTagType tag) {
    this.tag = tag;
  }
} public class DomainRecords extends Base {

  private static final long serialVersionUID = -3070769129688315651L;

  @SerializedName("domain_records")
  private List<DomainRecord> domainRecords;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the domainRecords */
  public List<DomainRecord> getDomainRecords() {
    return domainRecords;
  }

  /** @param domainRecords the domainRecords to set */
  public void setDomainRecords(List<DomainRecord> domainRecords) {
    this.domainRecords = domainRecords;
  }
} public class Domains extends Base {

  private static final long serialVersionUID = 403429426585596826L;

  private List<Domain> domains;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the domains */
  public List<Domain> getDomains() {
    return domains;
  }

  /** @param domains the domains to set */
  public void setDomains(List<Domain> domains) {
    this.domains = domains;
  }
} public class Droplet extends Base {

  private static final long serialVersionUID = 1110964622197874436L;

  private Integer id;

  private String name;

  private List<String> names;

  @SerializedName("memory")
  private Integer memorySizeInMb;

  @SerializedName("vcpus")
  private Integer virutalCpuCount;

  @SerializedName("disk")
  private Integer diskSize;

  private Region region;

  private Image image;

  @SerializedName("size_slug")
  private String size;

  private boolean locked;

  private DropletStatus status;

  private Networks networks;

  private Kernel kernel;

  @SerializedName("created_at")
  private Date createdDate;

  private List<String> features;

  private Boolean enableBackup;

  private Boolean enableIpv6;

  private Boolean enablePrivateNetworking;

  @SerializedName("backup_ids")
  private List<Integer> backupIds;

  @SerializedName("snapshot_ids")
  private List<Integer> snapshotIds;

  @SerializedName("ssh_keys")
  private List<Key> keys;

  @SerializedName("user_data")
  private String userData;

  @SerializedName("volume_ids")
  private List<String> volumeIds;

  private List<String> tags;

  @SerializedName("monitoring")
  private Boolean installMonitoring;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return true if droplet is active */
  public boolean isActive() {
    return DropletStatus.ACTIVE == status;
  }

  /** @return true if droplet is new, meaning it's booting up */
  public boolean isNew() {
    return DropletStatus.NEW == status;
  }

  /** @return true if droplet is turned off */
  public boolean isOff() {
    return DropletStatus.OFF == status;
  }

  /** @return true if droplet is archived */
  public boolean isArchived() {
    return DropletStatus.ARCHIVE == status;
  }

  /** @return the id */
  public Integer getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(Integer id) {
    this.id = id;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the names */
  public List<String> getNames() {
    return names;
  }

  /** @param names the names to set */
  public void setNames(List<String> names) {
    this.names = names;
  }

  /** @return the memorySizeInMb */
  public Integer getMemorySizeInMb() {
    return memorySizeInMb;
  }

  /** @param memorySizeInMb the memorySizeInMb to set */
  public void setMemorySizeInMb(Integer memorySizeInMb) {
    this.memorySizeInMb = memorySizeInMb;
  }

  /** @return the virutalCpuCount */
  public Integer getVirutalCpuCount() {
    return virutalCpuCount;
  }

  /** @param virutalCpuCount the virutalCpuCount to set */
  public void setVirutalCpuCount(Integer virutalCpuCount) {
    this.virutalCpuCount = virutalCpuCount;
  }

  /** @return the diskSize */
  public Integer getDiskSize() {
    return diskSize;
  }

  /** @param diskSize the diskSize to set */
  public void setDiskSize(Integer diskSize) {
    this.diskSize = diskSize;
  }

  /** @return the region */
  public Region getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(Region region) {
    this.region = region;
  }

  /** @return the image */
  public Image getImage() {
    return image;
  }

  /** @param image the image to set */
  public void setImage(Image image) {
    this.image = image;
  }

  /** @return the size */
  public String getSize() {
    return size;
  }

  /** @param size the size to set */
  public void setSize(String size) {
    this.size = size;
  }

  /** @return the locked */
  public boolean isLocked() {
    return locked;
  }

  /** @param locked the locked to set */
  public void setLocked(boolean locked) {
    this.locked = locked;
  }

  /** @return the status */
  public DropletStatus getStatus() {
    return status;
  }

  /** @param status the status to set */
  public void setStatus(DropletStatus status) {
    this.status = status;
  }

  /** @return the networks */
  public Networks getNetworks() {
    return networks;
  }

  /** @param networks the networks to set */
  public void setNetworks(Networks networks) {
    this.networks = networks;
  }

  /** @return the kernel */
  public Kernel getKernel() {
    return kernel;
  }

  /** @param kernel the kernel to set */
  public void setKernel(Kernel kernel) {
    this.kernel = kernel;
  }

  /** @return the createdDate */
  public Date getCreatedDate() {
    return createdDate;
  }

  /** @param createdDate the createdDate to set */
  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  /** @return the features */
  public List<String> getFeatures() {
    return features;
  }

  /** @param features the features to set */
  public void setFeatures(List<String> features) {
    this.features = features;
  }

  /** @return the enableBackup */
  public Boolean getEnableBackup() {
    return enableBackup;
  }

  /** @param enableBackup the enableBackup to set */
  public void setEnableBackup(Boolean enableBackup) {
    this.enableBackup = enableBackup;
  }

  /** @return the enableIpv6 */
  public Boolean getEnableIpv6() {
    return enableIpv6;
  }

  /** @param enableIpv6 the enableIpv6 to set */
  public void setEnableIpv6(Boolean enableIpv6) {
    this.enableIpv6 = enableIpv6;
  }

  /** @return the enablePrivateNetworking */
  public Boolean getEnablePrivateNetworking() {
    return enablePrivateNetworking;
  }

  /** @param enablePrivateNetworking the enablePrivateNetworking to set */
  public void setEnablePrivateNetworking(Boolean enablePrivateNetworking) {
    this.enablePrivateNetworking = enablePrivateNetworking;
  }

  /** @return the backupIds */
  public List<Integer> getBackupIds() {
    return backupIds;
  }

  /** @param backupIds the backupIds to set */
  public void setBackupIds(List<Integer> backupIds) {
    this.backupIds = backupIds;
  }

  /** @return the snapshotIds */
  public List<Integer> getSnapshotIds() {
    return snapshotIds;
  }

  /** @param snapshotIds the snapshotIds to set */
  public void setSnapshotIds(List<Integer> snapshotIds) {
    this.snapshotIds = snapshotIds;
  }

  /** @return the keys */
  public List<Key> getKeys() {
    return keys;
  }

  /** @param keys the keys to set */
  public void setKeys(List<Key> keys) {
    this.keys = keys;
  }

  /** @return the userData */
  public String getUserData() {
    return userData;
  }

  /** @param userData the userData to set */
  public void setUserData(String userData) {
    this.userData = userData;
  }

  /** @return the volumeIds */
  public List<String> getVolumeIds() {
    return volumeIds;
  }

  /** @param volumeIds the volumeIds to set */
  public void setVolumeIds(List<String> volumeIds) {
    this.volumeIds = volumeIds;
  }

  /** @return the tags */
  public List<String> getTags() {
    return tags;
  }

  /** @param tags the tags to set */
  public void setTags(List<String> tags) {
    this.tags = tags;
  }

  /** @return the installMonitoring */
  public Boolean getInstallMonitoring() {
    return installMonitoring;
  }

  /** @param installMonitoring the installMonitoring to set */
  public void setInstallMonitoring(Boolean installMonitoring) {
    this.installMonitoring = installMonitoring;
  }
} public class Droplets extends Base {

  private static final long serialVersionUID = 8034193005189329161L;

  private List<Droplet> droplets;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the droplets */
  public List<Droplet> getDroplets() {
    return droplets;
  }

  /** @param droplets the droplets to set */
  public void setDroplets(List<Droplet> droplets) {
    this.droplets = droplets;
  }
} public class Firewall extends Base {

  private static final long serialVersionUID = -7669528307658280855L;

  private String id;

  private String status;

  @SerializedName("created_at")
  private Date createdDate;

  @SerializedName("pending_changes")
  private List<PendingChanges> pendingChanges;

  @SerializedName("name")
  private String name;

  @Expose
  @SerializedName("inbound_rules")
  private List<InboundRules> inboundRules;

  @Expose
  @SerializedName("outbound_rules")
  private List<OutboundRules> outboundRules;

  @SerializedName("droplet_ids")
  private List<Integer> dropletIds;

  private List<String> tags;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public Date getCreatedDate() {
    return createdDate;
  }

  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  public List<PendingChanges> getPendingChanges() {
    return pendingChanges;
  }

  public void setPendingChanges(List<PendingChanges> pendingChanges) {
    this.pendingChanges = pendingChanges;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public List<InboundRules> getInboundRules() {
    return inboundRules;
  }

  public void setInboundRules(List<InboundRules> inboundRules) {
    this.inboundRules = inboundRules;
  }

  public List<OutboundRules> getOutboundRules() {
    return outboundRules;
  }

  public void setOutboundRules(List<OutboundRules> outboundRules) {
    this.outboundRules = outboundRules;
  }

  public List<Integer> getDropletIds() {
    return dropletIds;
  }

  public void setDropletIds(List<Integer> dropletIds) {
    this.dropletIds = dropletIds;
  }

  public List<String> getTags() {
    return tags;
  }

  public void setTags(List<String> tags) {
    this.tags = tags;
  }
} public class Firewalls extends Base {

  private static final long serialVersionUID = -6358515137857888620L;

  @SerializedName("firewalls")
  private List<Firewall> firewalls;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  public List<Firewall> getFirewalls() {
    return firewalls;
  }

  public void setFirewalls(List<Firewall> firewalls) {
    this.firewalls = firewalls;
  }
} public class FloatingIP extends Base {

  private static final long serialVersionUID = 607751030000684913L;

  private String ip;

  private Region region;

  private Droplet droplet;

  private boolean locked;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the ip */
  public String getIp() {
    return ip;
  }

  /** @param ip the ip to set */
  public void setIp(String ip) {
    this.ip = ip;
  }

  /** @return the region */
  public Region getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(Region region) {
    this.region = region;
  }

  /** @return the droplet */
  public Droplet getDroplet() {
    return droplet;
  }

  /** @param droplet the droplet to set */
  public void setDroplet(Droplet droplet) {
    this.droplet = droplet;
  }

  /** @return the locked */
  public boolean isLocked() {
    return locked;
  }

  /** @param locked the locked to set */
  public void setLocked(boolean locked) {
    this.locked = locked;
  }
} public class FloatingIPs extends Base {

  private static final long serialVersionUID = -5205906300992553434L;

  @SerializedName("floating_ips")
  private List<FloatingIP> floatingIPs;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the floatingIPs */
  public List<FloatingIP> getFloatingIPs() {
    return floatingIPs;
  }

  /** @param floatingIPs the floatingIPs to set */
  public void setFloatingIPs(List<FloatingIP> floatingIPs) {
    this.floatingIPs = floatingIPs;
  }
} public class ForwardingRules extends Base {

  private static final long serialVersionUID = -442836096026412279L;

  @Expose
  @SerializedName("entry_protocol")
  private Protocol entryProtocol;

  @Expose
  @SerializedName("entry_port")
  private Integer entryPort;

  @Expose
  @SerializedName("target_protocol")
  private Protocol targetProtocol;

  @Expose
  @SerializedName("target_port")
  private Integer targetPort;

  @Expose
  @SerializedName("certificate_id")
  private String certificateId;

  @Expose
  @SerializedName("tls_passthrough")
  private boolean tlsPassthrough;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the entry protocol */
  public Protocol getEntryProtocol() {
    return entryProtocol;
  }

  public void setEntryProtocol(Protocol entryProtocol) {
    this.entryProtocol = entryProtocol;
  }

  /** @return the entry port */
  public Integer getEntryPort() {
    return entryPort;
  }

  /** @param entryPort the entry port to set */
  public void setEntryPort(Integer entryPort) {
    this.entryPort = entryPort;
  }

  /** @return the target protocol */
  public Protocol getTargetProtocol() {
    return targetProtocol;
  }

  /** @param targetProtocol the target protocol to set */
  public void setTargetProtocol(Protocol targetProtocol) {
    this.targetProtocol = targetProtocol;
  }

  /** @return the target port */
  public Integer getTargetPort() {
    return targetPort;
  }

  /** @param targetPort the target port to set */
  public void setTargetPort(Integer targetPort) {
    this.targetPort = targetPort;
  }

  /** @return the certificateId */
  public String getCertificateId() {
    return certificateId;
  }

  /** @param certificateId the certificateId to set */
  public void setCertificateId(String certificateId) {
    this.certificateId = certificateId;
  }

  /** @return true if SSL encrypted traffic will be passed through to the backend Droplets */
  public boolean isTlsPassthrough() {
    return tlsPassthrough;
  }

  /** @param tlsPassthrough the tlsPassthrough to set */
  public void setTlsPassthrough(boolean tlsPassthrough) {
    this.tlsPassthrough = tlsPassthrough;
  }
} public class Image extends Base {

  private static final long serialVersionUID = 1321111459154107563L;

  private Integer id;

  @Expose private String name;

  @Expose private String distribution;

  private String slug;

  @SerializedName("public")
  private boolean availablePublic;

  private List<String> regions;

  @SerializedName("created_at")
  private Date createdDate;

  @SerializedName("min_disk_size")
  private Integer minDiskSize;

  @SerializedName("size_gigabytes")
  private Double size;

  private ImageType type;

  // #89 - start
  // https://developers.digitalocean.com/documentation/changelog/api-v2/support-for-custom-images-and-image-tagging/
  @Expose private String url;

  @Expose private String region;

  @Expose private String description;

  @Expose private List<String> tags;

  private ImageStatus status;

  @SerializedName("error_message")
  private String errorMessage;
  // #89 - end

  public Image() {
    // Default constructor
  }

  public Image(Integer id) {
    this.id = id;
  }

  public Image(String slug) {
    this.slug = slug;
  }

  public Image(String name, String url, String region) {
    this.name = name;
    this.url = url;
    this.region = region;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return true if image is snapshot */
  public boolean isSnapshot() {
    return ImageType.SNAPSHOT == type;
  }

  /** @return true if image is backup */
  public boolean isBackup() {
    return ImageType.BACKUP == type;
  }

  /** @return the id */
  public Integer getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(Integer id) {
    this.id = id;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * The name of a custom image's distribution.
   *
   * <p>Currently, the valid values are "Arch Linux", "CentOS", "CoreOS", "Debian", "Fedora",
   * "Fedora Atomic", "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Ubuntu", and "Unknown". Any
   * other value will be accepted but ignored, and "Unknown" will be used in its place.
   *
   * @return the distribution
   */
  public String getDistribution() {
    return distribution;
  }

  /**
   * The name of a custom image's distribution.
   *
   * <p>Currently, the valid values are "Arch Linux", "CentOS", "CoreOS", "Debian", "Fedora",
   * "Fedora Atomic", "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Ubuntu", and "Unknown". Any
   * other value will be accepted but ignored, and "Unknown" will be used in its place.
   *
   * @param distribution the distribution to set
   */
  public void setDistribution(String distribution) {
    this.distribution = distribution;
  }

  /** @return the slug */
  public String getSlug() {
    return slug;
  }

  /** @param slug the slug to set */
  public void setSlug(String slug) {
    this.slug = slug;
  }

  /** @return the availablePublic */
  public boolean isAvailablePublic() {
    return availablePublic;
  }

  /** @param availablePublic the availablePublic to set */
  public void setAvailablePublic(boolean availablePublic) {
    this.availablePublic = availablePublic;
  }

  /** @return the regions */
  public List<String> getRegions() {
    return regions;
  }

  /** @param regions the regions to set */
  public void setRegions(List<String> regions) {
    this.regions = regions;
  }

  /** @return the createdDate */
  public Date getCreatedDate() {
    return createdDate;
  }

  /** @param createdDate the createdDate to set */
  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  /** @return the type */
  public ImageType getType() {
    return type;
  }

  /** @param type the type to set */
  public void setType(ImageType type) {
    this.type = type;
  }

  /** @return the min Disk Size */
  public Integer getMinDiskSize() {
    return minDiskSize;
  }

  /** @param minDiskSize the minDiskSize to set */
  public void setMinDiskSize(Integer minDiskSize) {
    this.minDiskSize = minDiskSize;
  }

  /** @return the size */
  public Double getSize() {
    return size;
  }

  /** @param size the size to set */
  public void setSize(Double size) {
    this.size = size;
  }

  /** @return the url */
  public String getUrl() {
    return url;
  }

  /**
   * A URL from which the custom Linux virtual machine image may be retrieved. The image it points
   * to must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or
   * bzip2 and must be smaller than 100 GB after being decompressed.
   *
   * @param url the url to set
   */
  public void setUrl(String url) {
    this.url = url;
  }

  /** @return the region */
  public String getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(String region) {
    this.region = region;
  }

  /** @return the description */
  public String getDescription() {
    return description;
  }

  /** @param description the description to set */
  public void setDescription(String description) {
    this.description = description;
  }

  /** @return the status */
  public ImageStatus getStatus() {
    return status;
  }

  /** @param status the status to set */
  public void setStatus(ImageStatus status) {
    this.status = status;
  }

  /** @return the tags */
  public List<String> getTags() {
    return tags;
  }

  /** @param tags the tags to set */
  public void setTags(List<String> tags) {
    this.tags = tags;
  }

  /** @return the errorMessage */
  public String getErrorMessage() {
    return errorMessage;
  }

  /** @param errorMessage the errorMessage to set */
  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }
} public class Images extends Base {

  private static final long serialVersionUID = 948306822509308453L;

  private List<Image> images;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the images */
  public List<Image> getImages() {
    return images;
  }

  /** @param images the images to set */
  public void setImages(List<Image> images) {
    this.images = images;
  }
} public class Kernels extends Base {

  private static final long serialVersionUID = -272245249038819379L;

  private List<Kernel> kernels;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the kernels */
  public List<Kernel> getKernels() {
    return kernels;
  }

  /** @param kernels the kernels to set */
  public void setKernels(List<Kernel> kernels) {
    this.kernels = kernels;
  }
} public class Key extends Base {

  private static final long serialVersionUID = 3454646433241484585L;

  @Expose private Integer id;

  @Expose private String name;

  @Expose private String fingerprint;

  @Expose
  @SerializedName("public_key")
  private String publicKey;

  public Key() {
    // Default constructor
  }

  public Key(Integer id) {
    this.id = id;
  }

  public Key(String name) {
    this.name = name;
  }

  public Key(String name, String publicKey) {
    this.name = name;
    this.publicKey = publicKey;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public Integer getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(Integer id) {
    this.id = id;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the fingerprint */
  public String getFingerprint() {
    return fingerprint;
  }

  /** @param fingerprint the fingerprint to set */
  public void setFingerprint(String fingerprint) {
    this.fingerprint = fingerprint;
  }

  /** @return the publicKey */
  public String getPublicKey() {
    return publicKey;
  }

  /** @param publicKey the publicKey to set */
  public void setPublicKey(String publicKey) {
    this.publicKey = publicKey;
  }
} public class Keys extends Base {

  private static final long serialVersionUID = 5842563908358462580L;

  @SerializedName("ssh_keys")
  private List<Key> keys;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the keys */
  public List<Key> getKeys() {
    return keys;
  }

  /** @param keys the keys to set */
  public void setKeys(List<Key> keys) {
    this.keys = keys;
  }
} public class LoadBalancer extends Base {

  private static final long serialVersionUID = -442836096026412279L;

  private String id;

  @Expose private String name;

  private String ip;

  @Expose private LoadBalancingAlgorithm algorithm;

  private Region region;

  private LoadBalancerStatus status;

  @SerializedName("created_at")
  private Date createdDate;

  @SerializedName("forwarding_rules")
  private List<ForwardingRules> forwardingRules;

  @SerializedName("health_check")
  private HealthCheck healthCheck;

  @SerializedName("sticky_sessions")
  private StickySessions stickySessions;

  @SerializedName("redirect_http_to_https")
  private boolean redirectHttpToHttps;

  @SerializedName("droplet_ids")
  private List<String> dropletIds;

  @Expose private String tag;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the ip */
  public String getIp() {
    return ip;
  }

  /** @param ip the ip to set */
  public void setIp(String ip) {
    this.ip = ip;
  }

  /** @return the id */
  public String getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(String id) {
    this.id = id;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the algorithm */
  public LoadBalancingAlgorithm getAlgorithm() {
    return algorithm;
  }

  /** @param algorithm the algorithm to set */
  public void setAlgorithm(LoadBalancingAlgorithm algorithm) {
    this.algorithm = algorithm;
  }

  /** @return the region */
  public Region getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(Region region) {
    this.region = region;
  }

  /** @return the status */
  public LoadBalancerStatus getStatus() {
    return status;
  }

  /** @param status the status to set */
  public void setStatus(LoadBalancerStatus status) {
    this.status = status;
  }

  /** @return the created date */
  public Date getCreatedDate() {
    return createdDate;
  }

  /** @param createdDate the createdDate to set */
  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  /** @return the forwarding rules */
  public List<ForwardingRules> getForwardingRules() {
    return forwardingRules;
  }

  /** @param forwardingRules the forwardingRules to set */
  public void setForwardingRules(List<ForwardingRules> forwardingRules) {
    this.forwardingRules = forwardingRules;
  }

  /** @return the healthcheck */
  public HealthCheck getHealthCheck() {
    return healthCheck;
  }

  /** @param healthCheck the healthCheck to set */
  public void setHealthCheck(HealthCheck healthCheck) {
    this.healthCheck = healthCheck;
  }

  /** @return the sticky sessions */
  public StickySessions getStickySessions() {
    return stickySessions;
  }

  /** @param stickySessions the stickySessions to set */
  public void setStickySessions(StickySessions stickySessions) {
    this.stickySessions = stickySessions;
  }

  /**
   * @return true if the HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS
   *     on port 443.
   */
  public boolean isRedirectHttpToHttps() {
    return redirectHttpToHttps;
  }

  /** @param redirectHttpToHttps the redirectHttpToHttps to set */
  public void setRedirectHttpToHttps(boolean redirectHttpToHttps) {
    this.redirectHttpToHttps = redirectHttpToHttps;
  }

  /** @return the list of dropletId */
  public List<String> getDropletIds() {
    return dropletIds;
  }

  /** @param dropletIds the dropletIds to set */
  public void setDropletIds(List<String> dropletIds) {
    this.dropletIds = dropletIds;
  }

  /** @return the tag */
  public String getTag() {
    return tag;
  }

  /** @param tag the tag to set */
  public void setTag(String tag) {
    this.tag = tag;
  }
} public class LoadBalancers extends Base {

  private static final long serialVersionUID = 5440139918030950627L;

  @SerializedName("load_balancers")
  private List<LoadBalancer> loadBalancers;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the droplets */
  public List<LoadBalancer> getLoadBalancers() {
    return loadBalancers;
  }

  /** @param loadBalancers the droplets to set */
  public void setLoadBalancers(List<LoadBalancer> loadBalancers) {
    this.loadBalancers = loadBalancers;
  }
} public class Neighbors extends Base {

  private static final long serialVersionUID = 3735413257818221593L;

  private List<Droplet> neighbors;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the neighbors */
  public List<Droplet> getNeighbors() {
    return neighbors;
  }

  /** @param neighbors the neighbors to set */
  public void setNeighbors(List<Droplet> neighbors) {
    this.neighbors = neighbors;
  }
} public class Project extends Base {

  private static final long serialVersionUID = -594801578631188284L;

  private String id;

  @SerializedName("owner_uuid")
  private String ownerUuid;

  @SerializedName("owner_id")
  private String ownerId;

  @Expose private String name;

  @Expose private String description;

  @Expose private String purpose;

  @Expose private Environment environment;

  @Expose
  @SerializedName("is_default")
  private boolean isDefault;

  @SerializedName("created_at")
  private String createdAt;

  @SerializedName("updated_at")
  private String updatedAt;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getOwnerUuid() {
    return ownerUuid;
  }

  public void setOwnerUuid(String ownerUuid) {
    this.ownerUuid = ownerUuid;
  }

  public String getOwnerId() {
    return ownerId;
  }

  public void setOwnerId(String ownerId) {
    this.ownerId = ownerId;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String getPurpose() {
    return purpose;
  }

  public void setPurpose(String purpose) {
    this.purpose = purpose;
  }

  public Environment getEnvironment() {
    return environment;
  }

  public void setEnvironment(Environment environment) {
    this.environment = environment;
  }

  public boolean isDefault() {
    return isDefault;
  }

  public void setDefault(boolean aDefault) {
    isDefault = aDefault;
  }

  public String getCreatedAt() {
    return createdAt;
  }

  public void setCreatedAt(String createdAt) {
    this.createdAt = createdAt;
  }

  public String getUpdatedAt() {
    return updatedAt;
  }

  public void setUpdatedAt(String updatedAt) {
    this.updatedAt = updatedAt;
  }
} public class Projects extends Base {

  private static final long serialVersionUID = -7659167641617957056L;

  private List<Project> projects;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the projects */
  public List<Project> getProjects() {
    return projects;
  }

  /** @param projects the projects to set */
  public void setProjects(List<Project> projects) {
    this.projects = projects;
  }
} public class Regions extends Base {

  private static final long serialVersionUID = -6173241777950108168L;

  private List<Region> regions;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the regions */
  public List<Region> getRegions() {
    return regions;
  }

  /** @param regions the regions to set */
  public void setRegions(List<Region> regions) {
    this.regions = regions;
  }
} public class Resource {

  @Expose
  @SerializedName("resource_id")
  private String id;

  @Expose
  @SerializedName("resource_type")
  private ResourceType type;

  public Resource() {
    // Default constructor
  }

  public Resource(String id, ResourceType type) {
    this.id = id;
    this.type = type;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public String getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(String id) {
    this.id = id;
  }

  /** @return the type */
  public ResourceType getType() {
    return type;
  }

  /** @param type the type to set */
  public void setType(ResourceType type) {
    this.type = type;
  }
} public class Response extends Base {

  private static final long serialVersionUID = 6912100335316878813L;

  @SerializedName("request_status")
  private Boolean isRequestSuccess;

  @SerializedName("status_code")
  private int statusCode;

  /** Default Constructor */
  public Response() {
    // Default Constructor
  }

  /**
   * Parameterized Constructor
   *
   * @param isRequestSuccess whether delete is success or not
   */
  public Response(Boolean isRequestSuccess) {
    this.isRequestSuccess = isRequestSuccess;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the isRequestSuccess */
  public Boolean getIsRequestSuccess() {
    return isRequestSuccess;
  }

  /** @param isRequestSuccess the isRequestSuccess to set */
  public void setIsRequestSuccess(Boolean isRequestSuccess) {
    this.isRequestSuccess = isRequestSuccess;
  }

  /** @return the statusCode */
  public int getStatusCode() {
    return statusCode;
  }

  /** @param statusCode the statusCode to set */
  public void setStatusCode(int statusCode) {
    this.statusCode = statusCode;
  }
} public class Sizes extends Base {

  private static final long serialVersionUID = 8144482770477554617L;

  private List<Size> sizes;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the sizes */
  public List<Size> getSizes() {
    return sizes;
  }

  /** @param sizes the sizes to set */
  public void setSizes(List<Size> sizes) {
    this.sizes = sizes;
  }
} public class Snapshot extends Image {

  private static final long serialVersionUID = 5713559939273842460L;
} public class Snapshots extends Base {

  private static final long serialVersionUID = -8625465848761958108L;

  List<Snapshot> snapshots;

  /** @return the snapshots */
  public List<Snapshot> getSnapshots() {
    return snapshots;
  }

  /** @param snapshots the snapshots to set */
  public void setSnapshots(List<Snapshot> snapshots) {
    this.snapshots = snapshots;
  }
} public class Tag extends Base {

  private static final long serialVersionUID = -5828623466026614221L;

  @Expose private String name;

  private TagResource resources;

  public Tag() {
    // Default constructor
  }

  public Tag(String name) {
    this.name = name;
  }

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the resources */
  public TagResource getResources() {
    return resources;
  }

  /** @param resources the resources to set */
  public void setResources(TagResource resources) {
    this.resources = resources;
  }
} public class Tags extends Base {

  private static final long serialVersionUID = -5828623466026614221L;

  private List<Tag> tags;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the tags */
  public List<Tag> getTags() {
    return tags;
  }

  /** @param tags the tags to set */
  public void setTags(List<Tag> tags) {
    this.tags = tags;
  }
} public class Volume extends Base {

  private static final long serialVersionUID = 3274091633535612517L;

  private String id;

  private Region region;

  @SerializedName("droplet_ids")
  private Set<Integer> dropletIds;

  private String name;

  private String description;

  @SerializedName("size_gigabytes")
  private Integer size;

  @SerializedName("created_at")
  private Date createdDate;

  @SerializedName("snapshot_id")
  private String snapshotId;

  @SerializedName("filesystem_type")
  private String fileSystemType;

  @SerializedName("filesystem_label")
  private String fileSystemLabel;

  private List<String> tags;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the id */
  public String getId() {
    return id;
  }

  /** @param id the id to set */
  public void setId(String id) {
    this.id = id;
  }

  /** @return the region */
  public Region getRegion() {
    return region;
  }

  /** @param region the region to set */
  public void setRegion(Region region) {
    this.region = region;
  }

  /** @return the dropletIds */
  public Set<Integer> getDropletIds() {
    return dropletIds;
  }

  /** @param dropletIds the dropletIds to set */
  public void setDropletIds(Set<Integer> dropletIds) {
    this.dropletIds = dropletIds;
  }

  /** @return the name */
  public String getName() {
    return name;
  }

  /** @param name the name to set */
  public void setName(String name) {
    this.name = name;
  }

  /** @return the description */
  public String getDescription() {
    return description;
  }

  /** @param description the description to set */
  public void setDescription(String description) {
    this.description = description;
  }

  /** @return the size in Gigabytes */
  public Integer getSize() {
    return size;
  }

  /** @param size the size to set */
  public void setSize(Integer size) {
    this.size = size;
  }

  /** @return the createdDate */
  public Date getCreatedDate() {
    return createdDate;
  }

  /** @param createdDate the createdDate to set */
  public void setCreatedDate(Date createdDate) {
    this.createdDate = createdDate;
  }

  /** @return the snapshotId */
  public String getSnapshotId() {
    return snapshotId;
  }

  /** @param snapshotId the snapshotId to set */
  public void setSnapshotId(String snapshotId) {
    this.snapshotId = snapshotId;
  }

  /** @return the fileSystemType */
  public String getFileSystemType() {
    return fileSystemType;
  }

  /** @param fileSystemType the fileSystemType to set */
  public void setFileSystemType(String fileSystemType) {
    this.fileSystemType = fileSystemType;
  }

  /** @return the fileSystemLabel */
  public String getFileSystemLabel() {
    return fileSystemLabel;
  }

  /** @param fileSystemLabel the fileSystemLabel to set */
  public void setFileSystemLabel(String fileSystemLabel) {
    this.fileSystemLabel = fileSystemLabel;
  }

  /** @return the tags */
  public List<String> getTags() {
    return tags;
  }

  /** @param tags the tags to set */
  public void setTags(List<String> tags) {
    this.tags = tags;
  }
} public class Volumes extends Base {

  private static final long serialVersionUID = 1739002259344347687L;

  private List<Volume> volumes;

  @Override
  public String toString() {
    return ReflectionToStringBuilder.toString(this);
  }

  /** @return the volumes */
  public List<Volume> getVolumes() {
    return volumes;
  }

  /** @param volumes the volumes to set */
  public void setVolumes(List<Volume> volumes) {
    this.volumes = volumes;
  }
}
import com.myjeeva.digitalocean.common.ActionType;
import com.myjeeva.digitalocean.exception.DigitalOceanException;
import com.myjeeva.digitalocean.exception.RequestUnsuccessfulException;
import com.myjeeva.digitalocean.pojo.Account;
import com.myjeeva.digitalocean.pojo.Action;
import com.myjeeva.digitalocean.pojo.Actions;
import com.myjeeva.digitalocean.pojo.Backups;
import com.myjeeva.digitalocean.pojo.Certificate;
import com.myjeeva.digitalocean.pojo.Certificates;
import com.myjeeva.digitalocean.pojo.Delete;
import com.myjeeva.digitalocean.pojo.Domain;
import com.myjeeva.digitalocean.pojo.DomainRecord;
import com.myjeeva.digitalocean.pojo.DomainRecords;
import com.myjeeva.digitalocean.pojo.Domains;
import com.myjeeva.digitalocean.pojo.Droplet;
import com.myjeeva.digitalocean.pojo.Droplets;
import com.myjeeva.digitalocean.pojo.Firewall;
import com.myjeeva.digitalocean.pojo.Firewalls;
import com.myjeeva.digitalocean.pojo.FloatingIP;
import com.myjeeva.digitalocean.pojo.FloatingIPs;
import com.myjeeva.digitalocean.pojo.ForwardingRules;
import com.myjeeva.digitalocean.pojo.Image;
import com.myjeeva.digitalocean.pojo.Images;
import com.myjeeva.digitalocean.pojo.Kernels;
import com.myjeeva.digitalocean.pojo.Key;
import com.myjeeva.digitalocean.pojo.Keys;
import com.myjeeva.digitalocean.pojo.LoadBalancer;
import com.myjeeva.digitalocean.pojo.LoadBalancers;
import com.myjeeva.digitalocean.pojo.Neighbors;
import com.myjeeva.digitalocean.pojo.Project;
import com.myjeeva.digitalocean.pojo.Projects;
import com.myjeeva.digitalocean.pojo.Regions;
import com.myjeeva.digitalocean.pojo.Resource;
import com.myjeeva.digitalocean.pojo.Response;
import com.myjeeva.digitalocean.pojo.Sizes;
import com.myjeeva.digitalocean.pojo.Snapshot;
import com.myjeeva.digitalocean.pojo.Snapshots;
import com.myjeeva.digitalocean.pojo.Tag;
import com.myjeeva.digitalocean.pojo.Tags;
import com.myjeeva.digitalocean.pojo.Volume;
import com.myjeeva.digitalocean.pojo.Volumes;
import java.util.List;
/**
 * The MIT License
 *
 * <p>Copyright (c) 2013-2020 Jeevanandam M. (jeeva@myjeeva.com)
 *
 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software
 * and associated documentation files (the "Software"), to deal in the Software without restriction,
 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * <p>The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 *
 * <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package com.myjeeva.digitalocean;


/**
 * <strong>DigitalOcean API client in Java</strong>
 *
 * <p>A simple and meaningful java methods for <a
 * href="https://api.digitalocean.com/">DigitalOcean's API</a>. All of the RESTful that you find in
 * DigitalOcean API's Version 2 is available via simple java methods.
 *
 * <p><strong>Sample Code:</strong>
 *
 * <pre>
 * // Create a DigitalOcean client
 * DigitalOcean apiClient = new DigitalOceanClient(authToken);
 * <code>or</code>
 * DigitalOcean apiClient = new DigitalOceanClient("v2", authToken);
 *
 * <strong>Let's invoke the appropriate method as per need</strong>
 *
 * // Fetching all the available droplets from control panel
 * Droplets droplets = apiClient.getAvailableDroplets(pageNo);
 *
 * // Fetching all the available kernels for droplet
 * Kernels kernels = apiClient.getAvailableKernels(dropletId, pageNo);
 *
 * // Create a new droplet
 * Droplet newDroplet = new Droplet();
 * newDroplet.setName("api-client-test-host");
 * newDroplet.setSize(new Size("512mb")); // setting size by slug value
 * newDroplet.setRegion(new Region("sgp1")); // setting region by slug value; sgp1 =&gt; Singapore 1 Data center
 * newDroplet.setImage(new Image(1601)); // setting by Image Id 1601 =&gt; centos-5-8-x64 also available in image slug value
 * newDroplet.setEnableBackup(Boolean.TRUE);
 * newDroplet.setEnableIpv6(Boolean.TRUE);
 * newDroplet.setEnablePrivateNetworking(Boolean.TRUE);
 * Droplet droplet = apiClient.createDroplet(newDroplet);
 *
 * // Fetch droplet information
 * Droplet droplet = apiClient.getDropletInfo(dropletId);
 *
 * // Fetch Available Plans/Sizes supported by DigitalOcean
 * Sizes sizes = apiClient.getAvailableSizes(pageNo);
 *
 * // Fetch Available Regions supported by DigitalOcean
 * Sizes sizes = apiClient.getAvailableRegions(pageNo);
 *
 * and so on... simple to use and effective!
 * </pre>
 *
 * @author Jeevanandam M. (jeeva@myjeeva.com)
 * @since v1.0
 */
public interface DigitalOcean {

  // ===========================================
  // Droplets methods
  // ===========================================

  /**
   * Method returns all active droplets that are currently running in your account. All available
   * API information is presented for each droplet.
   *
   * @param pageNo for pagination
   * @param perPage no. of items per page
   * @return {@link Droplets}
   * @throws DigitalOceanException if request had interruption [ <code>
   *     HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
   * @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
   * @since v2.0
   */
  Droplets getAvailableDroplets(Integer pageNo, Integer perPage)
      throws DigitalOceanException, RequestUnsuccessfulException;

  /**
   * Method returns all available kernels for given droplet ID
   *
   * @param dropletId for kernel info
   * @param pageNo for pagination
   * @param perPage no. of items per page
   * @return {@link Kernels}
   * @throws DigitalOceanException if request had interruption [ <code>
   *     HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
   * @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
   * @since v2.0
   */
  Kernels getDropletKernels(Integer dropletId, Integer pageNo, Integer perPage)
      throws DigitalOceanException, RequestUnsuccessfulException;

  /**
   * Method returns all available snapshots for given droplet ID
   *
   * @param dropletId for snapshot info
   * @param pageNo for pagination
   * @param perPage no. of items per page
   * @return {@link Snapshots}
   * @throws DigitalOceanException if request had interruption [ <code>
   *     HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
   * @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
   * @since v2.0
   */
  Snapshots getDropletSnapshots(Integer dropletId, Integer pageNo, Integer perPage)
      throws DigitalOceanException, RequestUnsuccessfulException;

  /**
   * Method returns all available snapshots for given droplet ID
   *
   * @param dropletId for backup info
   * @param pageNo for pagination
   * @param perPage no. of items per page
   * @return {@link Backups}
   * @throws DigitalOceanException if request had interruption [ <code>
   *     HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
   * @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
   * @since v2.0
   */
  Backups getDropletBackups(Integer dropletId, Integer pageNo, Integer perPage)
      throws DigitalOceanException, RequestUnsuccessfulException;

  /**
   * Method returns complete information for given droplet ID
   *
   * @param dropletId the id of the droplet
   * @return {@link Droplet}
   * @throws DigitalOceanException if request had interruption [ <code>
   *     HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
   * @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
   * @since v1.0
   */
  Droplet getDropletInfo(Integer dropletId)