Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.yandex.div.dsl.model.DivPatch.kt Maven / Gradle / Ivy
// 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),
)
}