Package com.myjeeva.digitalocean.pojo
Class Image
java.lang.Object
com.myjeeva.digitalocean.pojo.RateLimitBase
com.myjeeva.digitalocean.pojo.Base
com.myjeeva.digitalocean.pojo.Image
- All Implemented Interfaces:
Serializable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe name of a custom image's distribution.getId()getName()getSize()getSlug()getTags()getType()getUrl()booleanbooleanisBackup()booleanvoidsetAvailablePublic(boolean availablePublic) voidsetCreatedDate(Date createdDate) voidsetDescription(String description) voidsetDistribution(String distribution) The name of a custom image's distribution.voidsetErrorMessage(String errorMessage) voidvoidsetMinDiskSize(Integer minDiskSize) voidvoidvoidsetRegions(List<String> regions) voidvoidvoidsetStatus(ImageStatus status) voidvoidvoidA URL from which the custom Linux virtual machine image may be retrieved.toString()Methods inherited from class com.myjeeva.digitalocean.pojo.Base
getLinks, getMeta, setLinks, setMetaMethods inherited from class com.myjeeva.digitalocean.pojo.RateLimitBase
getRateLimit, setRateLimit
-
Constructor Details
-
Image
public Image() -
Image
-
Image
-
-
Method Details
-
toString
-
isSnapshot
public boolean isSnapshot()- Returns:
- true if image is snapshot
-
isBackup
public boolean isBackup()- Returns:
- true if image is backup
-
getId
- Returns:
- the id
-
setId
- Parameters:
id- the id to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
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
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
- Returns:
- the slug
-
setSlug
- 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
- Returns:
- the regions
-
setRegions
- Parameters:
regions- the regions to set
-
getCreatedDate
- Returns:
- the createdDate
-
setCreatedDate
- Parameters:
createdDate- the createdDate to set
-
getType
- Returns:
- the type
-
setType
- Parameters:
type- the type to set
-
getMinDiskSize
- Returns:
- the min Disk Size
-
setMinDiskSize
- Parameters:
minDiskSize- the minDiskSize to set
-
getSize
- Returns:
- the size
-
setSize
- Parameters:
size- the size to set
-
getUrl
- Returns:
- the url
-
setUrl
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
- Returns:
- the region
-
setRegion
- Parameters:
region- the region to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description- the description to set
-
getStatus
- Returns:
- the status
-
setStatus
- Parameters:
status- the status to set
-
getTags
- Returns:
- the tags
-
setTags
- Parameters:
tags- the tags to set
-
getErrorMessage
- Returns:
- the errorMessage
-
setErrorMessage
- Parameters:
errorMessage- the errorMessage to set
-