Class: Com::Vmware::Content::Library::ItemService
- Inherits:
-
VAPI::Bindings::VapiService
- Object
- VAPI::Bindings::VapiService
- Com::Vmware::Content::Library::ItemService
- Defined in:
- /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb
Overview
The ``Com::Vmware::Content::Library::Item`` class provides methods for managing library items.
Defined Under Namespace
Classes: FindSpec
Constant Summary
- RESOURCE_TYPE =
'com.vmware.content.library.Item'
Instance Method Summary (collapse)
-
- (String) copy(source_library_item_id, destination_create_spec, client_token = nil)
Copies a library item.
-
- (String) create(create_spec, client_token = nil)
Creates a new library item.
-
- (Void) delete(library_item_id)
Deletes a library item.
-
- (Array<String>) find(spec)
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested :class:`Com::Vmware::Content::Library::Item::FindSpec` .
-
- (Com::Vmware::Content::Library::ItemModel) get(library_item_id)
Returns the :class:`Com::Vmware::Content::Library::ItemModel` with the given identifier.
-
- (ItemService) initialize(config)
constructor
Constructs a new instance.
-
- (Array<String>) list(library_id)
Returns the identifiers of all items in the given library.
-
- (Void) update(library_item_id, update_spec)
Updates the specified properties of a library item.
Constructor Details
- (ItemService) initialize(config)
Constructs a new instance.
142 143 144 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 142 def initialize(config) super(config, @@service_info) end |
Instance Method Details
- (String) copy(source_library_item_id, destination_create_spec, client_token = nil)
Copies a library item.
Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task.
If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator.
A library item cannot be copied into a subscribed library.
If not specified copy is not idempotent.
181 182 183 184 185 186 187 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 181 def copy(source_library_item_id, destination_create_spec, client_token=nil) invoke_with_info(@@copy_info, { 'client_token' => client_token, 'source_library_item_id' => source_library_item_id, 'destination_create_spec' => destination_create_spec, }) end |
- (String) create(create_spec, client_token = nil)
Creates a new library item.
A new library item is created without any content. After creation, content can be added through the :class:`Com::Vmware::Content::Library::Item::UpdateSession` and :class:`Com::Vmware::Content::Library::Item::Updatesession::File` classs .
A library item cannot be created in a subscribed library.
If not specified creation is not idempotent.
216 217 218 219 220 221 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 216 def create(create_spec, client_token=nil) invoke_with_info(@@create_info, { 'client_token' => client_token, 'create_spec' => create_spec, }) end |
- (Void) delete(library_item_id)
Deletes a library item.
This method will immediately remove the item from the library that owns it. The content of the item will be asynchronously removed from the storage backings. The content deletion can be tracked with a task. In the event that the task fails, an administrator may need to manually remove the files from the storage backing.
This method cannot be used to delete a library item that is a member of a subscribed library. Removing an item from a subscribed library requires deleting the item from the original published local library and syncing the subscribed library.
237 238 239 240 241 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 237 def delete(library_item_id) invoke_with_info(@@delete_info, { 'library_item_id' => library_item_id, }) end |
- (Array<String>) find(spec)
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested :class:`Com::Vmware::Content::Library::Item::FindSpec` .
282 283 284 285 286 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 282 def find(spec) invoke_with_info(@@find_info, { 'spec' => spec, }) end |
- (Com::Vmware::Content::Library::ItemModel) get(library_item_id)
Returns the :class:`Com::Vmware::Content::Library::ItemModel` with the given identifier.
252 253 254 255 256 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 252 def get(library_item_id) invoke_with_info(@@get_info, { 'library_item_id' => library_item_id, }) end |
- (Array<String>) list(library_id)
Returns the identifiers of all items in the given library.
267 268 269 270 271 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 267 def list(library_id) invoke_with_info(@@list_info, { 'library_id' => library_id, }) end |
- (Void) update(library_item_id, update_spec)
Updates the specified properties of a library item.
This is an incremental update to the library item. Fields that are nil in the update specification are left unchanged.
This method cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library.
312 313 314 315 316 317 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library.rb', line 312 def update(library_item_id, update_spec) invoke_with_info(@@update_info, { 'library_item_id' => library_item_id, 'update_spec' => update_spec, }) end |