public static final class DownloadSessionModel.Builder
extends java.lang.Object
DownloadSessionModel
.Constructor and Description |
---|
Builder()
Constructor with parameters for the required properties of
DownloadSessionModel . |
Modifier and Type | Method and Description |
---|---|
DownloadSessionModel |
build() |
DownloadSessionModel.Builder |
setClientProgress(java.lang.Long clientProgress)
The progress that has been made with the download.
|
DownloadSessionModel.Builder |
setErrorMessage(LocalizableMessage errorMessage)
If the session is in the
DownloadSessionModel.State.ERROR status this
property will have more details about the error. |
DownloadSessionModel.Builder |
setExpirationTime(java.util.Calendar expirationTime)
Indicates the time after which the session will expire.
|
DownloadSessionModel.Builder |
setId(java.lang.String id)
The identifier of this download session.
|
DownloadSessionModel.Builder |
setLibraryItemContentVersion(java.lang.String libraryItemContentVersion)
The content version of the library item whose content is being downloaded.
|
DownloadSessionModel.Builder |
setLibraryItemId(java.lang.String libraryItemId)
The identifier of the library item whose content is being downloaded.
|
DownloadSessionModel.Builder |
setState(DownloadSessionModel.State state)
The current state (ACTIVE, CANCELED, ERROR) of the download session.
|
public Builder()
DownloadSessionModel
.public DownloadSessionModel.Builder setId(java.lang.String id)
create
method. It will not be present
in the return value of the get
or list
methods. It is not used
for the update
method.id
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.library.item.DownloadSession
. When methods return a value of
this class as a return value, the property will be an identifier for the
resource type: com.vmware.content.library.item.DownloadSession
.public DownloadSessionModel.Builder setLibraryItemId(java.lang.String libraryItemId)
create
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.libraryItemId
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.library.Item
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.library.Item
.public DownloadSessionModel.Builder setLibraryItemContentVersion(java.lang.String libraryItemContentVersion)
ItemModel.getContentVersion()
at
the time when the session is created for the library item.
This property is not used for the create
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.libraryItemContentVersion
- New value for the property.public DownloadSessionModel.Builder setErrorMessage(LocalizableMessage errorMessage)
DownloadSessionModel.State.ERROR
status this
property will have more details about the error.
This property is not used for the create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.errorMessage
- New value for the property.public DownloadSessionModel.Builder setClientProgress(java.lang.Long clientProgress)
create
method. It will always be
present in the return value of the get
or list
methods. It is
optional for the update
method.clientProgress
- New value for the property.public DownloadSessionModel.Builder setState(DownloadSessionModel.State state)
create
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.state
- New value for the property.public DownloadSessionModel.Builder setExpirationTime(java.util.Calendar expirationTime)
create
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.expirationTime
- New value for the property.public DownloadSessionModel build()