Skip to content

Required

class Required(val properties: Set<String>, factory: BsonFactory) : Schema.SimpleConstraint<Any> 

The properties that must be present in an object.

If the property does not contain an object, this constraint is ignored.

Constructors

Required

constructor(properties: Set<String>, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

properties

Functions

toString

override fun toString(): String

JSON representation of this constraint object.

writeTo

override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.