AttributeValue

sealed class AttributeValue

The data type for an attribute. Each attribute value is described as a name-value pair. The name is the AD schema name, and the value is the data itself. For a list of supported attributes, see Directory Service Data Attributes.

Inheritors

Types

Link copied to clipboard
data class Bool(val value: Boolean) : AttributeValue

Indicates that the attribute type value is a boolean. For example:

Link copied to clipboard
data class N(val value: Long) : AttributeValue

Indicates that the attribute type value is a number. For example:

Link copied to clipboard
data class S(val value: String) : AttributeValue

Indicates that the attribute type value is a string. For example:

Link copied to clipboard
Link copied to clipboard
data class Ss(val value: List<String>) : AttributeValue

Indicates that the attribute type value is a string set. For example:

Functions

Link copied to clipboard

Casts this AttributeValue as a Bool and retrieves its kotlin.Boolean value. Throws an exception if the AttributeValue is not a Bool.

Link copied to clipboard

Casts this AttributeValue as a Bool and retrieves its kotlin.Boolean value. Returns null if the AttributeValue is not a Bool.

Link copied to clipboard
fun asN(): Long

Casts this AttributeValue as a N and retrieves its kotlin.Long value. Throws an exception if the AttributeValue is not a N.

Link copied to clipboard
fun asNOrNull(): Long?

Casts this AttributeValue as a N and retrieves its kotlin.Long value. Returns null if the AttributeValue is not a N.

Link copied to clipboard
fun asS(): String

Casts this AttributeValue as a S and retrieves its kotlin.String value. Throws an exception if the AttributeValue is not a S.

Link copied to clipboard

Casts this AttributeValue as a S and retrieves its kotlin.String value. Returns null if the AttributeValue is not a S.

Link copied to clipboard
fun asSs(): List<String>

Casts this AttributeValue as a Ss and retrieves its kotlin.collections.List value. Throws an exception if the AttributeValue is not a Ss.

Link copied to clipboard

Casts this AttributeValue as a Ss and retrieves its kotlin.collections.List value. Returns null if the AttributeValue is not a Ss.