Class CinderVolume.ConcreteVolumeBuilder
- java.lang.Object
-
- org.openstack4j.openstack.storage.block.domain.CinderVolume.ConcreteVolumeBuilder
-
- All Implemented Interfaces:
Buildable.Builder<VolumeBuilder,Volume>,VolumeBuilder
- Enclosing class:
- CinderVolume
public static class CinderVolume.ConcreteVolumeBuilder extends Object implements VolumeBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolumeBuilderbootable(boolean isBootable)Enables or disables the bootable attribute.Volumebuild()Creates and return the Model Entity MVolumeBuilderdescription(String description)SeeVolume.getDescription()OptionalVolumeBuilderfrom(Volume in)Creates a Builder using the param M as the default valuesVolumeBuilderimageRef(String imageRef)The ID of the image from which you want to create the volume.VolumeBuildermetadata(Map<String,String> metadata)One or more metadata key and value pairs to associate with the volume.VolumeBuildermultiattach(Boolean multiattach)To enable this volume to attach to more than one server OptionalVolumeBuildername(String name)SeeVolume.getName()VolumeBuildersize(int size)The size of the volume, in GB.VolumeBuildersnapshot(String snapshotId)To create a volume from an existing snapshot, specify the ID of the existing volume snapshot.VolumeBuildersource_volid(String uuid)To create a volume from an existing volume, specify the ID of the existing volume.VolumeBuildervolumeType(String volumeType)The associated volume type.VolumeBuilderzone(String zone)The associated availability zone.
-
-
-
Method Detail
-
name
public VolumeBuilder name(String name)
Description copied from interface:VolumeBuilderSeeVolume.getName()- Specified by:
namein interfaceVolumeBuilder- Parameters:
name- the name of the volume- Returns:
- VolumeBuilder
-
description
public VolumeBuilder description(String description)
Description copied from interface:VolumeBuilderSeeVolume.getDescription()Optional- Specified by:
descriptionin interfaceVolumeBuilder- Parameters:
description- the description of the volume- Returns:
- VolumeBuilder
-
source_volid
public VolumeBuilder source_volid(String uuid)
Description copied from interface:VolumeBuilderTo create a volume from an existing volume, specify the ID of the existing volume. Optional- Specified by:
source_volidin interfaceVolumeBuilder- Parameters:
uuid- the id of an existing volume- Returns:
- VolumeBuilder
-
snapshot
public VolumeBuilder snapshot(String snapshotId)
Description copied from interface:VolumeBuilderTo create a volume from an existing snapshot, specify the ID of the existing volume snapshot. Optional- Specified by:
snapshotin interfaceVolumeBuilder- Parameters:
snapshotId- the id of an existing volume snapshot- Returns:
- VolumeBuilder
-
imageRef
public VolumeBuilder imageRef(String imageRef)
Description copied from interface:VolumeBuilderThe ID of the image from which you want to create the volume. Required to create a bootable volume. Optional- Specified by:
imageRefin interfaceVolumeBuilder- Parameters:
imageRef- the id of an existing image- Returns:
- VolumeBuilder
-
multiattach
public VolumeBuilder multiattach(Boolean multiattach)
Description copied from interface:VolumeBuilderTo enable this volume to attach to more than one server Optional- Specified by:
multiattachin interfaceVolumeBuilder- Returns:
- VolumeBuilder
-
size
public VolumeBuilder size(int size)
Description copied from interface:VolumeBuilderThe size of the volume, in GB.- Specified by:
sizein interfaceVolumeBuilder- Parameters:
size- the size in GB- Returns:
- VolumeBuilder
-
volumeType
public VolumeBuilder volumeType(String volumeType)
Description copied from interface:VolumeBuilderThe associated volume type. Optional- Specified by:
volumeTypein interfaceVolumeBuilder- Parameters:
volumeType- The associated volume type.- Returns:
- VolumeBuilder
-
bootable
public VolumeBuilder bootable(boolean isBootable)
Description copied from interface:VolumeBuilderEnables or disables the bootable attribute. You can boot an instance from a bootable volume. Optional- Specified by:
bootablein interfaceVolumeBuilder- Parameters:
isBootable- true to enable the bootable flag- Returns:
- VolumeBuilder
-
metadata
public VolumeBuilder metadata(Map<String,String> metadata)
Description copied from interface:VolumeBuilderOne or more metadata key and value pairs to associate with the volume. Optional- Specified by:
metadatain interfaceVolumeBuilder- Parameters:
metadata- metadata to set- Returns:
- VolumeBuilder
-
build
public Volume build()
Description copied from interface:Buildable.BuilderCreates and return the Model Entity M- Specified by:
buildin interfaceBuildable.Builder<VolumeBuilder,Volume>- Returns:
- M instance
-
from
public VolumeBuilder from(Volume in)
Description copied from interface:Buildable.BuilderCreates a Builder using the param M as the default values- Specified by:
fromin interfaceBuildable.Builder<VolumeBuilder,Volume>- Returns:
- Builder
-
zone
public VolumeBuilder zone(String zone)
Description copied from interface:VolumeBuilderThe associated availability zone. Optional- Specified by:
zonein interfaceVolumeBuilder- Parameters:
zone- The associated availability zone.- Returns:
- VolumeBuilder
-
-