Class Image

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Backup, Snapshot

public class Image extends Base
Represents Droplet Image (also public images aka Distribution) attributes of DigitalOcean (distribution, snapshots or backups). Revised as per v2 API data structure.
Author:
Jeevanandam M. (jeeva@myjeeva.com)
See Also:
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Base
    • isSnapshot

      public boolean isSnapshot()
      Returns:
      true if image is snapshot
    • isBackup

      public boolean isBackup()
      Returns:
      true if image is backup
    • getId

      public String getId()
      Returns:
      the id
    • setId

      public void setId(String id)
      Parameters:
      id - the id to set
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getDistribution

      public String getDistribution()
      The name of a custom image's distribution.

      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.

      Returns:
      the distribution
    • setDistribution

      public void setDistribution(String distribution)
      The name of a custom image's distribution.

      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.

      Parameters:
      distribution - the distribution to set
    • getSlug

      public String getSlug()
      Returns:
      the slug
    • setSlug

      public void setSlug(String slug)
      Parameters:
      slug - the slug to set
    • isAvailablePublic

      public boolean isAvailablePublic()
      Returns:
      the availablePublic
    • setAvailablePublic

      public void setAvailablePublic(boolean availablePublic)
      Parameters:
      availablePublic - the availablePublic to set
    • getRegions

      public List<String> getRegions()
      Returns:
      the regions
    • setRegions

      public void setRegions(List<String> regions)
      Parameters:
      regions - the regions to set
    • getCreatedDate

      public Date getCreatedDate()
      Returns:
      the createdDate
    • setCreatedDate

      public void setCreatedDate(Date createdDate)
      Parameters:
      createdDate - the createdDate to set
    • getType

      public ImageType getType()
      Returns:
      the type
    • setType

      public void setType(ImageType type)
      Parameters:
      type - the type to set
    • getMinDiskSize

      public Integer getMinDiskSize()
      Returns:
      the min Disk Size
    • setMinDiskSize

      public void setMinDiskSize(Integer minDiskSize)
      Parameters:
      minDiskSize - the minDiskSize to set
    • getSize

      public Double getSize()
      Returns:
      the size
    • setSize

      public void setSize(Double size)
      Parameters:
      size - the size to set
    • getUrl

      public String getUrl()
      Returns:
      the url
    • setUrl

      public void setUrl(String 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.
      Parameters:
      url - the url to set
    • getRegion

      public String getRegion()
      Returns:
      the region
    • setRegion

      public void setRegion(String region)
      Parameters:
      region - the region to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • getStatus

      public ImageStatus getStatus()
      Returns:
      the status
    • setStatus

      public void setStatus(ImageStatus status)
      Parameters:
      status - the status to set
    • getTags

      public List<String> getTags()
      Returns:
      the tags
    • setTags

      public void setTags(List<String> tags)
      Parameters:
      tags - the tags to set
    • getErrorMessage

      public String getErrorMessage()
      Returns:
      the errorMessage
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Parameters:
      errorMessage - the errorMessage to set