new
Creates a new DynoMap instance using the schema's structure and enforces validation of required fields.
This function provides a type-safe way to construct a DynoMap by ensuring all required keys defined in the schema are set during creation. It uses a DSL builder pattern where each key can be assigned a value using the set infix function.
Example:
val person = Person.new {
name set "Alex"
age set 30
}See also
Throws
if any required property is missing after the builder block execution.
Creates a new Entity instance using the schema's structure and enforces validation of required fields.
Similar to new for DynoMap, this function ensures all required keys are set during entity creation. The resulting Entity is bound to the schema and provides type-safe access to its properties.
Example:
val vehicle = Car.new {
name set "Toyota"
wheels set 4
}See also
Throws
if any required property is missing after the builder block execution.