Annotation Type BoundChoiceGroup
Identifies that the annotation target is a bound property that references a
collection of model instances of varying types.
For JSON and YAML serializations, the discriminator()
identifies the
property use to differentiate the type of object values.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe the assemblies that may occur within this choice group.The discriminator to use for determining the type of child elements in JSON.The the fields that may occur within this choice group.Used to provide grouping information.The name of a common flag to use as the JSON key that appears on all associatedassemblies()
andfields()
.int
A number that indicates the maximum occurrence of the model instance.int
A non-negative number that indicates the minimum occurrence of the model instance.
-
Element Details
-
discriminator
The discriminator to use for determining the type of child elements in JSON.- Returns:
- the discriminator property name
- Default:
- "object-type"
-
minOccurs
int minOccursA non-negative number that indicates the minimum occurrence of the model instance.- Returns:
- a non-negative number
- Default:
- 0
-
maxOccurs
int maxOccursA number that indicates the maximum occurrence of the model instance.- Returns:
- a positive number or
-1
to indicate "unbounded"
- Default:
- 1
-
groupAs
Used to provide grouping information.This annotation is required when the value of
maxOccurs()
is greater than 1.- Returns:
- the configured
GroupAs
or the default value with anull
GroupAs.name()
- Default:
- @gov.nist.secauto.metaschema.databind.model.annotations.GroupAs(name="\u0000")
-
jsonKey
The name of a common flag to use as the JSON key that appears on all associatedassemblies()
andfields()
.- Returns:
- the configured JSON key flag name or
ModelUtil.NO_STRING_VALUE
if no JSON key is configured
- Default:
- "##none"
-
assemblies
The the assemblies that may occur within this choice group.- Returns:
- an array of assembly bindings which may occur within this choice group
- Default:
- {}
-
fields
The the fields that may occur within this choice group.- Returns:
- an array of field bindings which may occur within this choice group
- Default:
- {}
-