Nova VolumeClient: improving javadocs

This commit is contained in:
Adam Lowe 2012-04-24 16:39:33 +01:00
parent 01c6a48786
commit 1dfcc6cde5
3 changed files with 24 additions and 5 deletions

View File

@ -84,56 +84,67 @@ public class Volume {
private String description;
private Map<String, String> metadata = Maps.newHashMap();
/** @see Volume#getId() */
public T id(String id) {
this.id = id;
return self();
}
/** @see Volume#getStatus() */
public T status(Status status) {
this.status = status;
return self();
}
/** @see Volume#getSize() */
public T size(int size) {
this.size = size;
return self();
}
/** @see Volume#getZone() */
public T zone(String zone) {
this.zone = zone;
return self();
}
/** @see Volume#getCreated() */
public T created(Date created) {
this.created = created;
return self();
}
/** @see Volume#getAttachments() */
public T attachments(Set<VolumeAttachment> attachments) {
this.attachments = attachments;
return self();
}
/** @see Volume#getVolumeType() */
public T volumeType(String volumeType) {
this.volumeType = volumeType;
return self();
}
/** @see Volume#getSnapshotId() */
public T snapshotId(String snapshotId) {
this.snapshotId = snapshotId;
return self();
}
/** @see Volume#getMetadata() */
public T metadata(Map<String, String> metadata) {
this.metadata = metadata;
return self();
}
/** @see Volume#getName() */
public T name(String name) {
this.name = name;
return self();
}
/** @see Volume#getDescription() */
public T description(String description) {
this.description = description;
return self();
@ -247,9 +258,6 @@ public class Volume {
return this.volumeType;
}
/**
* @return the snapshot id this volume is associated with.
*/
@Nullable
public String getSnapshotId() {
return this.snapshotId;

View File

@ -46,21 +46,25 @@ public class VolumeAttachment {
private String serverId;
private String device;
/** @see VolumeAttachment#getId() */
public T id(String id) {
this.id = id;
return self();
}
/** @see VolumeAttachment#getVolumeId() */
public T volumeId(String volumeId) {
this.volumeId = volumeId;
return self();
}
/** @see VolumeAttachment#getServerId() */
public T serverId(String serverId) {
this.serverId = serverId;
return self();
}
/** @see VolumeAttachment#getDevice() */
public T device(String device) {
this.device = device;
return self();

View File

@ -52,36 +52,43 @@ public class VolumeSnapshot {
private String name;
private String description;
/** @see VolumeSnapshot#getId() */
public T id(String id) {
this.id = id;
return self();
}
/** @see VolumeSnapshot#getVolumeId() */
public T volumeId(String volumeId) {
this.volumeId = volumeId;
return self();
}
/** @see VolumeSnapshot#getStatus() */
public T status(Volume.Status status) {
this.status = status;
return self();
}
/** @see VolumeSnapshot#getSize() */
public T size(int size) {
this.size = size;
return self();
}
/** @see VolumeSnapshot#getCreated() */
public T created(Date created) {
this.created = created;
return self();
}
/** @see VolumeSnapshot#getName() */
public T name(String name) {
this.name = name;
return self();
}
/** @see VolumeSnapshot#getDescription() */
public T description(String description) {
this.description = description;
return self();