VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Content::LibraryModel Class Reference
Inheritance diagram for Com::Vmware::Content::LibraryModel:

## Classes
class | LibraryType

## Avaliable Methods
public method | set_publish_info ()
public method | get_optimization_info ()
public method | get_last_sync_time ()
public method | set_type ()
public method | set_creation_time ()
public method | get_id ()
public method | set_optimization_info ()
public method | set_name ()
public method | get_last_modified_time ()
public method | get_creation_time ()
public method | get_subscription_info ()
public method | get_server_guid ()
public method | get_version ()
public method | set_storage_backings ()
public method | new ()
public method | set_last_sync_time ()
public method | set_version ()
public method | set_description ()
public method | set_id ()
public method | set_server_guid ()
public method | get_storage_backings ()
public method | set_last_modified_time ()
public method | set_subscription_info ()
public method | get_description ()
public method | get_type ()
public method | get_publish_info ()
public method | get_name ()

## Detailed Description

The class Com::Vmware::Content::LibraryModel class represents a Content Library resource model.

A `Com::Vmware::Content::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 `Com::Vmware::Content::LibraryModel` is a container for a set of class Com::Vmware::Content::Library::ItemModel instances. Each item is a logical object in a library, which may have multiple files.

A `Com::Vmware::Content::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.

## Member Function Documentation

public method Com::Vmware::Content::LibraryModel::get_creation_time | ( |  | ) |

Gets the value of 'creation_time' property.

Return values

  creation_time | - The current value of the field. The date and time when this library was created. optional#

Code:
click to view
# Number of lines of code in get_creation_time: 4
sub get_creation_time {
my ($self, %args) = @_;
return $self->{'creation_time'};
}

public method Com::Vmware::Content::LibraryModel::get_description | ( |  | ) |

Gets the value of 'description' property.

Return values

  description | - The current value of the field. A human-readable description for this library. optional#

Code:
click to view
# Number of lines of code in get_description: 4
sub get_description {
my ($self, %args) = @_;
return $self->{'description'};
}

public method Com::Vmware::Content::LibraryModel::get_id | ( |  | ) |

Gets the value of 'id' property.

Return values

  id | - The current value of the field. An identifier which uniquely identifies this `Com::Vmware::Content::LibraryModel` . optional#

Code:
click to view
# Number of lines of code in get_id: 4
sub get_id {
my ($self, %args) = @_;
return $self->{'id'};
}

public method Com::Vmware::Content::LibraryModel::get_last_modified_time | ( |  | ) |

Gets the value of 'last_modified_time' property.

Return values

  last_modified_time | - The current value of the field. The date and time when this library was last updated.

This field is updated automatically when the library properties are changed. This field* 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 field .

optional#

Code:
click to view
# Number of lines of code in get_last_modified_time: 4
sub get_last_modified_time {
my ($self, %args) = @_;
return $self->{'last_modified_time'};
}

public method Com::Vmware::Content::LibraryModel::get_last_sync_time | ( |  | ) |

Gets the value of 'last_sync_time' property.

Return values

  last_sync_time | - The current value of the field. The date and time when this library was last synchronized.

This field 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.

optional#

Code:
click to view
# Number of lines of code in get_last_sync_time: 4
sub get_last_sync_time {
my ($self, %args) = @_;
return $self->{'last_sync_time'};
}

public method Com::Vmware::Content::LibraryModel::get_name | ( |  | ) |

Gets the value of 'name' property.

Return values

  name | - The current value of the field. The name of the library.

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.

optional#

Code:
click to view
# Number of lines of code in get_name: 4
sub get_name {
my ($self, %args) = @_;
return $self->{'name'};
}

public method Com::Vmware::Content::LibraryModel::get_optimization_info | ( |  | ) |

Gets the value of 'optimization_info' property.

Return values

  optimization_info | - The current value of the field. Defines various optimizations and optimization parameters applied to this library. optional#

Code:
click to view
# Number of lines of code in get_optimization_info: 4
sub get_optimization_info {
my ($self, %args) = @_;
return $self->{'optimization_info'};
}

public method Com::Vmware::Content::LibraryModel::get_publish_info | ( |  | ) |

Gets the value of 'publish_info' property.

Return values

  publish_info | - The current value of the field. Defines how this library is published so that it can be subscribed to by a remote subscribed library.

The class Com::Vmware::Content::Library::PublishInfo defines where and how the metadata for this local library is accessible. A local library is only published publically if :attr:`Com::Vmware::Content::Library::PublishInfo.published` is `true` .

optional#

Code:
click to view
# Number of lines of code in get_publish_info: 4
sub get_publish_info {
my ($self, %args) = @_;
return $self->{'publish_info'};
}

public method Com::Vmware::Content::LibraryModel::get_server_guid | ( |  | ) |

