All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yandex.div.dsl.model.DivFocus.kt Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 30.19.0
Show newest version
// 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 DivFocus internal constructor(
    @JsonIgnore val background: Property>?,
    @JsonIgnore val border: Property?,
    @JsonIgnore val nextFocusIds: Property?,
    @JsonIgnore val onBlur: Property>?,
    @JsonIgnore val onFocus: Property>?,
) {

    @JsonAnyGetter
    internal fun properties(): Map {
        return propertyMapOf(
            "background" to background,
            "border" to border,
            "next_focus_ids" to nextFocusIds,
            "on_blur" to onBlur,
            "on_focus" to onFocus,
        )
    }

    class NextFocusIds internal constructor(
        @JsonIgnore val down: Property?,
        @JsonIgnore val forward: Property?,
        @JsonIgnore val left: Property?,
        @JsonIgnore val right: Property?,
        @JsonIgnore val up: Property?,
    ) {

        @JsonAnyGetter
        internal fun properties(): Map {
            return propertyMapOf(
                "down" to down,
                "forward" to forward,
                "left" to left,
                "right" to right,
                "up" to up,
            )
        }
    }
}

fun  TemplateContext.divFocus(): LiteralProperty {
    return value(DivFocus(
        background = null,
        border = null,
        nextFocusIds = null,
        onBlur = null,
        onFocus = null,
    ))
}

fun  TemplateContext.divFocus(
    background: Property>? = null,
    border: Property? = null,
    nextFocusIds: Property? = null,
    onBlur: Property>? = null,
    onFocus: Property>? = null,
): LiteralProperty {
    return value(DivFocus(
        background = background,
        border = border,
        nextFocusIds = nextFocusIds,
        onBlur = onBlur,
        onFocus = onFocus,
    ))
}

fun  TemplateContext.divFocus(
    background: List? = null,
    border: DivBorder? = null,
    nextFocusIds: DivFocus.NextFocusIds? = null,
    onBlur: List? = null,
    onFocus: List? = null,
): LiteralProperty {
    return value(DivFocus(
        background = optionalValue(background),
        border = optionalValue(border),
        nextFocusIds = optionalValue(nextFocusIds),
        onBlur = optionalValue(onBlur),
        onFocus = optionalValue(onFocus),
    ))
}

fun  TemplateContext.nextFocusIds(): LiteralProperty {
    return value(DivFocus.NextFocusIds(
        down = null,
        forward = null,
        left = null,
        right = null,
        up = null,
    ))
}

fun  TemplateContext.nextFocusIds(
    down: Property? = null,
    forward: Property? = null,
    left: Property? = null,
    right: Property? = null,
    up: Property? = null,
): LiteralProperty {
    return value(DivFocus.NextFocusIds(
        down = down,
        forward = forward,
        left = left,
        right = right,
        up = up,
    ))
}

fun  TemplateContext.nextFocusIds(
    down: String? = null,
    forward: String? = null,
    left: String? = null,
    right: String? = null,
    up: String? = null,
): LiteralProperty {
    return value(DivFocus.NextFocusIds(
        down = optionalValue(down),
        forward = optionalValue(forward),
        left = optionalValue(left),
        right = optionalValue(right),
        up = optionalValue(up),
    ))
}

fun CardContext.divFocus(): DivFocus {
    return DivFocus(
        background = null,
        border = null,
        nextFocusIds = null,
        onBlur = null,
        onFocus = null,
    )
}

fun CardContext.divFocus(
    background: ValueProperty>? = null,
    border: ValueProperty? = null,
    nextFocusIds: ValueProperty? = null,
    onBlur: ValueProperty>? = null,
    onFocus: ValueProperty>? = null,
): DivFocus {
    return DivFocus(
        background = background,
        border = border,
        nextFocusIds = nextFocusIds,
        onBlur = onBlur,
        onFocus = onFocus,
    )
}

fun CardContext.divFocus(
    background: List? = null,
    border: DivBorder? = null,
    nextFocusIds: DivFocus.NextFocusIds? = null,
    onBlur: List? = null,
    onFocus: List? = null,
): DivFocus {
    return DivFocus(
        background = optionalValue(background),
        border = optionalValue(border),
        nextFocusIds = optionalValue(nextFocusIds),
        onBlur = optionalValue(onBlur),
        onFocus = optionalValue(onFocus),
    )
}

fun CardContext.nextFocusIds(): DivFocus.NextFocusIds {
    return DivFocus.NextFocusIds(
        down = null,
        forward = null,
        left = null,
        right = null,
        up = null,
    )
}

fun CardContext.nextFocusIds(
    down: ValueProperty? = null,
    forward: ValueProperty? = null,
    left: ValueProperty? = null,
    right: ValueProperty? = null,
    up: ValueProperty? = null,
): DivFocus.NextFocusIds {
    return DivFocus.NextFocusIds(
        down = down,
        forward = forward,
        left = left,
        right = right,
        up = up,
    )
}

fun CardContext.nextFocusIds(
    down: String? = null,
    forward: String? = null,
    left: String? = null,
    right: String? = null,
    up: String? = null,
): DivFocus.NextFocusIds {
    return DivFocus.NextFocusIds(
        down = optionalValue(down),
        forward = optionalValue(forward),
        left = optionalValue(left),
        right = optionalValue(right),
        up = optionalValue(up),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy