Metadata Metamodel APIs

Metadata Metamodel 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.

API Categories
Component

The Component service provides operations to retrieve privilege information of a component element. A component element is said to contain privilege information if any one of package elements in it contains privilege information.

Enumeration

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.

MetadataIdentifier

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.

Package

The Package service provides operations to retrieve privilege information of a package element. A package element is said to contain privilege information if there is a default privilege assigned to all service elements contained in the package element or if one of the operation elements contained in one of the service elements in this package element has privilege information.

Resource

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.

Service

The Service service provides operations to retrieve privilege information of a service element. A service element is said to contain privilege information if one of the operation elements contained in this service element has privilege information.

Structure

The Structure service providers operations to retrieve metamodel information about a structure element in the interface definition language.