Skip to content

AnyOf

class AnyOf<T>(val schemas: List<Schema<T>>, factory: BsonFactory) : Schema.SimpleConstraint<T> 

The value must confirm to at least one of the given schemas.

Constructors

AnyOf

constructor(schemas: List<Schema<T>>, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

schemas

val schemas: List<Schema<T>>

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.