public final class LibraryModel
extends java.lang.Object
implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructure
LibraryModel
class represents a Content Library
resource model.
A LibraryModel
is a container for a set of items
which represent a usable set of files. The Content Library Service allows for
multiple libraries to be created with separate authorization and sharing
policies.
Each LibraryModel
is a container for a set of ItemModel
instances. Each item is a logical object
in a library, which may have multiple files.
A LibraryModel
may
be local or subscribed. A local library has its source of truth about items
within this Content Library Service. Items may be added to or removed from the
library. A local library may also be private or published. When published, the
library is exposed by a network endpoint and can be used by another Content
Library Service for synchronization. A private local library cannot be used for
synchronization.
A subscribed library is a library which gets its source of truth from another library that may be across a network in another Content Library Service. A subscribed library may have a different name and metadata from the library to which it subscribes, but the set of library items is always the same as those in the source library. Library items cannot be manually added to a subscribed library -- they can only be added by adding new items to the source library.
Modifier and Type | Class and Description |
---|---|
static class |
LibraryModel.Builder
Builder class for
LibraryModel . |
static class |
LibraryModel.LibraryType
The
LibraryType enumeration class defines the type of a LibraryModel . |
Modifier and Type | Field and Description |
---|---|
protected com.vmware.vapi.data.StructValue |
__dynamicStructureFields |
Modifier | Constructor and Description |
---|---|
|
LibraryModel()
Default constructor.
|
protected |
LibraryModel(com.vmware.vapi.data.StructValue __dynamicStructureFields) |
Modifier and Type | Method and Description |
---|---|
<T extends com.vmware.vapi.bindings.Structure> |
_convertTo(java.lang.Class<T> clazz) |
java.lang.String |
_getCanonicalName() |
static java.lang.String |
_getCanonicalTypeName()
Returns the canonical type name.
|
static com.vmware.vapi.bindings.type.StructType |
_getClassType()
WARNING: Internal method, subject to change in future versions.
|
com.vmware.vapi.data.StructValue |
_getDataValue() |
com.vmware.vapi.data.DataValue |
_getDynamicField(java.lang.String fieldName) |
java.util.Set<java.lang.String> |
_getDynamicFieldNames() |
com.vmware.vapi.bindings.type.StructType |
_getType() |
boolean |
_hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz) |
static LibraryModel |
_newInstance(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value. WARNING: The returned object is not fully initialized. |
static LibraryModel |
_newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism. |
void |
_setDynamicField(java.lang.String fieldName,
com.vmware.vapi.data.DataValue fieldValue) |
protected void |
_updateDataValue(com.vmware.vapi.data.StructValue structValue) |
void |
_validate() |
boolean |
equals(java.lang.Object obj) |
java.util.Calendar |
getCreationTime()
The date and time when this library was created.
|
java.lang.String |
getDescription()
A human-readable description for this library.
|
java.lang.String |
getId()
An identifier which uniquely identifies this
LibraryModel . |
java.util.Calendar |
getLastModifiedTime()
The date and time when this library was last updated.
|
java.util.Calendar |
getLastSyncTime()
The date and time when this library was last synchronized.
|
java.lang.String |
getName()
The name of the library.
|
OptimizationInfo |
getOptimizationInfo()
Defines various optimizations and optimization parameters applied to this
library.
|
PublishInfo |
getPublishInfo()
Defines how this library is published so that it can be subscribed to by a
remote subscribed library.
|
java.lang.String |
getSecurityPolicyId()
Represents the security policy applied to this library.
|
java.lang.String |
getServerGuid()
The unique identifier of the vCenter server where the library exists.
|
java.util.List<StorageBacking> |
getStorageBackings()
The list of default storage backings which are available for this library.
|
SubscriptionInfo |
getSubscriptionInfo()
Defines the subscription behavior for this Library.
|
LibraryModel.LibraryType |
getType()
The type (LOCAL, SUBSCRIBED) of this library.
|
java.lang.Boolean |
getUnsetSecurityPolicyId()
This represents the intent of the change to
getSecurityPolicyId() in update method. |
java.lang.String |
getVersion()
A version number which is updated on metadata changes.
|
int |
hashCode() |
void |
setCreationTime(java.util.Calendar creationTime)
The date and time when this library was created.
|
void |
setDescription(java.lang.String description)
A human-readable description for this library.
|
void |
setId(java.lang.String id)
An identifier which uniquely identifies this
LibraryModel . |
void |
setLastModifiedTime(java.util.Calendar lastModifiedTime)
The date and time when this library was last updated.
|
void |
setLastSyncTime(java.util.Calendar lastSyncTime)
The date and time when this library was last synchronized.
|
void |
setName(java.lang.String name)
The name of the library.
|
void |
setOptimizationInfo(OptimizationInfo optimizationInfo)
Defines various optimizations and optimization parameters applied to this
library.
|
void |
setPublishInfo(PublishInfo publishInfo)
Defines how this library is published so that it can be subscribed to by a
remote subscribed library.
|
void |
setSecurityPolicyId(java.lang.String securityPolicyId)
Represents the security policy applied to this library.
|
void |
setServerGuid(java.lang.String serverGuid)
The unique identifier of the vCenter server where the library exists.
|
void |
setStorageBackings(java.util.List<StorageBacking> storageBackings)
The list of default storage backings which are available for this library.
|
void |
setSubscriptionInfo(SubscriptionInfo subscriptionInfo)
Defines the subscription behavior for this Library.
|
void |
setType(LibraryModel.LibraryType type)
The type (LOCAL, SUBSCRIBED) of this library.
|
void |
setUnsetSecurityPolicyId(java.lang.Boolean unsetSecurityPolicyId)
This represents the intent of the change to
getSecurityPolicyId() in update method. |
void |
setVersion(java.lang.String version)
A version number which is updated on metadata changes.
|
java.lang.String |
toString() |
protected com.vmware.vapi.data.StructValue __dynamicStructureFields
public LibraryModel()
protected LibraryModel(com.vmware.vapi.data.StructValue __dynamicStructureFields)
public java.lang.String getId()
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.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 void 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 java.util.Calendar getCreationTime()
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.public void 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 java.lang.String getDescription()
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.public void 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 java.util.Calendar getLastModifiedTime()
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.public void 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 java.util.Calendar getLastSyncTime()
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.public void 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 java.lang.String getName()
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.public void 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 java.util.List<StorageBacking> getStorageBackings()
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.public void 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.LibraryType getType()
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.public void 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 OptimizationInfo getOptimizationInfo()
create
method. It is optional in the
return value of the get
or list
methods. It is optional for the
update
method.public void 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 java.lang.String getVersion()
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.public void 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 PublishInfo getPublishInfo()
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.public void 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 SubscriptionInfo getSubscriptionInfo()
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.public void 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 java.lang.String getServerGuid()
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.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 void 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 java.lang.String getSecurityPolicyId()
Setting the
property will make the library secure. This field is ignored in update
method if getUnsetSecurityPolicyId()
is
set to true
.
create
and update
methods. If
not set in create
method, the library will be insecure. If not specified
in update
method, the property is left unchanged.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 void setSecurityPolicyId(java.lang.String securityPolicyId)
Setting the
property will make the library secure. This field is ignored in update
method if getUnsetSecurityPolicyId()
is
set to true
.
create
and update
methods. If
not set in create
method, the library will be insecure. If not specified
in update
method, the property is left unchanged.securityPolicyId
- 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 java.lang.Boolean getUnsetSecurityPolicyId()
getSecurityPolicyId()
in update
method.
If this field is set to true
, any security policy applied to the
library will be removed. If this field is set to false
, any security
policy applied to library will be changed to the value specified in getSecurityPolicyId()
, if any.
update
method. If null
, any
existing security policy will be changed to the value specified in getSecurityPolicyId()
, if any.public void setUnsetSecurityPolicyId(java.lang.Boolean unsetSecurityPolicyId)
getSecurityPolicyId()
in update
method.
If this field is set to true
, any security policy applied to the
library will be removed. If this field is set to false
, any security
policy applied to library will be changed to the value specified in getSecurityPolicyId()
, if any.
update
method. If null
, any
existing security policy will be changed to the value specified in getSecurityPolicyId()
, if any.unsetSecurityPolicyId
- New value for the property.public com.vmware.vapi.bindings.type.StructType _getType()
_getType
in interface com.vmware.vapi.bindings.StaticStructure
public com.vmware.vapi.data.StructValue _getDataValue()
_getDataValue
in interface com.vmware.vapi.bindings.Structure
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
public void _validate()
_validate
in interface com.vmware.vapi.bindings.StaticStructure
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface com.vmware.vapi.bindings.StaticStructure
toString
in class java.lang.Object
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
_hasTypeNameOf
in interface com.vmware.vapi.bindings.Structure
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
_convertTo
in interface com.vmware.vapi.bindings.Structure
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)
_setDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
_getDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
public java.util.Set<java.lang.String> _getDynamicFieldNames()
_getDynamicFieldNames
in interface com.vmware.vapi.bindings.StaticStructure
public static com.vmware.vapi.bindings.type.StructType _getClassType()
StructType
instance representing the static bindings
type for this Structure
.public java.lang.String _getCanonicalName()
_getCanonicalName
in interface com.vmware.vapi.bindings.Structure
public static java.lang.String _getCanonicalTypeName()
_getCanonicalName()
.public static LibraryModel _newInstance(com.vmware.vapi.data.StructValue structValue)
structValue
- the source of the data contained in the binding object. Could
contain more data than fields of this class can describe i.e.
newer version of the binding object. Could be null.StructType
public static LibraryModel _newInstance2(com.vmware.vapi.data.StructValue structValue)