GenerableDetail.GuideDetail

data class GenerableDetail.GuideDetail


Holds the details of a single property in a Generable class, including its metadata and constraints specified by the Guide annotation.

Summary

Public constructors

GuideDetail(
    name: String,
    type: KClass<*>,
    nullable: Boolean,
    description: String?,
    maxItems: Int?,
    minItems: Int?,
    maximum: Double?,
    minimum: Double?,
    enumValues: Array<String>?,
    isList: Boolean,
    listItemType: KClass<*>?
)

Public properties

String?

Description of the field, matching Guide.description.

Array<String>?

Possible enum values, matching Guide.enumValues.

Boolean

Whether the property is a list.

KClass<*>?

The class type of the list items, if the property is a list.

Int?

Maximum number of items, matching Guide.maxItems.

Double?

Maximum value, matching Guide.maximum.

Int?

Minimum number of items, matching Guide.minItems.

Double?

Minimum value, matching Guide.minimum.

String

The name of the property.

Boolean

Whether the property is nullable.

KClass<*>

The class type of the property.

Public constructors

GuideDetail

GuideDetail(
    name: String,
    type: KClass<*>,
    nullable: Boolean,
    description: String? = null,
    maxItems: Int? = null,
    minItems: Int? = null,
    maximum: Double? = null,
    minimum: Double? = null,
    enumValues: Array<String>? = null,
    isList: Boolean = false,
    listItemType: KClass<*>? = null
)

Public properties

description

val description: String?

Description of the field, matching Guide.description.

enumValues

val enumValues: Array<String>?

Possible enum values, matching Guide.enumValues.

isList

val isList: Boolean

Whether the property is a list.

listItemType

val listItemType: KClass<*>?

The class type of the list items, if the property is a list.

maxItems

val maxItems: Int?

Maximum number of items, matching Guide.maxItems.

maximum

val maximum: Double?

Maximum value, matching Guide.maximum.

minItems

val minItems: Int?

Minimum number of items, matching Guide.minItems.

minimum

val minimum: Double?

Minimum value, matching Guide.minimum.

name

val name: String

The name of the property.

nullable

val nullable: Boolean

Whether the property is nullable.

type

val type: KClass<*>

The class type of the property.