Skip to content

Enum

class Enum<T>(val values: List<Pair<T, KType>>, factory: BsonFactory) : Schema.SimpleConstraint<T> 

This property must have a value that is equal to one of the given values.

Constructors

Enum

constructor(values: List<Pair<T, KType>>, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

values

val values: List<Pair<T, KType>>

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.