com.yandex.div.dsl.model.DivShapeDrawable.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 DivShapeDrawable internal constructor(
@JsonIgnore val color: Property?,
@JsonIgnore val shape: Property?,
@JsonIgnore val stroke: Property?,
) : DivDrawable {
@JsonProperty("type") override val type = "shape_drawable"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"color" to color,
"shape" to shape,
"stroke" to stroke,
)
}
}
fun TemplateContext.divShapeDrawable(): LiteralProperty {
return value(DivShapeDrawable(
color = null,
shape = null,
stroke = null,
))
}
fun TemplateContext.divShapeDrawable(
color: Property? = null,
shape: Property? = null,
stroke: Property? = null,
): LiteralProperty {
return value(DivShapeDrawable(
color = color,
shape = shape,
stroke = stroke,
))
}
fun TemplateContext.divShapeDrawable(
color: Color? = null,
shape: DivShape? = null,
stroke: DivStroke? = null,
): LiteralProperty {
return value(DivShapeDrawable(
color = optionalValue(color),
shape = optionalValue(shape),
stroke = optionalValue(stroke),
))
}
fun CardContext.divShapeDrawable(
color: ValueProperty,
shape: ValueProperty,
stroke: ValueProperty? = null,
): DivShapeDrawable {
return DivShapeDrawable(
color = color,
shape = shape,
stroke = stroke,
)
}
fun CardContext.divShapeDrawable(
color: Color,
shape: DivShape,
stroke: DivStroke? = null,
): DivShapeDrawable {
return DivShapeDrawable(
color = value(color),
shape = value(shape),
stroke = optionalValue(stroke),
)
}