com.yandex.div.dsl.model.NumberVariable.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 NumberVariable internal constructor(
@JsonIgnore val name: Property?,
@JsonIgnore val value: Property?,
) : DivVariable {
@JsonProperty("type") override val type = "number"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"name" to name,
"value" to value,
)
}
}
fun TemplateContext.numberVariable(): LiteralProperty {
return value(NumberVariable(
name = null,
value = null,
))
}
fun TemplateContext.numberVariable(
name: Property? = null,
value: Property? = null,
): LiteralProperty {
return value(NumberVariable(
name = name,
value = value,
))
}
fun TemplateContext.numberVariable(
name: String? = null,
value: Double? = null,
): LiteralProperty {
return value(NumberVariable(
name = optionalValue(name),
value = optionalValue(value),
))
}
fun CardContext.numberVariable(
name: ValueProperty,
value: ValueProperty,
): NumberVariable {
return NumberVariable(
name = name,
value = value,
)
}
fun CardContext.numberVariable(
name: String,
value: Double,
): NumberVariable {
return NumberVariable(
name = value(name),
value = value(value),
)
}