org.openstack4j.model.storage.block.builder.VolumeBuilder Maven / Gradle / Ivy
package org.openstack4j.model.storage.block.builder;
import java.util.Map;
import org.openstack4j.common.Buildable.Builder;
import org.openstack4j.model.storage.block.Volume;
/**
* Builder used for Creating or Updating Volumes
*
* @author Jeremy Unruh
*/
public interface VolumeBuilder extends Builder {
/**
* See {@link Volume#getName()}
*
* @param name the name of the volume
* @return VolumeBuilder
*/
VolumeBuilder name(String name);
/**
* See {@link Volume#getDescription()} Optional
*
* @param description the description of the volume
* @return VolumeBuilder
*/
VolumeBuilder description(String description);
/**
* To create a volume from an existing volume, specify the ID of the existing volume. Optional
*
* @param uuid the id of an existing volume
* @return VolumeBuilder
*/
VolumeBuilder source_volid(String uuid);
/**
* To create a volume from an existing snapshot, specify the ID of the existing volume snapshot. Optional
*
* @param snapshotId the id of an existing volume snapshot
* @return VolumeBuilder
*/
VolumeBuilder snapshot(String snapshotId);
/**
* The ID of the image from which you want to create the volume. Required to create a bootable volume. Optional
*
* @param imageRef the id of an existing image
* @return VolumeBuilder
*/
VolumeBuilder imageRef(String imageRef);
/**
* The size of the volume, in GB.
*
* @param size the size in GB
* @return VolumeBuilder
*/
VolumeBuilder size(int size);
/**
* The associated volume type. Optional
*
* @param volumeType The associated volume type.
* @return VolumeBuilder
*/
VolumeBuilder volumeType(String volumeType);
/**
* Enables or disables the bootable attribute. You can boot an instance from a bootable volume. Optional
*
* @param isBootable true to enable the bootable flag
* @return VolumeBuilder
*/
VolumeBuilder bootable(boolean isBootable);
/**
* One or more metadata key and value pairs to associate with the volume. Optional
*
* @param metadata metadata to set
* @return VolumeBuilder
*/
VolumeBuilder metadata(Map metadata);
/**
* The associated availability zone. Optional
*
* @param zone The associated availability zone.
* @return VolumeBuilder
*/
VolumeBuilder zone(String zone);
}