Gets the value of 'server_guid' property.

Return values

  server_guid | - The current value of the field. The unique identifier of the vCenter server where the library exists. optional#

Code:
click to view
# Number of lines of code in get_server_guid: 4
sub get_server_guid {
my ($self, %args) = @_;
return $self->{'server_guid'};
}

public method Com::Vmware::Content::LibraryModel::get_storage_backings | ( |  | ) |

Gets the value of 'storage_backings' property.

Return values

  storage_backings | - The current value of the field. The list of storage backings which are available for this library.

A class Com::Vmware::Content::Library::StorageBacking defines a storage location which can be used to store files for the library items in this library. Multiple storage locations are not currently supported but may become supported in future releases.

optional#

Code:
click to view
# Number of lines of code in get_storage_backings: 4
sub get_storage_backings {
my ($self, %args) = @_;
return $self->{'storage_backings'};
}

public method Com::Vmware::Content::LibraryModel::get_subscription_info | ( |  | ) |

Gets the value of 'subscription_info' property.

Return values

  subscription_info | - The current value of the field. Defines the subscription behavior for this Library.

The class Com::Vmware::Content::Library::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 :attr:`Com::Vmware::Content::Library::SubscriptionInfo.automatic_sync_enabled` to false will halt subscription but will not remove existing cached data.

optional#

Code:
click to view
# Number of lines of code in get_subscription_info: 4
sub get_subscription_info {
my ($self, %args) = @_;
return $self->{'subscription_info'};
}

public method Com::Vmware::Content::LibraryModel::get_type | ( |  | ) |

Gets the value of 'type' property.

Return values

  type | - The current value of the field. The type (LOCAL, SUBSCRIBED) of this library.

This value can be used to determine what additional services and information can be available for this library.

optional#

Code:
click to view
# Number of lines of code in get_type: 4
sub get_type {
my ($self, %args) = @_;
return $self->{'type'};
}

public method Com::Vmware::Content::LibraryModel::get_version | ( |  | ) |

Gets the value of 'version' property.

Return values

  version | - The current value of the field. A version number which is updated on metadata changes. This value allows clients to detect concurrent updates and prevent accidental clobbering of data.

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.

optional#

Code:
click to view
# Number of lines of code in get_version: 4
sub get_version {
my ($self, %args) = @_;
return $self->{'version'};
}

