Class Volume
- java.lang.Object
-
- org.jclouds.openstack.cinder.v1.domain.Volume
-
public class Volume extends Object
An Openstack Cinder Volume.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Volume.Builder
static class
Volume.Status
-
Constructor Summary
Constructors Modifier Constructor Description protected
Volume(String id, Volume.Status status, int size, String zone, Date created, Set<VolumeAttachment> attachments, String volumeType, String snapshotId, String name, String description, Map<String,String> metadata, String tenantId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Volume.Builder
builder()
boolean
equals(Object obj)
static Volume
forId(String volumeId)
Creates a dummy Volume when you need a Volume with just the volumeId.Set<VolumeAttachment>
getAttachments()
Date
getCreated()
String
getDescription()
String
getId()
Map<String,String>
getMetadata()
String
getName()
int
getSize()
String
getSnapshotId()
Volume.Status
getStatus()
String
getTenantId()
String
getVolumeType()
String
getZone()
int
hashCode()
protected com.google.common.base.MoreObjects.ToStringHelper
string()
Volume.Builder
toBuilder()
String
toString()
-
-
-
Constructor Detail
-
Volume
@ConstructorProperties({"id","status","size","availability_zone","created_at","attachments","volume_type","snapshot_id","display_name","display_description","metadata","os-vol-tenant-attr:tenant_id"}) protected Volume(String id, Volume.Status status, int size, String zone, Date created, @Nullable Set<VolumeAttachment> attachments, @Nullable String volumeType, @Nullable String snapshotId, @Nullable String name, @Nullable String description, @Nullable Map<String,String> metadata, @Nullable String tenantId)
-
-
Method Detail
-
builder
public static Volume.Builder builder()
-
toBuilder
public Volume.Builder toBuilder()
-
forId
public static Volume forId(String volumeId)
Creates a dummy Volume when you need a Volume with just the volumeId. Several fields must be set in the returned Volume: 1. status=Status.UNRECOGNIZED 2. zone="nova" 3. created=[The Date the method was called]
-
getId
public String getId()
- Returns:
- the id of this volume
-
getStatus
public Volume.Status getStatus()
- Returns:
- the status of this volume
-
getSize
public int getSize()
- Returns:
- the size in GB of this volume
-
getCreated
public Date getCreated()
- Returns:
- the time this volume was created
-
getAttachments
public Set<VolumeAttachment> getAttachments()
- Returns:
- the set of attachments (to Servers)
-
getName
@Nullable public String getName()
- Returns:
- the name of this volume - as displayed in the openstack console
-
getDescription
@Nullable public String getDescription()
- Returns:
- the description of this volume - as displayed in the openstack console
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-
-