The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VMware::vCloudDirector2::Object - Module to contain an object!

VERSION

version 0.100

Attributes

api

A weak link to the API object to be used.

content

The object content. This is in a separate container so that partial objects passed can be inflated at a later stage without having to replace the object itself.

hash

A reference to the hash returned from the vCloud API. Forces object inflation.

An array references to the links contained in this object. Forces object inflation.

id

The id attribute from the returned vCloud JSON. Forces object inflation.

Methods

inflate

If this object is a partial object (ie taken from a link or partial chunk within a containing object), then this forces a refetch of the content from vCloud creating a fully populated object.

refetch

Forces a refetch of this object's content unconditionally.

Returns any links found that match the search criteria. The possible criteria are:-

name

The name of the link

type

The type of the link (short type, not full MIME type)

rel

The rel of the link

The return value is a list of link objects.

As per "find_links" except that each link found is fetched and expanded up as an object.

build_sub_objects

Given a type (specifically a key used within the current object hash), grabs the descendants of that key and instantiates them as partial objects (they can then be inflated into full objects).

Due to the structure of the XML there will always be two layers, the inner named singular thing, and the outer named as the plural of thing. Hence this does magic with the language inflection module.

DELETE

Make a delete request to the URL in this link. Returns Objects. Failure will generate an exception. See "DELETE" in VMware::vCloudDirector2::API.

GET

Make a get request to the URL in this link. Returns Objects. Failure will generate an exception. See "GET" in VMware::vCloudDirector2::API.

POST

Make a post request with the specified payload to the URL in this link. Returns Objects. Failure will generate an exception. See "POST" in VMware::vCloudDirector2::API.

PUT

Make a put request with the specified payload to the URL in this link. Returns Objects. Failure will generate an exception. See "PUT" in VMware::vCloudDirector2::API.

AUTHOR

Nigel Metheringham <nigelm@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Nigel Metheringham.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.