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

com.yandex.div.dsl.model.StringVariable.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.28.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 StringVariable internal constructor(
    @JsonIgnore val name: Property?,
    @JsonIgnore val value: Property?,
) : DivVariable {

    @JsonProperty("type") override val type = "string"

    @JsonAnyGetter
    internal fun properties(): Map {
        return propertyMapOf(
            "name" to name,
            "value" to value,
        )
    }
}

fun  TemplateContext.stringVariable(): LiteralProperty {
    return value(StringVariable(
        name = null,
        value = null,
    ))
}

fun  TemplateContext.stringVariable(
    name: Property? = null,
    value: Property? = null,
): LiteralProperty {
    return value(StringVariable(
        name = name,
        value = value,
    ))
}

fun  TemplateContext.stringVariable(
    name: String? = null,
    value: String? = null,
): LiteralProperty {
    return value(StringVariable(
        name = optionalValue(name),
        value = optionalValue(value),
    ))
}

fun CardContext.stringVariable(
    name: ValueProperty,
    value: ValueProperty,
): StringVariable {
    return StringVariable(
        name = name,
        value = value,
    )
}

fun CardContext.stringVariable(
    name: String,
    value: String,
): StringVariable {
    return StringVariable(
        name = value(name),
        value = value(value),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy