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

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

Overview

The ``Com::Vmware::Content::Library::Item::Downloadsession::File`` class provides methods for accessing files within a download session.


 After a download session is created against a library item, the  ``Com::Vmware::Content::Library::Item::Downloadsession::File``   class  can be used to retrieve all downloadable content within the library item. Since the content may not be available immediately in a downloadable form on the server side, the client will have to prepare the file and wait for the file status to become   :attr:`Com::Vmware::Content::Library::Item::Downloadsession::File::PrepareStatus.PREPARED`  .  

 See   :class:`Com::Vmware::Content::Library::Item::DownloadSession`  .

Defined Under Namespace

Classes: EndpointType, Info, PrepareStatus

Instance Method Summary (collapse)

Constructor Details

- (File) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



92
93
94
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item/downloadsession.rb', line 92

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

Instance Method Details

- (Com::Vmware::Content::Library::Item::Downloadsession::File::Info) get(download_session_id, file_name)

Retrieves file download information for a specific file.

Parameters:

  • download_session_id (String)

    Identifier of the download session.

  • file_name (String)

    Name of the file requested.

Returns:

Raises:



150
151
152
153
154
155
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item/downloadsession.rb', line 150

def get(download_session_id, file_name)
    invoke_with_info(@@get_info, {
        'download_session_id' => download_session_id,
        'file_name' => file_name,
    })
end

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

Lists the information of all the files in the library item associated with the download session.

Parameters:

  • download_session_id (String)

    Identifier of the download session.

Returns:

Raises:



105
106
107
108
109
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item/downloadsession.rb', line 105

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

- (Com::Vmware::Content::Library::Item::Downloadsession::File::Info) prepare(download_session_id, file_name, endpoint_type = nil)

Requests a file to be prepared for download.


    If not specified the default is   :attr:`Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType.HTTPS`  .

Parameters:

  • download_session_id (String)

    Identifier of the download session.

  • file_name (String)

    Name of the file requested for download.

  • endpoint_type (Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType, nil) (defaults to: nil)

    Endpoint type request, one of ``HTTPS``, ``DIRECT`` . This will determine the type of the :attr:`Com::Vmware::Content::Library::Item::Downloadsession::File::Info.download_endpoint` that is generated when the file is prepared. The :attr:`Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType.DIRECT` is only available to users who have the ContentLibrary.ReadStorage privilege.

Returns:

Raises:



129
130
131
132
133
134
135
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item/downloadsession.rb', line 129

def prepare(download_session_id, file_name, endpoint_type=nil)
    invoke_with_info(@@prepare_info, {
        'download_session_id' => download_session_id,
        'file_name' => file_name,
        'endpoint_type' => endpoint_type,
    })
end