Class GlanceImage
- java.lang.Object
-
- org.openstack4j.openstack.image.domain.GlanceImage
-
- All Implemented Interfaces:
Serializable,Buildable<ImageBuilder>,BasicResource,IdEntity,Image,ModelEntity
public class GlanceImage extends Object implements Image
A Glance v1.1 Image model implementation- Author:
- Jeremy Unruh
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlanceImage.ImageConcreteBuilderstatic classGlanceImage.Images-
Nested classes/interfaces inherited from interface org.openstack4j.common.Buildable
Buildable.Builder<T extends Buildable.Builder<T,M>,M extends Buildable<?>>
-
Nested classes/interfaces inherited from interface org.openstack4j.model.image.Image
Image.Status
-
-
Constructor Summary
Constructors Constructor Description GlanceImage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageBuilderbuilder()GlanceImagecreatedAt(Date createdAt)GlanceImagedeletedAt(Date deletedAt)StringgetChecksum()ContainerFormatgetContainerFormat()StringgetCopyFrom()DategetCreatedAt()The timestamp of when the image was createdDategetDeletedAt()DiskFormatgetDiskFormat()StringgetId()StringgetLocation()longgetMinDisk()longgetMinRam()StringgetName()StringgetOwner()Map<String,String>getProperties()A mapping of free-form key/value pairs that have been saved with the image metadataLonggetSize()Image.StatusgetStatus()StoreTypegetStoreType()This will always be null on any list or get request.DategetUpdatedAt()Timestamp when an image's metadata was last updated, not its image data, as all image data is immutable once stored in GlancebooleanisDeleted()GlanceImageisDeleted(Boolean isDeleted)booleanisProtected()GlanceImageisProtected(Boolean isProtected)booleanisPublic()Indicates whether the image is publicly availablebooleanisSnapshot()Determines if this image is a snapshotGlanceImagelocation(String location)GlanceImageproperties(Map<String,String> properties)voidsetId(String id)Sets the identifier for this resource.voidsetName(String name)Sets the name for this resourceGlanceImagesize(Long size)GlanceImagestatus(Image.Status status)ImageBuildertoBuilder()StringtoString()GlanceImageupdatedAt(Date updatedAt)
-
-
-
Method Detail
-
builder
public static ImageBuilder builder()
-
toBuilder
public ImageBuilder toBuilder()
- Specified by:
toBuilderin interfaceBuildable<ImageBuilder>
-
getId
public String getId()
-
setId
public void setId(String id)
Sets the identifier for this resource. Note: creating a new resource should not have the idenfier set since OpenStack will assign one on the create call
-
getName
public String getName()
- Specified by:
getNamein interfaceBasicResource- Returns:
- the name for this resource
-
setName
public void setName(String name)
Sets the name for this resource- Specified by:
setNamein interfaceBasicResource- Parameters:
name- the name to set
-
getContainerFormat
public ContainerFormat getContainerFormat()
- Specified by:
getContainerFormatin interfaceImage- Returns:
- the ContainerFormat for the image
-
getDiskFormat
public DiskFormat getDiskFormat()
- Specified by:
getDiskFormatin interfaceImage- Returns:
- the DiskFormat for the image
-
getChecksum
public String getChecksum()
- Specified by:
getChecksumin interfaceImage- Returns:
- MD5 checksum of the image file data
-
getMinDisk
public long getMinDisk()
- Specified by:
getMinDiskin interfaceImage- Returns:
- the minimum disk space required in MB. 0 indicates not set
-
getMinRam
public long getMinRam()
-
getLocation
public String getLocation()
- Specified by:
getLocationin interfaceImage- Returns:
- the URI of the image entry
-
getUpdatedAt
public Date getUpdatedAt()
Timestamp when an image's metadata was last updated, not its image data, as all image data is immutable once stored in Glance- Specified by:
getUpdatedAtin interfaceImage- Returns:
- the last updated date/time
-
getCreatedAt
public Date getCreatedAt()
The timestamp of when the image was created- Specified by:
getCreatedAtin interfaceImage- Returns:
- the created date/time
-
getDeletedAt
@Nullable public Date getDeletedAt()
- Specified by:
getDeletedAtin interfaceImage- Returns:
- the date/time the image was deleted or null
-
getStatus
public Image.Status getStatus()
-
isPublic
public boolean isPublic()
Indicates whether the image is publicly available
-
isDeleted
public boolean isDeleted()
-
isProtected
public boolean isProtected()
- Specified by:
isProtectedin interfaceImage- Returns:
- true if the image is protected
-
getStoreType
public StoreType getStoreType()
This will always be null on any list or get request. It is intented as an option for creating, updating or reserving images- Specified by:
getStoreTypein interfaceImage- Returns:
- the store type
-
getProperties
public Map<String,String> getProperties()
A mapping of free-form key/value pairs that have been saved with the image metadata- Specified by:
getPropertiesin interfaceImage- Returns:
- Map of key to value
-
getCopyFrom
public String getCopyFrom()
- Specified by:
getCopyFromin interfaceImage- Returns:
- the image url as String
-
isProtected
public GlanceImage isProtected(Boolean isProtected)
-
isDeleted
public GlanceImage isDeleted(Boolean isDeleted)
-
status
public GlanceImage status(Image.Status status)
-
createdAt
public GlanceImage createdAt(Date createdAt)
-
updatedAt
public GlanceImage updatedAt(Date updatedAt)
-
deletedAt
public GlanceImage deletedAt(Date deletedAt)
-
size
public GlanceImage size(Long size)
-
location
public GlanceImage location(String location)
-
properties
public GlanceImage properties(Map<String,String> properties)
-
isSnapshot
public boolean isSnapshot()
Determines if this image is a snapshot- Specified by:
isSnapshotin interfaceImage- Returns:
- true if this image is a snapshot
-
-