Class

# VMware_VCloud_SDK_Media

class VMware_VCloud_SDK_Media extends VMware_VCloud_SDK_Abstract

## Methods

string | getEntityId() Get vCloud ID of the vCloud resource entity from its data object. | from VMware_VCloud_SDK_Abstract
VMware_VCloud_API_ReferenceType | getMediaRef() Get a reference to a VMware vCloud media entity. |
VMware_VCloud_API_MediaType | getMedia() Get a VMware vCloud media entity. |
string | getId() Constructs vCloud ID of the media from its UUID. |
VMware_VCloud_API_LinkType|null | getVdcRef() Get the link to the container of the media. |
VMware_VCloud_API_VdcType | getVdc() Get the container entity, a vDC, of the media |
VMware_VCloud_API_TaskType | modify(string $name = null, string $description = null) Modify name and/or description of the media. |
VMware_VCloud_API_TaskType | delete() Delete a VMware vCloud virtual media. |
VMware_VCloud_API_LinkType|null | getCatalogItemLink() Get a reference to a VMware vCloud catalog entity. |
boolean | isPartOfCatalogItem() Returns true if media is in Catalog, otherwise false. |
VMware_VCloud_API_TaskType | deleteMedia() Deletes media and its catalog item. |
VMware_VCloud_API_OwnerType | getOwner() Get media owner. |
VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null | getMetadata(string $key = null, string $domain = null) Get metadata associated with the media or metadata associated with the media for the specified key in the specified domain. |
VMware_VCloud_API_TaskType | mergeMetadata(VMware_VCloud_API_MetadataType $meta) Merges the metadata for the media with the information provided. |
VMware_VCloud_API_TaskType | setMetadataByKey(string $key, VMware_VCloud_API_MetadataValueType $value, string $domain = null) Sets the metadata for the particular key in the specified domain for the media to the value provided. |
VMware_VCloud_API_TaskType | deleteMetadataByKey(string $key, string $domain = null) Deletes the metadata for the particular key in the specified domain for the media. |
VMware_VCloud_API_TaskType | enableDownload(boolean $wait = true) Enable downloading for the media. |
null | downloadMedia(string $destDir = '.') Download the media as an iso or floppy image. |
null | downloadMediaByName(string $destDir = '.', string $mediaName) Download the media as an iso or floppy image. |

## Details

###
in VMware_VCloud_SDK_Abstract at line 85
`public string getEntityId()`

Get vCloud ID of the vCloud resource entity from its data object.

#### Return Value

string |

###
at line 10
`public VMware_VCloud_API_ReferenceType getMediaRef()`

Get a reference to a VMware vCloud media entity.

#### Return Value

VMware_VCloud_API_ReferenceType |

###
at line 21
`public VMware_VCloud_API_MediaType getMedia()`

Get a VMware vCloud media entity.

#### Return Value

VMware_VCloud_API_MediaType |

###
at line 32
`public string getId()`

Constructs vCloud ID of the media from its UUID.

#### Return Value

string |

###
at line 43
`public VMware_VCloud_API_LinkType|null getVdcRef()`

Get the link to the container of the media.

#### Return Value

VMware_VCloud_API_LinkType|null |

###
at line 54
`public VMware_VCloud_API_VdcType getVdc()`

Get the container entity, a vDC, of the media

#### Return Value

VMware_VCloud_API_VdcType |

###
at line 68
`public VMware_VCloud_API_TaskType modify(string $name = null, string $description = null)`

Modify name and/or description of the media.

#### Parameters

string | $name | New name of the media
string | $description | New description of the media

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 89
`public VMware_VCloud_API_TaskType delete()`

Delete a VMware vCloud virtual media.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 103
`public VMware_VCloud_API_LinkType|null getCatalogItemLink()`

Get a reference to a VMware vCloud catalog entity.

#### Return Value

VMware_VCloud_API_LinkType|null |

###
at line 124
`public boolean isPartOfCatalogItem()`

Returns true if media is in Catalog, otherwise false.

#### Return Value

boolean |

###
at line 138
`public VMware_VCloud_API_TaskType deleteMedia()`

Deletes media and its catalog item.

If the media is attached to a catalog item. Deletes media alone. If the media is not attached to any catalog item.

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 155
`public VMware_VCloud_API_OwnerType getOwner()`

Get media owner.

#### Return Value

VMware_VCloud_API_OwnerType |

###
at line 171
`public VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null getMetadata(string $key = null, string $domain = null)`

Get metadata associated with the media or metadata associated with the media for the specified key in the specified domain.

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_MetadataType|VMware_VCloud_API_MetadataValueType|null |

###
at line 183
`public VMware_VCloud_API_TaskType mergeMetadata(VMware_VCloud_API_MetadataType $meta)`

Merges the metadata for the media with the information provided.

#### Parameters

VMware_VCloud_API_MetadataType | $meta |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 202
`public VMware_VCloud_API_TaskType setMetadataByKey(string $key, VMware_VCloud_API_MetadataValueType $value, string $domain = null)`

Sets the metadata for the particular key in the specified domain for the media to the value provided.

Note: This will replace any existing metadata information.

#### Parameters

string | $key |
VMware_VCloud_API_MetadataValueType | $value |
string | $domain |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 219
`public VMware_VCloud_API_TaskType deleteMetadataByKey(string $key, string $domain = null)`

Deletes the metadata for the particular key in the specified domain for the media.

#### Parameters

string | $key |
string | $domain |

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 233
`public VMware_VCloud_API_TaskType enableDownload(boolean $wait = true)`

Enable downloading for the media.

#### Parameters

boolean | $wait | To wait till finish, set to true

#### Return Value

VMware_VCloud_API_TaskType |

###
at line 271
`public null downloadMedia(string $destDir = '.')`

Download the media as an iso or floppy image.

contents are downloaded to the specified location. Before downloading make sure the media is enabled for download. The downloaded media file name will be the same as the current media file name in execution.

#### Parameters

string | $destDir | Directory where to save the downloaded file

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

#### See also

Media#enableDownload() |

###
at line 306
`public null downloadMediaByName(string $destDir = '.', string $mediaName)`

Download the media as an iso or floppy image.

contents are downloaded to the specified location. Before downloading make sure the media is enabled for download.

#### Parameters

string | $destDir | Directory where to save the downloaded file
string | $mediaName | Name of the Media which you want to give

#### Return Value

null |

#### Exceptions

VMware_VCloud_SDK_Exception |

#### See also

Media#enableDownload() |