com.yandex.div.dsl.model.DivInput.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-json-builder Show documentation
Show all versions of kotlin-json-builder Show documentation
DivKit is an open source Server-Driven UI (SDUI) framework. SDUI is a an emerging technique that leverage the server to build the user interfaces of their mobile app.
// Generated code. Do not modify.
package com.yandex.div.dsl.model
import java.net.URI
import com.fasterxml.jackson.annotation.*
import com.yandex.div.dsl.*
import com.yandex.div.dsl.context.*
import com.yandex.div.dsl.type.*
import com.yandex.div.dsl.util.*
class DivInput internal constructor(
@JsonIgnore override val accessibility: Property?,
@JsonIgnore override val alignmentHorizontal: Property?,
@JsonIgnore override val alignmentVertical: Property?,
@JsonIgnore override val alpha: Property?,
@JsonIgnore override val background: Property>?,
@JsonIgnore override val border: Property?,
@JsonIgnore override val columnSpan: Property?,
@JsonIgnore override val extensions: Property>?,
@JsonIgnore override val focus: Property?,
@JsonIgnore val fontFamily: Property?,
@JsonIgnore val fontSize: Property?,
@JsonIgnore val fontSizeUnit: Property?,
@JsonIgnore val fontWeight: Property?,
@JsonIgnore override val height: Property?,
@JsonIgnore val highlightColor: Property?,
@JsonIgnore val hintColor: Property?,
@JsonIgnore val hintText: Property?,
@JsonIgnore override val id: Property?,
@JsonIgnore val keyboardType: Property?,
@JsonIgnore val letterSpacing: Property?,
@JsonIgnore val lineHeight: Property?,
@JsonIgnore override val margins: Property?,
@JsonIgnore val maxVisibleLines: Property?,
@JsonIgnore val nativeInterface: Property?,
@JsonIgnore override val paddings: Property?,
@JsonIgnore override val rowSpan: Property?,
@JsonIgnore val selectAllOnFocus: Property?,
@JsonIgnore override val selectedActions: Property>?,
@JsonIgnore val textColor: Property?,
@JsonIgnore val textVariable: Property?,
@JsonIgnore override val tooltips: Property>?,
@JsonIgnore override val transform: Property?,
@JsonIgnore override val transitionChange: Property?,
@JsonIgnore override val transitionIn: Property?,
@JsonIgnore override val transitionOut: Property?,
@JsonIgnore override val transitionTriggers: Property>?,
@JsonIgnore override val visibility: Property?,
@JsonIgnore override val visibilityAction: Property?,
@JsonIgnore override val visibilityActions: Property>?,
@JsonIgnore override val width: Property?,
) : Div, DivBase {
@JsonProperty("type") override val type = "input"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"accessibility" to accessibility,
"alignment_horizontal" to alignmentHorizontal,
"alignment_vertical" to alignmentVertical,
"alpha" to alpha,
"background" to background,
"border" to border,
"column_span" to columnSpan,
"extensions" to extensions,
"focus" to focus,
"font_family" to fontFamily,
"font_size" to fontSize,
"font_size_unit" to fontSizeUnit,
"font_weight" to fontWeight,
"height" to height,
"highlight_color" to highlightColor,
"hint_color" to hintColor,
"hint_text" to hintText,
"id" to id,
"keyboard_type" to keyboardType,
"letter_spacing" to letterSpacing,
"line_height" to lineHeight,
"margins" to margins,
"max_visible_lines" to maxVisibleLines,
"native_interface" to nativeInterface,
"paddings" to paddings,
"row_span" to rowSpan,
"select_all_on_focus" to selectAllOnFocus,
"selected_actions" to selectedActions,
"text_color" to textColor,
"text_variable" to textVariable,
"tooltips" to tooltips,
"transform" to transform,
"transition_change" to transitionChange,
"transition_in" to transitionIn,
"transition_out" to transitionOut,
"transition_triggers" to transitionTriggers,
"visibility" to visibility,
"visibility_action" to visibilityAction,
"visibility_actions" to visibilityActions,
"width" to width,
)
}
enum class KeyboardType(@JsonValue val value: String) {
SINGLE_LINE_TEXT("single_line_text"),
MULTI_LINE_TEXT("multi_line_text"),
PHONE("phone"),
NUMBER("number"),
EMAIL("email"),
URI("uri"),
}
class NativeInterface internal constructor(
@JsonIgnore val color: Property?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"color" to color,
)
}
}
}
fun TemplateContext.divInput(): LiteralProperty {
return value(DivInput(
accessibility = null,
alignmentHorizontal = null,
alignmentVertical = null,
alpha = null,
background = null,
border = null,
columnSpan = null,
extensions = null,
focus = null,
fontFamily = null,
fontSize = null,
fontSizeUnit = null,
fontWeight = null,
height = null,
highlightColor = null,
hintColor = null,
hintText = null,
id = null,
keyboardType = null,
letterSpacing = null,
lineHeight = null,
margins = null,
maxVisibleLines = null,
nativeInterface = null,
paddings = null,
rowSpan = null,
selectAllOnFocus = null,
selectedActions = null,
textColor = null,
textVariable = null,
tooltips = null,
transform = null,
transitionChange = null,
transitionIn = null,
transitionOut = null,
transitionTriggers = null,
visibility = null,
visibilityAction = null,
visibilityActions = null,
width = null,
))
}
fun TemplateContext.divInput(
textVariable: Property? = null,
accessibility: Property? = null,
alignmentHorizontal: Property? = null,
alignmentVertical: Property? = null,
alpha: Property? = null,
background: Property>? = null,
border: Property? = null,
columnSpan: Property? = null,
extensions: Property>? = null,
focus: Property? = null,
fontFamily: Property? = null,
fontSize: Property? = null,
fontSizeUnit: Property? = null,
fontWeight: Property? = null,
height: Property? = null,
highlightColor: Property? = null,
hintColor: Property? = null,
hintText: Property? = null,
id: Property? = null,
keyboardType: Property? = null,
letterSpacing: Property? = null,
lineHeight: Property? = null,
margins: Property? = null,
maxVisibleLines: Property? = null,
nativeInterface: Property? = null,
paddings: Property? = null,
rowSpan: Property? = null,
selectAllOnFocus: Property? = null,
selectedActions: Property>? = null,
textColor: Property? = null,
tooltips: Property>? = null,
transform: Property? = null,
transitionChange: Property? = null,
transitionIn: Property? = null,
transitionOut: Property? = null,
transitionTriggers: Property>? = null,
visibility: Property? = null,
visibilityAction: Property? = null,
visibilityActions: Property>? = null,
width: Property? = null,
): LiteralProperty {
return value(DivInput(
accessibility = accessibility,
alignmentHorizontal = alignmentHorizontal,
alignmentVertical = alignmentVertical,
alpha = alpha,
background = background,
border = border,
columnSpan = columnSpan,
extensions = extensions,
focus = focus,
fontFamily = fontFamily,
fontSize = fontSize,
fontSizeUnit = fontSizeUnit,
fontWeight = fontWeight,
height = height,
highlightColor = highlightColor,
hintColor = hintColor,
hintText = hintText,
id = id,
keyboardType = keyboardType,
letterSpacing = letterSpacing,
lineHeight = lineHeight,
margins = margins,
maxVisibleLines = maxVisibleLines,
nativeInterface = nativeInterface,
paddings = paddings,
rowSpan = rowSpan,
selectAllOnFocus = selectAllOnFocus,
selectedActions = selectedActions,
textColor = textColor,
textVariable = textVariable,
tooltips = tooltips,
transform = transform,
transitionChange = transitionChange,
transitionIn = transitionIn,
transitionOut = transitionOut,
transitionTriggers = transitionTriggers,
visibility = visibility,
visibilityAction = visibilityAction,
visibilityActions = visibilityActions,
width = width,
))
}
fun TemplateContext.divInput(
textVariable: String? = null,
accessibility: DivAccessibility? = null,
alignmentHorizontal: DivAlignmentHorizontal? = null,
alignmentVertical: DivAlignmentVertical? = null,
alpha: Double? = null,
background: List? = null,
border: DivBorder? = null,
columnSpan: Int? = null,
extensions: List? = null,
focus: DivFocus? = null,
fontFamily: DivFontFamily? = null,
fontSize: Int? = null,
fontSizeUnit: DivSizeUnit? = null,
fontWeight: DivFontWeight? = null,
height: DivSize? = null,
highlightColor: Color? = null,
hintColor: Color? = null,
hintText: String? = null,
id: String? = null,
keyboardType: DivInput.KeyboardType? = null,
letterSpacing: Double? = null,
lineHeight: Int? = null,
margins: DivEdgeInsets? = null,
maxVisibleLines: Int? = null,
nativeInterface: DivInput.NativeInterface? = null,
paddings: DivEdgeInsets? = null,
rowSpan: Int? = null,
selectAllOnFocus: BoolInt? = null,
selectedActions: List? = null,
textColor: Color? = null,
tooltips: List? = null,
transform: DivTransform? = null,
transitionChange: DivChangeTransition? = null,
transitionIn: DivAppearanceTransition? = null,
transitionOut: DivAppearanceTransition? = null,
transitionTriggers: List? = null,
visibility: DivVisibility? = null,
visibilityAction: DivVisibilityAction? = null,
visibilityActions: List? = null,
width: DivSize? = null,
): LiteralProperty {
return value(DivInput(
accessibility = optionalValue(accessibility),
alignmentHorizontal = optionalValue(alignmentHorizontal),
alignmentVertical = optionalValue(alignmentVertical),
alpha = optionalValue(alpha),
background = optionalValue(background),
border = optionalValue(border),
columnSpan = optionalValue(columnSpan),
extensions = optionalValue(extensions),
focus = optionalValue(focus),
fontFamily = optionalValue(fontFamily),
fontSize = optionalValue(fontSize),
fontSizeUnit = optionalValue(fontSizeUnit),
fontWeight = optionalValue(fontWeight),
height = optionalValue(height),
highlightColor = optionalValue(highlightColor),
hintColor = optionalValue(hintColor),
hintText = optionalValue(hintText),
id = optionalValue(id),
keyboardType = optionalValue(keyboardType),
letterSpacing = optionalValue(letterSpacing),
lineHeight = optionalValue(lineHeight),
margins = optionalValue(margins),
maxVisibleLines = optionalValue(maxVisibleLines),
nativeInterface = optionalValue(nativeInterface),
paddings = optionalValue(paddings),
rowSpan = optionalValue(rowSpan),
selectAllOnFocus = optionalValue(selectAllOnFocus),
selectedActions = optionalValue(selectedActions),
textColor = optionalValue(textColor),
textVariable = optionalValue(textVariable),
tooltips = optionalValue(tooltips),
transform = optionalValue(transform),
transitionChange = optionalValue(transitionChange),
transitionIn = optionalValue(transitionIn),
transitionOut = optionalValue(transitionOut),
transitionTriggers = optionalValue(transitionTriggers),
visibility = optionalValue(visibility),
visibilityAction = optionalValue(visibilityAction),
visibilityActions = optionalValue(visibilityActions),
width = optionalValue(width),
))
}
fun TemplateContext.nativeInterface(): LiteralProperty {
return value(DivInput.NativeInterface(
color = null,
))
}
fun TemplateContext.nativeInterface(
color: Property? = null,
): LiteralProperty {
return value(DivInput.NativeInterface(
color = color,
))
}
fun TemplateContext.nativeInterface(
color: Color? = null,
): LiteralProperty {
return value(DivInput.NativeInterface(
color = optionalValue(color),
))
}
fun CardContext.divInput(
textVariable: ValueProperty,
accessibility: ValueProperty? = null,
alignmentHorizontal: ValueProperty? = null,
alignmentVertical: ValueProperty? = null,
alpha: ValueProperty? = null,
background: ValueProperty>? = null,
border: ValueProperty? = null,
columnSpan: ValueProperty? = null,
extensions: ValueProperty>? = null,
focus: ValueProperty? = null,
fontFamily: ValueProperty? = null,
fontSize: ValueProperty? = null,
fontSizeUnit: ValueProperty? = null,
fontWeight: ValueProperty? = null,
height: ValueProperty? = null,
highlightColor: ValueProperty? = null,
hintColor: ValueProperty? = null,
hintText: ValueProperty? = null,
id: ValueProperty? = null,
keyboardType: ValueProperty? = null,
letterSpacing: ValueProperty? = null,
lineHeight: ValueProperty? = null,
margins: ValueProperty? = null,
maxVisibleLines: ValueProperty? = null,
nativeInterface: ValueProperty? = null,
paddings: ValueProperty? = null,
rowSpan: ValueProperty? = null,
selectAllOnFocus: ValueProperty? = null,
selectedActions: ValueProperty>? = null,
textColor: ValueProperty? = null,
tooltips: ValueProperty>? = null,
transform: ValueProperty? = null,
transitionChange: ValueProperty? = null,
transitionIn: ValueProperty? = null,
transitionOut: ValueProperty? = null,
transitionTriggers: ValueProperty>? = null,
visibility: ValueProperty? = null,
visibilityAction: ValueProperty? = null,
visibilityActions: ValueProperty>? = null,
width: ValueProperty? = null,
): DivInput {
return DivInput(
accessibility = accessibility,
alignmentHorizontal = alignmentHorizontal,
alignmentVertical = alignmentVertical,
alpha = alpha,
background = background,
border = border,
columnSpan = columnSpan,
extensions = extensions,
focus = focus,
fontFamily = fontFamily,
fontSize = fontSize,
fontSizeUnit = fontSizeUnit,
fontWeight = fontWeight,
height = height,
highlightColor = highlightColor,
hintColor = hintColor,
hintText = hintText,
id = id,
keyboardType = keyboardType,
letterSpacing = letterSpacing,
lineHeight = lineHeight,
margins = margins,
maxVisibleLines = maxVisibleLines,
nativeInterface = nativeInterface,
paddings = paddings,
rowSpan = rowSpan,
selectAllOnFocus = selectAllOnFocus,
selectedActions = selectedActions,
textColor = textColor,
textVariable = textVariable,
tooltips = tooltips,
transform = transform,
transitionChange = transitionChange,
transitionIn = transitionIn,
transitionOut = transitionOut,
transitionTriggers = transitionTriggers,
visibility = visibility,
visibilityAction = visibilityAction,
visibilityActions = visibilityActions,
width = width,
)
}
fun CardContext.divInput(
textVariable: String,
accessibility: DivAccessibility? = null,
alignmentHorizontal: DivAlignmentHorizontal? = null,
alignmentVertical: DivAlignmentVertical? = null,
alpha: Double? = null,
background: List? = null,
border: DivBorder? = null,
columnSpan: Int? = null,
extensions: List? = null,
focus: DivFocus? = null,
fontFamily: DivFontFamily? = null,
fontSize: Int? = null,
fontSizeUnit: DivSizeUnit? = null,
fontWeight: DivFontWeight? = null,
height: DivSize? = null,
highlightColor: Color? = null,
hintColor: Color? = null,
hintText: String? = null,
id: String? = null,
keyboardType: DivInput.KeyboardType? = null,
letterSpacing: Double? = null,
lineHeight: Int? = null,
margins: DivEdgeInsets? = null,
maxVisibleLines: Int? = null,
nativeInterface: DivInput.NativeInterface? = null,
paddings: DivEdgeInsets? = null,
rowSpan: Int? = null,
selectAllOnFocus: BoolInt? = null,
selectedActions: List? = null,
textColor: Color? = null,
tooltips: List? = null,
transform: DivTransform? = null,
transitionChange: DivChangeTransition? = null,
transitionIn: DivAppearanceTransition? = null,
transitionOut: DivAppearanceTransition? = null,
transitionTriggers: List? = null,
visibility: DivVisibility? = null,
visibilityAction: DivVisibilityAction? = null,
visibilityActions: List? = null,
width: DivSize? = null,
): DivInput {
return DivInput(
accessibility = optionalValue(accessibility),
alignmentHorizontal = optionalValue(alignmentHorizontal),
alignmentVertical = optionalValue(alignmentVertical),
alpha = optionalValue(alpha),
background = optionalValue(background),
border = optionalValue(border),
columnSpan = optionalValue(columnSpan),
extensions = optionalValue(extensions),
focus = optionalValue(focus),
fontFamily = optionalValue(fontFamily),
fontSize = optionalValue(fontSize),
fontSizeUnit = optionalValue(fontSizeUnit),
fontWeight = optionalValue(fontWeight),
height = optionalValue(height),
highlightColor = optionalValue(highlightColor),
hintColor = optionalValue(hintColor),
hintText = optionalValue(hintText),
id = optionalValue(id),
keyboardType = optionalValue(keyboardType),
letterSpacing = optionalValue(letterSpacing),
lineHeight = optionalValue(lineHeight),
margins = optionalValue(margins),
maxVisibleLines = optionalValue(maxVisibleLines),
nativeInterface = optionalValue(nativeInterface),
paddings = optionalValue(paddings),
rowSpan = optionalValue(rowSpan),
selectAllOnFocus = optionalValue(selectAllOnFocus),
selectedActions = optionalValue(selectedActions),
textColor = optionalValue(textColor),
textVariable = value(textVariable),
tooltips = optionalValue(tooltips),
transform = optionalValue(transform),
transitionChange = optionalValue(transitionChange),
transitionIn = optionalValue(transitionIn),
transitionOut = optionalValue(transitionOut),
transitionTriggers = optionalValue(transitionTriggers),
visibility = optionalValue(visibility),
visibilityAction = optionalValue(visibilityAction),
visibilityActions = optionalValue(visibilityActions),
width = optionalValue(width),
)
}
fun CardContext.nativeInterface(
color: ValueProperty,
): DivInput.NativeInterface {
return DivInput.NativeInterface(
color = color,
)
}
fun CardContext.nativeInterface(
color: Color,
): DivInput.NativeInterface {
return DivInput.NativeInterface(
color = value(color),
)
}