MetadataMetamodel APIs
The vapi metadata metamodel package provides services that expose all the information present in the interface definition language (IDL) specification. Metamodel metadata is organized into an hierarchy of elements. The main elements are:
- Enumeration: An enumeration element that has a list of enumeration value elements.
- Constant: A constant element has a name and a value.
- Structure: A structure element can have field elements, constant elements and enumeration elements.
- Operation: An operation has a list of parameter elements, result element and error elements.
- Service: A service is a collection of operation elements, structure elements, enumerated elements and constant elements.
- Package: A package is a collection of service elements, structure elements and enumeration elements.
- Component: A component is a collection of package elements. The com.vmware.vapi.metadata.metamodel package has services that enables two styles of client applications:
- A client can retrieve the exact pieces of information it requires using the various granularities the API supports (that is Component, Package, Service, Structure, Enumeration and Operation). In this case, it doesn't cache any information locally and always invokes operations to get the metamodel information it requires.
- A client can retrieve all the metamodel information in fewer operation invocations using the Component service and cache the output locally. It can then poll on the fingerprint information exposed by the Component service to monitor changes in API definition.
The Component service providers operations to retrieve metamodel information of a component element. A component defines a set of functionality that is deployed together and versioned together. For example, all the services that belong to VMware Content Library are part of a single component. A component element describes a component. A component element contains one or more package elements.
The operations for package elements are provided by service Package.
The Enumeration service provides operations to retrieve metamodel information about an enumeration element in the interface definition language. The Enumeration has a list of enumeration value elements.
The MetadataIdentifier service provides string constants that can be used as identifiers for the metadata elements. Most of the types in vapi metadata metamodel package has a metadata field whose type is Map<String, ElementMap>. MetadataIdentifier contains the identifiers used in the keys of the above Map type.
The Package service provides operations to retrieve metamodel information about a package element in the interface definition language. A package is a logical grouping of services, structures and enumerations. A package element describes the package. It contains the service elements, structure elements and enumeration elements that are grouped together.
The Resource service provides operations to retrieve information about resource types. A service is a logical grouping of operations that operate on an entity. Each entity is identifier by a namespace (or resource type) and an unique identifier.
The Service service provides operations to retrieve metamodel information about a service element in the interface definition language. A service is a logical grouping of operations that operate on some entity. A service element describes a service. It contains operation elements that describe the operations grouped in the service. It also contains structure elements and enumeration elements corresponding to the structures and enumerations defined in the service.
The Structure service providers operations to retrieve metamodel information about a structure element in the interface definition language.