Class List Method List File List

# Class: Com::Vmware::Vapi::Metadata::Metamodel::Component

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vapi::Metadata::Metamodel::Component
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb

## Overview

The ``Com::Vmware::Vapi::Metadata::Metamodel::Component`` class providers methods 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  classs  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  methods  for package elements are provided by  class    :class:`Com::Vmware::Vapi::Metadata::Metamodel::Package`  .

## Constant Summary

RESOURCE_TYPE =

      'com.vmware.vapi.component'

## Instance Method Summary (collapse)

- - (String) fingerprint(component_id)

  Retrieves the fingerprint computed from the metamodel metadata of the component element corresponding to ``component_id`` .

- - (Com::Vmware::Vapi::Metadata::Metamodel::ComponentData) get(component_id)

  Retrieves metamodel information about the component element corresponding to ``component_id`` .

- - (Component) initialize(config) constructor

  Constructs a new instance.

- - (Array<String>) list

  Returns the identifiers for the component elements that are registered with the infrastructure.

## Constructor Details

### - (`Component`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    95
    96
    97
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 95

    def initialize(config)
        super(config, @@service_info)
    end

## Instance Method Details

### - (`String`) fingerprint(component_id)

Retrieves the fingerprint computed from the metamodel metadata of the component element corresponding to ``component_id`` .

     The fingerprint provides clients an efficient way to check if the metadata for a particular component element has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of   :func:`Com::Vmware::Vapi::Metadata::Metamodel::Component.get`  .

Parameters:

- component_id (`String`) —

  Identifier of the component element.

Returns:

- (`String`) —

  The fingerprint computed from the metamodel metadata of the component element.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the component element associated with ``component_id`` is not registered with the infrastructure.

    138
    139
    140
    141
    142
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 138

    def fingerprint(component_id)
        invoke_with_info(@@fingerprint_info, {
            'component_id' => component_id,
        })
    end

### - (`Com::Vmware::Vapi::Metadata::Metamodel::ComponentData`) get(component_id)

Retrieves metamodel information about the component element corresponding to ``component_id`` .

     The   :class:`Com::Vmware::Vapi::Metadata::Metamodel::ComponentData`   contains the metamodel information about the component and it's fingerprint. It contains information about all the package elements that are contained in this component element.

Parameters:

- component_id (`String`) —

  Identifier of the component element.

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::ComponentData`) —

  The :class:`Com::Vmware::Vapi::Metadata::Metamodel::ComponentData` instance that corresponds to ``component_id`` .

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the component element associated with ``component_id`` is not registered with the infrastructure.

    121
    122
    123
    124
    125
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 121

    def get(component_id)
        invoke_with_info(@@get_info, {
            'component_id' => component_id,
        })
    end

### - (`Array<String>`) list

Returns the identifiers for the component elements that are registered with the infrastructure.

Returns:

- (`Array<String>`) —

  The list of identifiers for the component elements that are registered with the infrastructure.

    106
    107
    108
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 106

    def list()
        invoke_with_info(@@list_info)
    end