VMware vCloud Suite SDK Perl
The VMware vCloud Suite SDK for Perl supports the client-side vCloud Suite API for access to vCloud services and capabilities
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Content::Library::Item::Downloadsession::File Class Reference
Inheritance diagram for Com::Vmware::Content::Library::Item::Downloadsession::File:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  EndpointType
 
class  Info
 
class  PrepareStatus
 

Avaliable Methods

public method get ()
 
public method new ()
 
public method prepare ()
 
public method list ()
 

Detailed Description

The Com::Vmware::Content::Library::Item::Downloadsession::File interface 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 interface 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 .

Member Function Documentation

public method Com::Vmware::Content::Library::Item::Downloadsession::File::get ( )

Retrieves file download information for a specific file. Note: Privileges required for this operation are System.Read, System.Anonymous.

Parameters
download_session_id[REQUIRED] Identifier of the download session. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
file_name[REQUIRED] Name of the file requested. . The value must be String.
Return values
Theclass Com::Vmware::Content::Library::Item::Downloadsession::File::Info instance containing the status of the file and its download link if available. The return type will be Com::Vmware::Content::Library::Item::Downloadsession::File::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the download session associated with download_session_id does not exist.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif there is no file with the specified file_name .
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have all of the privileges described as follows:
  • The resource com.vmware.content.library.Item referenced by the parameter libraryItemId requires System.Read .
Code:
click to view
public method Com::Vmware::Content::Library::Item::Downloadsession::File::list ( )

Lists the information of all the files in the library item associated with the download session. Note: Privileges required for this operation are System.Read, System.Anonymous.

Parameters
download_session_id[REQUIRED] Identifier of the download session. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
Return values
Thelist of class Com::Vmware::Content::Library::Item::Downloadsession::File::Info instances. The return type will be Array of Com::Vmware::Content::Library::Item::Downloadsession::File::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the download session associated with download_session_id doesn't exist.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have all of the privileges described as follows:
  • The resource com.vmware.content.library.Item referenced by the parameter libraryItemId requires System.Read .
Code:
click to view
public method Com::Vmware::Content::Library::Item::Downloadsession::File::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view
public method Com::Vmware::Content::Library::Item::Downloadsession::File::prepare ( )

Requests a file to be prepared for download. Note: Privileges required for this operation are System.Anonymous.

Parameters
download_session_id[REQUIRED] Identifier of the download session. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.item.DownloadSession). . The value must be str.
file_name[REQUIRED] Name of the file requested for download. . The value must be String.
endpoint_type[OPTIONAL] 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. If not specified the default is :attr:Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType.HTTPS. The value must be Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType or None.
Return values
Fileinformation containing the status of the request and the download link to the file. The return type will be Com::Vmware::Content::Library::Item::Downloadsession::File::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the download session does not exist.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif there is no file with the specified file_name .
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the the download session wasn't created with the ContentLibrary.ReadStorage privilege and the caller requested a :attr:Com::Vmware::Content::Library::Item::Downloadsession::File::EndpointType.DIRECT endpoint type.
Code:
click to view

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