vapi metadata metamodel: structure info

The structure_info structure contains the metamodel information of all the field elements, constant elements and enumeration elements contained in the structure element.

In the interface definition language, API designers have the ability to include all the fields from one structure to another structure. This is done by using an annotation @Include on the structure in which we want to add the fields. If this annotation is present, the list of fields in the structure_info will also contain the fields that are being included. The annotation information is also retained in the vapi.metadata.metamodel.structure_info.metadata element as well.

Representations:

{
    "constants"[
        {
            "key""string",
            "value"{
                "documentation""string",
                "type"{
                    "builtin_type""VOID",
                    "category""BUILTIN",
                    "generic_instantiation"{
                        "element_type"{
                            "builtin_type""VOID",
                            "category""BUILTIN",
                            "generic_instantiation"{
                                "generic_type""LIST"
                            },
                            "user_defined_type"{
                                "resource_id""obj-103",
                                "resource_type""string"
                            }
                        },
                        "generic_type""LIST"
                    },
                    "user_defined_type"{
                        "resource_id""obj-103",
                        "resource_type""string"
                    }
                },
                "value"{
                    "category""PRIMITIVE",
                    "list_value"[
                        {
                            "boolean_value"true,
                            "double_value"1.5,
                            "long_value"1,
                            "string_value""string",
                            "type""BOOLEAN"
                        },
                        {
                            "boolean_value"true,
                            "double_value"1.5,
                            "long_value"1,
                            "string_value""string",
                            "type""BOOLEAN"
                        }
                    ],
                    "primitive_value"{
                        "boolean_value"true,
                        "double_value"1.5,
                        "long_value"1,
                        "string_value""string",
                        "type""BOOLEAN"
                    }
                }
            }
        }
    ],
    "documentation""string",
    "enumerations"[
        {
            "key""obj-103",
            "value"{
                "documentation""string",
                "metadata"[
                    {
                        "key""string",
                        "value"{
                            "elements"[
                                {
                                    "key""string",
                                    "value"{
                                        "list_value"[
                                            "string",
                                            "string"
                                        ],
                                        "long_value"1,
                                        "string_value""string",
                                        "structure_id""obj-103",
                                        "structure_ids"[
                                            "obj-103",
                                            "obj-103"
                                        ],
                                        "type""LONG"
                                    }
                                }
                            ]
                        }
                    }
                ],
                "name""string",
                "values"[
                    {
                        "documentation""string",
                        "metadata"[
                            {
                                "key""string",
                                "value"{
                                    "elements"[
                                        {
                                            "key""string",
                                            "value"{
                                                "list_value"[
                                                    "string",
                                                    "string"
                                                ],
                                                "long_value"1,
                                                "string_value""string",
                                                "structure_id""obj-103",
                                                "structure_ids"[
                                                    "obj-103",
                                                    "obj-103"
                                                ],
                                                "type""LONG"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "value""string"
                    },
                    {
                        "documentation""string",
                        "metadata"[
                            {
                                "key""string",
                                "value"{
                                    "elements"[
                                        {
                                            "key""string",
                                            "value"{
                                                "list_value"[
                                                    "string",
                                                    "string"
                                                ],
                                                "long_value"1,
                                                "string_value""string",
                                                "structure_id""obj-103",
                                                "structure_ids"[
                                                    "obj-103",
                                                    "obj-103"
                                                ],
                                                "type""LONG"
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "value""string"
                    }
                ]
            }
        }
    ],
    "fields"[
        {
            "documentation""string",
            "metadata"[
                {
                    "key""string",
                    "value"{
                        "elements"[
                            {
                                "key""string",
                                "value"{
                                    "list_value"[
                                        "string",
                                        "string"
                                    ],
                                    "long_value"1,
                                    "string_value""string",
                                    "structure_id""obj-103",
                                    "structure_ids"[
                                        "obj-103",
                                        "obj-103"
                                    ],
                                    "type""LONG"
                                }
                            }
                        ]
                    }
                }
            ],
            "name""string",
            "type"{
                "builtin_type""VOID",
                "category""BUILTIN",
                "generic_instantiation"{
                    "element_type"{
                        "builtin_type""VOID",
                        "category""BUILTIN",
                        "generic_instantiation"{
                            "generic_type""LIST"
                        },
                        "user_defined_type"{
                            "resource_id""obj-103",
                            "resource_type""string"
                        }
                    },
                    "generic_type""LIST"
                },
                "user_defined_type"{
                    "resource_id""obj-103",
                    "resource_type""string"
                }
            }
        },
        {
            "documentation""string",
            "metadata"[
                {
                    "key""string",
                    "value"{
                        "elements"[
                            {
                                "key""string",
                                "value"{
                                    "list_value"[
                                        "string",
                                        "string"
                                    ],
                                    "long_value"1,
                                    "string_value""string",
                                    "structure_id""obj-103",
                                    "structure_ids"[
                                        "obj-103",
                                        "obj-103"
                                    ],
                                    "type""LONG"
                                }
                            }
                        ]
                    }
                }
            ],
            "name""string",
            "type"{
                "builtin_type""VOID",
                "category""BUILTIN",
                "generic_instantiation"{
                    "element_type"{
                        "builtin_type""VOID",
                        "category""BUILTIN",
                        "generic_instantiation"{
                            "generic_type""LIST"
                        },
                        "user_defined_type"{
                            "resource_id""obj-103",
                            "resource_type""string"
                        }
                    },
                    "generic_type""LIST"
                },
                "user_defined_type"{
                    "resource_id""obj-103",
                    "resource_type""string"
                }
            }
        }
    ],
    "metadata"[
        {
            "key""string",
            "value"{
                "elements"[
                    {
                        "key""string",
                        "value"{
                            "list_value"[
                                "string",
                                "string"
                            ],
                            "long_value"1,
                            "string_value""string",
                            "structure_id""obj-103",
                            "structure_ids"[
                                "obj-103",
                                "obj-103"
                            ],
                            "type""LONG"
                        }
                    }
                ]
            }
        }
    ],
    "name""string",
    "type""STRUCTURE"
}
<?xml version="1.0" ?>
<ns0:StructureInfo xmlns:ns0="http://vmware.com/vapi/metadata/metamodel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <name>string</name>
  <documentation>string</documentation>
  <constants-array>
    <array-item>
      <value>
        <documentation>string</documentation>
        <value>
          <category>PRIMITIVE</category>
          <primitive_value>
            <long_value>1</long_value>
            <double_value>1.5</double_value>
            <string_value>string</string_value>
            <type>BOOLEAN</type>
            <boolean_value>true</boolean_value>
          </primitive_value>
          <list_value-array>
            <array-item>
              <long_value>1</long_value>
              <double_value>1.5</double_value>
              <string_value>string</string_value>
              <type>BOOLEAN</type>
              <boolean_value>true</boolean_value>
            </array-item>
            <array-item>
              <long_value>1</long_value>
              <double_value>1.5</double_value>
              <string_value>string</string_value>
              <type>BOOLEAN</type>
              <boolean_value>true</boolean_value>
            </array-item>
          </list_value-array>
        </value>
        <type>
          <user_defined_type>
            <resource_id>obj-103</resource_id>
            <resource_type>string</resource_type>
          </user_defined_type>
          <category>BUILTIN</category>
          <generic_instantiation>
            <generic_type>LIST</generic_type>
            <element_type>
              <user_defined_type>
                <resource_id>obj-103</resource_id>
                <resource_type>string</resource_type>
              </user_defined_type>
              <category>BUILTIN</category>
              <generic_instantiation>
                <generic_type>LIST</generic_type>
              </generic_instantiation>
              <builtin_type>VOID</builtin_type>
            </element_type>
          </generic_instantiation>
          <builtin_type>VOID</builtin_type>
        </type>
      </value>
      <key>string</key>
    </array-item>
  </constants-array>
  <type>STRUCTURE</type>
  <metadata-array>
    <array-item>
      <value>
        <elements-array>
          <array-item>
            <value>
              <long_value>1</long_value>
              <list_value-array>
                <array-item>string</array-item>
                <array-item>string</array-item>
              </list_value-array>
              <structure_id>obj-103</structure_id>
              <structure_ids-array>
                <array-item>obj-103</array-item>
                <array-item>obj-103</array-item>
              </structure_ids-array>
              <string_value>string</string_value>
              <type>LONG</type>
            </value>
            <key>string</key>
          </array-item>
        </elements-array>
      </value>
      <key>string</key>
    </array-item>
  </metadata-array>
  <fields-array>
    <array-item>
      <name>string</name>
      <documentation>string</documentation>
      <type>
        <user_defined_type>
          <resource_id>obj-103</resource_id>
          <resource_type>string</resource_type>
        </user_defined_type>
        <category>BUILTIN</category>
        <generic_instantiation>
          <generic_type>LIST</generic_type>
          <element_type>
            <user_defined_type>
              <resource_id>obj-103</resource_id>
              <resource_type>string</resource_type>
            </user_defined_type>
            <category>BUILTIN</category>
            <generic_instantiation>
              <generic_type>LIST</generic_type>
            </generic_instantiation>
            <builtin_type>VOID</builtin_type>
          </element_type>
        </generic_instantiation>
        <builtin_type>VOID</builtin_type>
      </type>
      <metadata-array>
        <array-item>
          <value>
            <elements-array>
              <array-item>
                <value>
                  <long_value>1</long_value>
                  <list_value-array>
                    <array-item>string</array-item>
                    <array-item>string</array-item>
                  </list_value-array>
                  <structure_id>obj-103</structure_id>
                  <structure_ids-array>
                    <array-item>obj-103</array-item>
                    <array-item>obj-103</array-item>
                  </structure_ids-array>
                  <string_value>string</string_value>
                  <type>LONG</type>
                </value>
                <key>string</key>
              </array-item>
            </elements-array>
          </value>
          <key>string</key>
        </array-item>
      </metadata-array>
    </array-item>
    <array-item>
      <name>string</name>
      <documentation>string</documentation>
      <type>
        <user_defined_type>
          <resource_id>obj-103</resource_id>
          <resource_type>string</resource_type>
        </user_defined_type>
        <category>BUILTIN</category>
        <generic_instantiation>
          <generic_type>LIST</generic_type>
          <element_type>
            <user_defined_type>
              <resource_id>obj-103</resource_id>
              <resource_type>string</resource_type>
            </user_defined_type>
            <category>BUILTIN</category>
            <generic_instantiation>
              <generic_type>LIST</generic_type>
            </generic_instantiation>
            <builtin_type>VOID</builtin_type>
          </element_type>
        </generic_instantiation>
        <builtin_type>VOID</builtin_type>
      </type>
      <metadata-array>
        <array-item>
          <value>
            <elements-array>
              <array-item>
                <value>
                  <long_value>1</long_value>
                  <list_value-array>
                    <array-item>string</array-item>
                    <array-item>string</array-item>
                  </list_value-array>
                  <structure_id>obj-103</structure_id>
                  <structure_ids-array>
                    <array-item>obj-103</array-item>
                    <array-item>obj-103</array-item>
                  </structure_ids-array>
                  <string_value>string</string_value>
                  <type>LONG</type>
                </value>
                <key>string</key>
              </array-item>
            </elements-array>
          </value>
          <key>string</key>
        </array-item>
      </metadata-array>
    </array-item>
  </fields-array>
  <enumerations-array>
    <array-item>
      <value>
        <values-array>
          <array-item>
            <documentation>string</documentation>
            <value>string</value>
            <metadata-array>
              <array-item>
                <value>
                  <elements-array>
                    <array-item>
                      <value>
                        <long_value>1</long_value>
                        <list_value-array>
                          <array-item>string</array-item>
                          <array-item>string</array-item>
                        </list_value-array>
                        <structure_id>obj-103</structure_id>
                        <structure_ids-array>
                          <array-item>obj-103</array-item>
                          <array-item>obj-103</array-item>
                        </structure_ids-array>
                        <string_value>string</string_value>
                        <type>LONG</type>
                      </value>
                      <key>string</key>
                    </array-item>
                  </elements-array>
                </value>
                <key>string</key>
              </array-item>
            </metadata-array>
          </array-item>
          <array-item>
            <documentation>string</documentation>
            <value>string</value>
            <metadata-array>
              <array-item>
                <value>
                  <elements-array>
                    <array-item>
                      <value>
                        <long_value>1</long_value>
                        <list_value-array>
                          <array-item>string</array-item>
                          <array-item>string</array-item>
                        </list_value-array>
                        <structure_id>obj-103</structure_id>
                        <structure_ids-array>
                          <array-item>obj-103</array-item>
                          <array-item>obj-103</array-item>
                        </structure_ids-array>
                        <string_value>string</string_value>
                        <type>LONG</type>
                      </value>
                      <key>string</key>
                    </array-item>
                  </elements-array>
                </value>
                <key>string</key>
              </array-item>
            </metadata-array>
          </array-item>
        </values-array>
        <name>string</name>
        <documentation>string</documentation>
        <metadata-array>
          <array-item>
            <value>
              <elements-array>
                <array-item>
                  <value>
                    <long_value>1</long_value>
                    <list_value-array>
                      <array-item>string</array-item>
                      <array-item>string</array-item>
                    </list_value-array>
                    <structure_id>obj-103</structure_id>
                    <structure_ids-array>
                      <array-item>obj-103</array-item>
                      <array-item>obj-103</array-item>
                    </structure_ids-array>
                    <string_value>string</string_value>
                    <type>LONG</type>
                  </value>
                  <key>string</key>
                </array-item>
              </elements-array>
            </value>
            <key>string</key>
          </array-item>
        </metadata-array>
      </value>
      <key>obj-103</key>
    </array-item>
  </enumerations-array>
</ns0:StructureInfo>

Attributes:

Name Type Description
Required
name string Dot separated name of the structure element. The segments in the name reflect the organization of the APIs. The format of each segment is lower case with underscores. Each underscore represents a word boundary. If there are acronyms in the word, the capitalization is preserved. This format makes it easy to translate the segment into a different naming convention.

type string Type of the structure.

Defines the kind of this structure element. In the interface definition language, structure element and error element have similar characteristics. The difference is that only error elements can be used to describe the errors of an operation element. Value is one of:
STRUCTURE: If the type is a structure element.
ERROR: If the type is an error element.

enumerations list Metamodel information of all the enumeration elements contained in the structure element. The key in the key/value pairs is the identifier of the enumeration element and the value is the metamodel information of the enumeration element.

When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.vapi.enumeration. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.vapi.enumeration.List of {"key": string, "value": enumeration_info}

constants list Metamodel information of all the constant elements contained in the structure element. The key in the key/value pairs is the name of the constant element and the value in the key/value pairs is the metamodel information for the constant element.

List of {"key": string, "value": constant_info}

fields field_info[] Metamodel information of all the field elements. The order of the field elements in the list matches the order in which the fields are defined in the service.

metadata list Generic metadata elements for the structure element. The key in the key/value pairs is the name of the metadata element and the value is the data associated with that metadata element.

The vapi.metadata.metamodel.metadata_identifier contains possible string values for keys in the key/value pairs.

List of {"key": string, "value": element_map}

documentation string English language documentation for a structure element. It can contain HTML markup and Javadoc tags. The first sentence of the structure documentation is a complete sentence that identifies the structure by name and summarizes the purpose of the structure.