blpapi.SchemaElementDefinition
- class blpapi.SchemaElementDefinition(handle, sessions)
The definition of an individual field within a schema type.
This class implements the definition of an individual field within a schema type. An element is defined by an identifer/name, a type, and the number of values of that type that may be associated with the identifier/name. In addition, this class offers access to metadata providing a description and deprecation status for the field.
SchemaElementDefinitionobjects are returned byServiceandOperationobjects to define the content of requests, replies and events. TheSchemaTypeDefinitionreturned bytypeDefinition()may itself provide access toSchemaElementDefinitionobjects when the schema contains nested elements. (See theSchemaTypeDefinitiondocumentation for more information on complex types.)An optional element has
minValues() == 0.A mandatory element has
minValues() >= 1.An element that must contain a single value has
minValues() == maxValues() == 1.An element containing an array has
maxValues() > 1.An element with no upper limit on the number of values has
maxValues() == UNBOUNDED.SchemaElementDefinitionobjects are read-only.Application clients need never create
SchemaElementDefinitionobjects directly; applications will typically work with objects returned by other blpapi components.- UNBOUNDED = 4294967295
Indicates an array has an unbounded number of values.
- maxValues()
- Return type
- Returns
The maximum number of occurrences of this element.
This value is always greater than or equal to one.
Return value is equal to
UNBOUNDEDif this item is an unbounded array.
- minValues()
- Return type
- Returns
The minimum number of occurrences of this element.
This value is always greater than or equal to zero.
- name()
- Return type
- Returns
The name identifying this element within its containing structure/type.
- status()
- Return type
- Returns
The deprecation status of this element.
The possible return values are enumerated in
SchemaStatus.
- toString(level=0, spacesPerLevel=4)
- Parameters
- Return type
- Returns
This object formatted as a string
If
levelis negative, suppress indentation of the first line. IfspacesPerLevelis negative, format the entire output on one line, suppressing all but the initial indentation (as governed bylevel).
- typeDefinition()
- Return type
- Returns
The type of values contained in this element.