public static final class LibraryModel.Builder
extends java.lang.Object
LibraryModel
.Constructor and Description |
---|
Builder()
Constructor with parameters for the required properties of
LibraryModel . |
Modifier and Type | Method and Description |
---|---|
LibraryModel |
build() |
LibraryModel.Builder |
setCreationTime(java.util.Calendar creationTime)
The date and time when this library was created.
|
LibraryModel.Builder |
setDescription(java.lang.String description)
A human-readable description for this library.
|
LibraryModel.Builder |
setId(java.lang.String id)
An identifier which uniquely identifies this
LibraryModel . |
LibraryModel.Builder |
setLastModifiedTime(java.util.Calendar lastModifiedTime)
The date and time when this library was last updated.
|
LibraryModel.Builder |
setLastSyncTime(java.util.Calendar lastSyncTime)
The date and time when this library was last synchronized.
|
LibraryModel.Builder |
setName(java.lang.String name)
The name of the library.
|
LibraryModel.Builder |
setOptimizationInfo(OptimizationInfo optimizationInfo)
Defines various optimizations and optimization parameters applied to this
library.
|
LibraryModel.Builder |
setPublishInfo(PublishInfo publishInfo)
Defines how this library is published so that it can be subscribed to by a
remote subscribed library.
|
LibraryModel.Builder |
setServerGuid(java.lang.String serverGuid)
The unique identifier of the vCenter server where the library exists.
|
LibraryModel.Builder |
setStorageBackings(java.util.List<StorageBacking> storageBackings)
The list of default storage backings which are available for this library.
|
LibraryModel.Builder |
setSubscriptionInfo(SubscriptionInfo subscriptionInfo)
Defines the subscription behavior for this Library.
|
LibraryModel.Builder |
setType(LibraryModel.LibraryType type)
The type (LOCAL, SUBSCRIBED) of this library.
|
LibraryModel.Builder |
setVersion(java.lang.String version)
A version number which is updated on metadata changes.
|
public Builder()
LibraryModel
.public LibraryModel.Builder setId(java.lang.String id)
LibraryModel
.
This property is not used for the 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
. 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
.public LibraryModel.Builder setCreationTime(java.util.Calendar creationTime)
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.creationTime
- New value for the property.public LibraryModel.Builder setDescription(java.lang.String description)
create
method. Leaving it null
during creation will result in an empty string value. It will always be present
in the result of a get
or list
method. It is optional for the
update
method. Leaving it null
during update indicates that the
description should be left unchanged.description
- New value for the property.public LibraryModel.Builder setLastModifiedTime(java.util.Calendar lastModifiedTime)
This property is updated automatically when the library properties are changed. This property is not affected by adding, removing, or modifying a library item or its content within the library. Tagging the library or syncing the subscribed library does not alter this property.
This property is not used for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.lastModifiedTime
- New value for the property.public LibraryModel.Builder setLastSyncTime(java.util.Calendar lastSyncTime)
This property
applies only to subscribed libraries. It is updated every time a synchronization
is triggered on the library. The value is null
for a local library.
create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.lastSyncTime
- New value for the property.public LibraryModel.Builder setName(java.lang.String name)
A Library is identified by a human-readable name. Library names cannot be undefined or an empty string. Names do not have to be unique.
This property must be provided for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
optional for the update
method.name
- New value for the property.public LibraryModel.Builder setStorageBackings(java.util.List<StorageBacking> storageBackings)
A StorageBacking
defines a default storage
location which can be used to store files for library items in this library.
Some library items, for instance, virtual machine template items, support files
that may be distributed across various storage backings. One or more item files
may or may not be located on the default storage backing.
Multiple default storage locations are not currently supported but may become supported in future releases.
This property must be provided for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.storageBackings
- New value for the property.public LibraryModel.Builder setType(LibraryModel.LibraryType type)
This value can be used to
determine what additional services and information can be available for this
library. This property is not used for the create
and update
methods. It will always be present in the result of a get
method.
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.type
- New value for the property.public LibraryModel.Builder setOptimizationInfo(OptimizationInfo optimizationInfo)
create
method. It is optional in the
return value of the get
or list
methods. It is optional for the
update
method.optimizationInfo
- New value for the property.public LibraryModel.Builder setVersion(java.lang.String version)
This value represents a number which is incremented every time library properties, such as name or description, are changed. It is not incremented by changes to a library item within the library, including adding or removing items. It is also not affected by tagging the library.
This property is not used for thecreate
method. It will always be
present in the result of a get
or list
method. It is optional
for the update
method. Leaving it null
during update indicates
that you do not need to detect concurrent updates.version
- New value for the property.public LibraryModel.Builder setPublishInfo(PublishInfo publishInfo)
The PublishInfo
defines where and how the metadata for
this local library is accessible. A local library is only published publically
if PublishInfo.getPublished()
is true
.
create
and update
methods. If
not specified during creation, the default is for the library to not be
published. If not specified during update, the property is left unchanged.publishInfo
- New value for the property.public LibraryModel.Builder setSubscriptionInfo(SubscriptionInfo subscriptionInfo)
The SubscriptionInfo
defines how this subscribed library
synchronizes to a remote source. Setting the value will determine the remote
source to which the library synchronizes, and how. Changing the subscription
will result in synchronizing to a new source. If the new source differs from the
old one, the old library items and data will be lost. Setting SubscriptionInfo.getAutomaticSyncEnabled()
to false
will halt subscription but will not remove existing cached data.
create
and update
methods. If
not specified during creation, a default will be created without an active
subscription. If not specified during update, the property is left unchanged.subscriptionInfo
- New value for the property.public LibraryModel.Builder setServerGuid(java.lang.String serverGuid)
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.serverGuid
- 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.vcenter.VCenter
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.vcenter.VCenter
.public LibraryModel build()