public method Com::Vmware::Content::LibraryModel::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Content::LibraryModel structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 40
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{id} = $args{'id'};
$self->{creation_time} = $args{'creation_time'};
$self->{description} = $args{'description'};
$self->{last_modified_time} = $args{'last_modified_time'};
$self->{last_sync_time} = $args{'last_sync_time'};
$self->{name} = $args{'name'};
$self->{storage_backings} = $args{'storage_backings'};
$self->{type} = $args{'type'};
$self->{optimization_info} = $args{'optimization_info'};
$self->{version} = $args{'version'};
$self->{publish_info} = $args{'publish_info'};
$self->{subscription_info} = $args{'subscription_info'};
$self->{server_guid} = $args{'server_guid'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Content::LibraryModel');
$self->set_binding_name('name' => 'com.vmware.content.library_model');
$self->set_binding_field('key' => 'id', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'creation_time', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::DateTimeType()));
$self->set_binding_field('key' => 'description', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'last_modified_time', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::DateTimeType()));
$self->set_binding_field('key' => 'last_sync_time', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::DateTimeType()));
$self->set_binding_field('key' => 'name', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'storage_backings', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content::Library', 'type_name' => 'StorageBacking'))));
$self->set_binding_field('key' => 'type', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content', 'type_name' => 'LibraryModel::LibraryType')));
$self->set_binding_field('key' => 'optimization_info', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content::Library', 'type_name' => 'OptimizationInfo')));
$self->set_binding_field('key' => 'version', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'publish_info', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content::Library', 'type_name' => 'PublishInfo')));
$self->set_binding_field('key' => 'subscription_info', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content::Library', 'type_name' => 'SubscriptionInfo')));
$self->set_binding_field('key' => 'server_guid', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
bless $self, $class;
return $self;
}

public method Com::Vmware::Content::LibraryModel::set_creation_time | ( |  | ) |

Sets the given value for 'creation_time' property.

Parameters

  creation_time | - New value for the field. The date and time when this library was created.

Code:
click to view
# Number of lines of code in set_creation_time: 5
sub set_creation_time {
my ($self, %args) = @_;
$self->{'creation_time'} = $args{'creation_time'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_description | ( |  | ) |

Sets the given value for 'description' property.

Parameters

  description | - New value for the field. A human-readable description for this library.

Code:
click to view
# Number of lines of code in set_description: 5
sub set_description {
my ($self, %args) = @_;
$self->{'description'} = $args{'description'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_id | ( |  | ) |

Sets the given value for 'id' property.

Parameters

  id | - New value for the field. An identifier which uniquely identifies this `Com::Vmware::Content::LibraryModel` .

Code:
click to view
# Number of lines of code in set_id: 5
sub set_id {
my ($self, %args) = @_;
$self->{'id'} = $args{'id'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_last_modified_time | ( |  | ) |

Sets the given value for 'last_modified_time' property.

Parameters

  last_modified_time | - New value for the field. The date and time when this library was last updated.

This field is updated automatically when the library properties are changed. This field* 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 field .

Code:
click to view
# Number of lines of code in set_last_modified_time: 5
sub set_last_modified_time {
my ($self, %args) = @_;
$self->{'last_modified_time'} = $args{'last_modified_time'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_last_sync_time | ( |  | ) |

Sets the given value for 'last_sync_time' property.

Parameters

  last_sync_time | - New value for the field. The date and time when this library was last synchronized.

This field 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.

Code:
click to view
# Number of lines of code in set_last_sync_time: 5
sub set_last_sync_time {
my ($self, %args) = @_;
$self->{'last_sync_time'} = $args{'last_sync_time'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_name | ( |  | ) |

Sets the given value for 'name' property.

Parameters

  name | - New value for the field. The name of the library.

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.

Code:
click to view
# Number of lines of code in set_name: 5
sub set_name {
my ($self, %args) = @_;
$self->{'name'} = $args{'name'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_optimization_info | ( |  | ) |

Sets the given value for 'optimization_info' property.

Parameters

  optimization_info | - New value for the field. Defines various optimizations and optimization parameters applied to this library.

Code:
click to view
# Number of lines of code in set_optimization_info: 5
sub set_optimization_info {
my ($self, %args) = @_;
$self->{'optimization_info'} = $args{'optimization_info'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_publish_info | ( |  | ) |

Sets the given value for 'publish_info' property.

Parameters

  publish_info | - New value for the field. Defines how this library is published so that it can be subscribed to by a remote subscribed library.

The class Com::Vmware::Content::Library::PublishInfo defines where and how the metadata for this local library is accessible. A local library is only published publically if :attr:`Com::Vmware::Content::Library::PublishInfo.published` is `true` .

Code:
click to view
# Number of lines of code in set_publish_info: 5
sub set_publish_info {
my ($self, %args) = @_;
$self->{'publish_info'} = $args{'publish_info'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_server_guid | ( |  | ) |

Sets the given value for 'server_guid' property.

Parameters

  server_guid | - New value for the field. The unique identifier of the vCenter server where the library exists.

Code:
click to view
# Number of lines of code in set_server_guid: 5
sub set_server_guid {
my ($self, %args) = @_;
$self->{'server_guid'} = $args{'server_guid'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_storage_backings | ( |  | ) |

Sets the given value for 'storage_backings' property.

Parameters

  storage_backings | - New value for the field. The list of storage backings which are available for this library.

A class Com::Vmware::Content::Library::StorageBacking defines a storage location which can be used to store files for the library items in this library. Multiple storage locations are not currently supported but may become supported in future releases.

Code:
click to view
# Number of lines of code in set_storage_backings: 5
sub set_storage_backings {
my ($self, %args) = @_;
$self->{'storage_backings'} = $args{'storage_backings'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_subscription_info | ( |  | ) |

Sets the given value for 'subscription_info' property.

Parameters

  subscription_info | - New value for the field. Defines the subscription behavior for this Library.

The class Com::Vmware::Content::Library::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 :attr:`Com::Vmware::Content::Library::SubscriptionInfo.automatic_sync_enabled` to false will halt subscription but will not remove existing cached data.

Code:
click to view
# Number of lines of code in set_subscription_info: 5
sub set_subscription_info {
my ($self, %args) = @_;
$self->{'subscription_info'} = $args{'subscription_info'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_type | ( |  | ) |

Sets the given value for 'type' property.

Parameters

  type | - New value for the field. The type (LOCAL, SUBSCRIBED) of this library.

This value can be used to determine what additional services and information can be available for this library.

Code:
click to view
# Number of lines of code in set_type: 5
sub set_type {
my ($self, %args) = @_;
$self->{'type'} = $args{'type'};
return;
}

public method Com::Vmware::Content::LibraryModel::set_version | ( |  | ) |

Sets the given value for 'version' property.

Parameters

  version | - New value for the field. A version number which is updated on metadata changes. This value allows clients to detect concurrent updates and prevent accidental clobbering of data.

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.

Code:
click to view
# Number of lines of code in set_version: 5
sub set_version {
my ($self, %args) = @_;
$self->{'version'} = $args{'version'};
return;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Content/LibraryModel.pm