com.yandex.div.dsl.model.DivDimension.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 DivDimension internal constructor(
@JsonIgnore val unit: Property?,
@JsonIgnore val value: Property?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"unit" to unit,
"value" to value,
)
}
}
fun TemplateContext.divDimension(): LiteralProperty {
return value(DivDimension(
unit = null,
value = null,
))
}
fun TemplateContext.divDimension(
value: Property? = null,
unit: Property? = null,
): LiteralProperty {
return value(DivDimension(
unit = unit,
value = value,
))
}
fun TemplateContext.divDimension(
value: Double? = null,
unit: DivSizeUnit? = null,
): LiteralProperty {
return value(DivDimension(
unit = optionalValue(unit),
value = optionalValue(value),
))
}
fun CardContext.divDimension(
value: ValueProperty,
unit: ValueProperty? = null,
): DivDimension {
return DivDimension(
unit = unit,
value = value,
)
}
fun CardContext.divDimension(
value: Double,
unit: DivSizeUnit? = null,
): DivDimension {
return DivDimension(
unit = optionalValue(unit),
value = value(value),
)
}