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 descriptionString?

Description of the field, matching Guide.description.

enumValues

val enumValuesArray<String>?

Possible enum values, matching Guide.enumValues.

isList

val isListBoolean

Whether the property is a list.

listItemType

val listItemTypeKClass<*>?

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

maxItems

val maxItemsInt?

Maximum number of items, matching Guide.maxItems.

maximum

val maximumDouble?

Maximum value, matching Guide.maximum.

minItems

val minItemsInt?

Minimum number of items, matching Guide.minItems.

minimum

val minimumDouble?

Minimum value, matching Guide.minimum.

name

val nameString

The name of the property.

nullable

val nullableBoolean

Whether the property is nullable.

type

val typeKClass<*>

The class type of the property.