divkit.dsl.DictVariable.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.
@file:Suppress(
"unused",
"UNUSED_PARAMETER",
)
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
* An arbitrary object in JSON format.
*
* Can be created using the method [dictVariable].
*
* Required parameters: `value, type, name`.
*/
@Generated
class DictVariable internal constructor(
@JsonIgnore
val properties: Properties,
) : Variable {
@JsonAnyGetter
internal fun getJsonProperties(): Map = properties.mergeWith(
mapOf("type" to "dict")
)
operator fun plus(additive: Properties): DictVariable = DictVariable(
Properties(
name = additive.name ?: properties.name,
value = additive.value ?: properties.value,
)
)
class Properties internal constructor(
/**
* Variable name.
*/
val name: Property?,
/**
* Value.
*/
val value: Property