public static class DriveInfo.Builder extends Drive.Builder
Modifier and Type | Field and Description |
---|---|
protected List<String> |
affinities |
protected boolean |
allowMultimount |
protected List<Job> |
jobs |
protected List<DriveLicense> |
licenses |
protected MediaType |
media |
protected Map<String,String> |
meta |
protected List<Server> |
mountedOn |
protected BigInteger |
size |
protected List<String> |
tags |
owner, status
name, resourceUri, uuid
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DriveInfo.Builder |
affinities(List<String> affinities) |
DriveInfo.Builder |
allowMultimount(boolean allowMultimount) |
DriveInfo |
build()
Warning: media, name & size should be specified
|
static DriveInfo.Builder |
fromDriveInfo(DriveInfo in) |
DriveInfo.Builder |
jobs(List<Job> jobs) |
DriveInfo.Builder |
licenses(List<DriveLicense> licenses) |
DriveInfo.Builder |
media(MediaType media) |
DriveInfo.Builder |
meta(Map<String,String> meta) |
DriveInfo.Builder |
mountedOn(List<Server> mountedOn) |
DriveInfo.Builder |
name(String name) |
DriveInfo.Builder |
owner(Owner owner) |
DriveInfo.Builder |
resourceUri(URI resourceUri) |
DriveInfo.Builder |
size(BigInteger size) |
DriveInfo.Builder |
status(DriveStatus status) |
DriveInfo.Builder |
tags(List<String> tags) |
DriveInfo.Builder |
uuid(String uuid) |
equals, hashCode
protected BigInteger size
protected boolean allowMultimount
protected List<DriveLicense> licenses
protected MediaType media
public DriveInfo.Builder size(BigInteger size)
size
- Size of the drive in bytespublic DriveInfo.Builder allowMultimount(boolean allowMultimount)
allowMultimount
- Allow the drive to be mounted on multiple guestspublic DriveInfo.Builder affinities(List<String> affinities)
affinities
- A list of affinities this drive should belong topublic DriveInfo.Builder jobs(List<Job> jobs)
jobs
- Background jobs related to this resourcepublic DriveInfo.Builder licenses(List<DriveLicense> licenses)
licenses
- A list of licences attached to this drivepublic DriveInfo.Builder media(MediaType media)
media
- Media representation typepublic DriveInfo.Builder meta(Map<String,String> meta)
meta
- User defined meta informationpublic DriveInfo.Builder mountedOn(List<Server> mountedOn)
mountedOn
- Servers on which this drive is mounted onpublic DriveInfo.Builder tags(List<String> tags)
tags
- Tags associated with this drivepublic DriveInfo.Builder uuid(String uuid)
uuid
in class Drive.Builder
uuid
- UUID of the drivepublic DriveInfo.Builder name(String name)
name
in class Drive.Builder
name
- Human readable name of the drivepublic DriveInfo.Builder resourceUri(URI resourceUri)
resourceUri
in class Drive.Builder
public DriveInfo.Builder owner(Owner owner)
owner
in class Drive.Builder
owner
- Owner of the drivepublic DriveInfo.Builder status(DriveStatus status)
status
in class Drive.Builder
status
- Status of the drivepublic static DriveInfo.Builder fromDriveInfo(DriveInfo in)
public DriveInfo build()
build
in class Drive.Builder
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.