Class: Com::Vmware::Vapi::Metadata::Metamodel::ElementMap

Inherits:
VAPI::Bindings::VapiStruct
  • Object
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::ElementMap`` class contains the metadata elements.


 One of the sources for metadata is the annotations present in the interface definition language. When an annotation is represented in the  ``Com::Vmware::Vapi::Metadata::Metamodel::ElementMap`` ,  ``Com::Vmware::Vapi::Metadata::Metamodel::ElementMap``  describes the data specified in the arguments for the annotation.  

 For example, in  ``\@UnionCase(tag="tag", value="SELECT")`` , ElementMap describes the keyword arguments tag and value.

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ElementMap) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

  • ruby_values (Hash) (defaults to: nil)

    a map of initial property values (optional)

  • struct_value (VAPI::Data::StructValue) (defaults to: nil)

    a raw StructValue from the wire (optional)



1104
1105
1106
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1104

def initialize(ruby_values=nil, struct_value=nil)
    super(self.class.binding_type, ruby_values, struct_value)
end

Instance Attribute Details

- (Hash<String, Com::Vmware::Vapi::Metadata::Metamodel::ElementValue>) elements

Metamodel information of the metadata elements. The key parameter of the map is the identifier for the element and the value corresponds to the element value.



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1081

class ElementMap < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vapi.metadata.metamodel.element_map',
                {
                    'elements' => VAPI::Bindings::MapType.new(VAPI::Bindings::StringType.instance, VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue')),
                },
                ElementMap,
                false,
                nil)
        end
    end

    attr_accessor :elements

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end
end

Class Method Details

+ (VAPI::Bindings::StructType) binding_type

Holds (gets or creates) the binding type metadata for this structure type.

Returns:

  • (VAPI::Bindings::StructType)

    the binding type



1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1087

def binding_type
    @binding_type ||= VAPI::Bindings::StructType.new(
        'com.vmware.vapi.metadata.metamodel.element_map',
        {
            'elements' => VAPI::Bindings::MapType.new(VAPI::Bindings::StringType.instance, VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue')),
        },
        ElementMap,
        false,
        nil)
end