Dependencies¶
class Dependencies(val dependencies: Map<String, Schema.Dependencies.DependencyConstraints>, factory: BsonFactory) : Schema.SimpleConstraint<Any>
Properties that trigger additional constraints when present.
Each key of dependencies is the name of a property. If the property is present, then the object must confirm to the associated dependency.
Constructors¶
Dependencies¶
constructor(dependencies: Map<String, Schema.Dependencies.DependencyConstraints>, factory: BsonFactory)
Types¶
DependencyConstraints¶
sealed class DependencyConstraints : BsonValueWriteable
DependOnProperties¶
class DependOnProperties(val properties: List<String>, factory: BsonFactory) : Schema.Dependencies.DependencyConstraints
To be valid, a property requires, when it is present, that other properties are present as well.
DependOnSchema¶
class DependOnSchema(val schema: Schema<*>, factory: BsonFactory) : Schema.Dependencies.DependencyConstraints
To be valid, a property requires, when it is present, that the object confirms to additional constraints.
Properties¶
dependencies¶
Property dependencies declared in this object.
The keys are property names. If such a property is present, then the object must respect the additional dependency constraints.
See also
-
DependOnProperties: : other properties becomeRequired. -
DependOnSchema: : additional constraints are added to the schema.
name¶
Functions¶
toString¶
writeTo¶
override fun writeTo(writer: BsonFieldWriter)
Writes this object to the provided writer.