Class List Method List File List

# Class: Com::Vmware::Content::Library::Item::File

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Content::Library::Item::File
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb

## Overview

The ``Com::Vmware::Content::Library::Item::File`` class can be used to query for information on the files within a library item. Files are objects which are added to a library item through the :class:`Com::Vmware::Content::Library::Item::UpdateSession` and :class:`Com::Vmware::Content::Library::Item::Updatesession::File` classs .

## Defined Under Namespace

Classes: ChecksumAlgorithm, ChecksumInfo, Info

## Instance Method Summary (collapse)

- - (Com::Vmware::Content::Library::Item::File::Info) get(library_item_id, name)

  Retrieves the information for a single file in a library item by its name.

- - (File) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Content::Library::Item::File::Info>) list(library_item_id)

  Lists all of the files that are stored within a given library item.

## Constructor Details

### - (`File`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    328
    329
    330
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 328

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

## Instance Method Details

### - (`Com::Vmware::Content::Library::Item::File::Info`) get(library_item_id, name)

Retrieves the information for a single file in a library item by its name.

Parameters:

- library_item_id (`String`) —

  Identifier of the library item whose file information should be returned.

- name (`String`) —

  Name of the file in the library item whose information should be returned.

Returns:

- (`Com::Vmware::Content::Library::Item::File::Info`) —

  The :class:`Com::Vmware::Content::Library::Item::File::Info` object with information on the specified file.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if ``library_item_id`` refers to a library item that does not exist.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if ``name`` refers to a file that does not exist in the library item.

    345
    346
    347
    348
    349
    350
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 345

    def get(library_item_id, name)
        invoke_with_info(@@get_info, {
            'library_item_id' => library_item_id,
            'name' => name,
        })
    end

### - (`Array<Com::Vmware::Content::Library::Item::File::Info>`) list(library_item_id)

Lists all of the files that are stored within a given library item.

Parameters:

- library_item_id (`String`) —

  Identifier of the library item whose files should be listed.

Returns:

- (`Array<Com::Vmware::Content::Library::Item::File::Info>`) —

  The list of all of the files that are stored within the given library item.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if ``library_item_id`` refers to a library item that does not exist.

    361
    362
    363
    364
    365
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 361

    def list(library_item_id)
        invoke_with_info(@@list_info, {
            'library_item_id' => library_item_id,
        })
    end