com.yandex.div.dsl.model.DivPageSize.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 DivPageSize internal constructor(
@JsonIgnore val pageWidth: Property?,
) : DivPagerLayoutMode {
@JsonProperty("type") override val type = "percentage"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"page_width" to pageWidth,
)
}
}
fun TemplateContext.divPageSize(): LiteralProperty {
return value(DivPageSize(
pageWidth = null,
))
}
fun TemplateContext.divPageSize(
pageWidth: Property? = null,
): LiteralProperty {
return value(DivPageSize(
pageWidth = pageWidth,
))
}
fun TemplateContext.divPageSize(
pageWidth: DivPercentageSize? = null,
): LiteralProperty {
return value(DivPageSize(
pageWidth = optionalValue(pageWidth),
))
}
fun CardContext.divPageSize(
pageWidth: ValueProperty,
): DivPageSize {
return DivPageSize(
pageWidth = pageWidth,
)
}
fun CardContext.divPageSize(
pageWidth: DivPercentageSize,
): DivPageSize {
return DivPageSize(
pageWidth = value(pageWidth),
)
}