com.yandex.div.dsl.model.DivPatch.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 DivPatch internal constructor(
@JsonIgnore val changes: Property>?,
@JsonIgnore val mode: Property?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"changes" to changes,
"mode" to mode,
)
}
enum class Mode(@JsonValue val value: String) {
TRANSACTIONAL("transactional"),
PARTIAL("partial"),
}
class Change internal constructor(
@JsonIgnore val id: Property?,
@JsonIgnore val items: Property>?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"id" to id,
"items" to items,
)
}
}
}
fun TemplateContext.divPatch(): LiteralProperty {
return value(DivPatch(
changes = null,
mode = null,
))
}
fun TemplateContext.divPatch(
changes: Property>? = null,
mode: Property? = null,
): LiteralProperty {
return value(DivPatch(
changes = changes,
mode = mode,
))
}
fun TemplateContext.divPatch(
changes: List? = null,
mode: DivPatch.Mode? = null,
): LiteralProperty {
return value(DivPatch(
changes = optionalValue(changes),
mode = optionalValue(mode),
))
}
fun TemplateContext.change(): LiteralProperty {
return value(DivPatch.Change(
id = null,
items = null,
))
}
fun TemplateContext.change(
id: Property? = null,
items: Property>? = null,
): LiteralProperty {
return value(DivPatch.Change(
id = id,
items = items,
))
}
fun TemplateContext.change(
id: String? = null,
items: List? = null,
): LiteralProperty {
return value(DivPatch.Change(
id = optionalValue(id),
items = optionalValue(items),
))
}
fun CardContext.divPatch(
changes: ValueProperty>,
mode: ValueProperty? = null,
): DivPatch {
return DivPatch(
changes = changes,
mode = mode,
)
}
fun CardContext.divPatch(
changes: List,
mode: DivPatch.Mode? = null,
): DivPatch {
return DivPatch(
changes = value(changes),
mode = optionalValue(mode),
)
}
fun CardContext.change(
id: ValueProperty,
items: ValueProperty>? = null,
): DivPatch.Change {
return DivPatch.Change(
id = id,
items = items,
)
}
fun CardContext.change(
id: String,
items: List? = null,
): DivPatch.Change {
return DivPatch.Change(
id = value(id),
items = optionalValue(items),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy