public static interface Structure.Builder
StructureSpecification.toInstanceBuilder(), or from a generated code, such as
ServerStatusDataType.builder(). In general only the SDK or Codegen should implement
this interface.| Modifier and Type | Method and Description |
|---|---|
Structure |
build()
Builds a Structure with the given data.
|
Structure.Builder |
clear()
Sets all fields to their default values (i.e.
|
Object |
get(FieldSpecification field)
Get the value of the given field.
|
Object |
get(String fieldName)
Get the value of the given field.
|
Structure.Builder |
set(FieldSpecification field,
Object value)
Sets a new value for a field.
|
Structure.Builder |
set(String fieldName,
Object value)
Sets a new value for a field.
|
StructureSpecification |
specification()
Returns the specification of the Structures that this builder builds.
|
Object get(String fieldName)
FieldSpecifications in the specification given by specification().fieldName - name of the fieldIllegalArgumentException - if the given field does not exist.Structure build()
Structure.Builder clear()
Structure.Builder shall the same as a newly created instance where no fields have been set.Object get(FieldSpecification field)
field - specification of a field, must be one of the fields in the specification given
by specification().IllegalArgumentException - if the given field is not one of the fields of the
specification().Structure.Builder set(FieldSpecification field, Object value)
Structure.specification(). Setting an Optional Field to null will make it
not present for encoding. Setting a Field in an Union will unset other fields.field - specification of a field, must be one of the fields in the specification given
by Structure.specification().value - the value of the field (can be null) * @throws IllegalArgumentException if the
given field is not one of the fields of the specification().Structure.Builder set(String fieldName, Object value)
FieldSpecifications in the specification given by Structure.specification().
Setting an Optional Field to null will make it not present for encoding. Setting a Field in
an Union will unset other fields.fieldName - the field, must be the name of one of the FieldSpecifications in the
specification given by specification().value - new value for the given field, can be null.IllegalArgumentException - if the given field is not one of #getFields()StructureSpecification specification()
Copyright © 2026. All rights reserved.