Class: Com::Vmware::Content::Library::SubscribedItem

Inherits:
VAPI::Bindings::VapiService
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb

Overview

The ``Com::Vmware::Content::Library::SubscribedItem`` class manages the unique features of library items that are members of a subscribed library.

Instance Method Summary (collapse)

Constructor Details

- (SubscribedItem) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



429
430
431
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 429

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Void) evict(library_item_id)

Evicts the cached content of a library item in a subscribed library.


 This  method  allows the cached content of a library item to be removed to free up storage capacity. This  method  will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set   :attr:`Com::Vmware::Content::Library::ItemModel.cached`   to false.

Parameters:

  • library_item_id (String)

    Identifier of the library item whose content should be evicted.

Returns:

  • (Void)

Raises:



447
448
449
450
451
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 447

def evict(library_item_id)
    invoke_with_info(@@evict_info, {
        'library_item_id' => library_item_id,
    })
end

- (Void) sync(library_item_id, force_sync_content)

Forces the synchronization of an individual library item in a subscribed library.


 Synchronizing an individual item will update that item's metadata from the remote source. If the source library item on the remote library has been deleted, this  method  will delete the library item from the subscribed library as well.  

 The default behavior of the synchronization is determined by the   :class:`Com::Vmware::Content::Library::SubscriptionInfo`   of the library which owns the library item.  

  * If   :attr:`Com::Vmware::Content::Library::SubscriptionInfo.on_demand`   is true, then the file content is not synchronized by default. In this case, only the library item metadata is synchronized. The file content may still be forcefully synchronized by passing true for the  ``force_sync_content``   parameter .
   * If   :attr:`Com::Vmware::Content::Library::SubscriptionInfo.on_demand`   is false, then this call will always synchronize the file content. The  ``force_sync_content``   parameter  is ignored when the subscription is not on-demand.
  
  When the file content has been synchronized, the   :attr:`Com::Vmware::Content::Library::ItemModel.cached`    field  will be true.  

Parameters:

  • library_item_id (String)

    Identifier of the library item to synchronize.

  • force_sync_content (Boolean)

    Whether to synchronize file content as well as metadata. This parameter applies only if the subscription is on-demand.

Returns:

  • (Void)

Raises:



476
477
478
479
480
481
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 476

def sync(library_item_id, force_sync_content)
    invoke_with_info(@@sync_info, {
        'library_item_id' => library_item_id,
        'force_sync_content' => force_sync_content,
    })
end