com.yandex.div.dsl.model.DivRoundedRectangleShape.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 DivRoundedRectangleShape internal constructor(
@JsonIgnore val cornerRadius: Property?,
@JsonIgnore val itemHeight: Property?,
@JsonIgnore val itemWidth: Property?,
) : DivShape {
@JsonProperty("type") override val type = "rounded_rectangle"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"corner_radius" to cornerRadius,
"item_height" to itemHeight,
"item_width" to itemWidth,
)
}
}
fun TemplateContext.divRoundedRectangleShape(): LiteralProperty {
return value(DivRoundedRectangleShape(
cornerRadius = null,
itemHeight = null,
itemWidth = null,
))
}
fun TemplateContext.divRoundedRectangleShape(
cornerRadius: Property? = null,
itemHeight: Property? = null,
itemWidth: Property? = null,
): LiteralProperty {
return value(DivRoundedRectangleShape(
cornerRadius = cornerRadius,
itemHeight = itemHeight,
itemWidth = itemWidth,
))
}
fun TemplateContext.divRoundedRectangleShape(
cornerRadius: DivFixedSize? = null,
itemHeight: DivFixedSize? = null,
itemWidth: DivFixedSize? = null,
): LiteralProperty {
return value(DivRoundedRectangleShape(
cornerRadius = optionalValue(cornerRadius),
itemHeight = optionalValue(itemHeight),
itemWidth = optionalValue(itemWidth),
))
}
fun CardContext.divRoundedRectangleShape(): DivRoundedRectangleShape {
return DivRoundedRectangleShape(
cornerRadius = null,
itemHeight = null,
itemWidth = null,
)
}
fun CardContext.divRoundedRectangleShape(
cornerRadius: ValueProperty? = null,
itemHeight: ValueProperty? = null,
itemWidth: ValueProperty? = null,
): DivRoundedRectangleShape {
return DivRoundedRectangleShape(
cornerRadius = cornerRadius,
itemHeight = itemHeight,
itemWidth = itemWidth,
)
}
fun CardContext.divRoundedRectangleShape(
cornerRadius: DivFixedSize? = null,
itemHeight: DivFixedSize? = null,
itemWidth: DivFixedSize? = null,
): DivRoundedRectangleShape {
return DivRoundedRectangleShape(
cornerRadius = optionalValue(cornerRadius),
itemHeight = optionalValue(itemHeight),
itemWidth = optionalValue(itemWidth),
)
}