com.yandex.div.dsl.model.DivSlideTransition.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 DivSlideTransition internal constructor(
@JsonIgnore val distance: Property?,
@JsonIgnore override val duration: Property?,
@JsonIgnore val edge: Property?,
@JsonIgnore override val interpolator: Property?,
@JsonIgnore override val startDelay: Property?,
) : DivAppearanceTransition, DivTransitionBase {
@JsonProperty("type") override val type = "slide"
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"distance" to distance,
"duration" to duration,
"edge" to edge,
"interpolator" to interpolator,
"start_delay" to startDelay,
)
}
enum class Edge(@JsonValue val value: String) {
LEFT("left"),
TOP("top"),
RIGHT("right"),
BOTTOM("bottom"),
}
}
fun TemplateContext.divSlideTransition(): LiteralProperty {
return value(DivSlideTransition(
distance = null,
duration = null,
edge = null,
interpolator = null,
startDelay = null,
))
}
fun TemplateContext.divSlideTransition(
distance: Property? = null,
duration: Property? = null,
edge: Property? = null,
interpolator: Property? = null,
startDelay: Property? = null,
): LiteralProperty {
return value(DivSlideTransition(
distance = distance,
duration = duration,
edge = edge,
interpolator = interpolator,
startDelay = startDelay,
))
}
fun TemplateContext.divSlideTransition(
distance: DivDimension? = null,
duration: Int? = null,
edge: DivSlideTransition.Edge? = null,
interpolator: DivAnimationInterpolator? = null,
startDelay: Int? = null,
): LiteralProperty {
return value(DivSlideTransition(
distance = optionalValue(distance),
duration = optionalValue(duration),
edge = optionalValue(edge),
interpolator = optionalValue(interpolator),
startDelay = optionalValue(startDelay),
))
}
fun CardContext.divSlideTransition(): DivSlideTransition {
return DivSlideTransition(
distance = null,
duration = null,
edge = null,
interpolator = null,
startDelay = null,
)
}
fun CardContext.divSlideTransition(
distance: ValueProperty? = null,
duration: ValueProperty? = null,
edge: ValueProperty? = null,
interpolator: ValueProperty? = null,
startDelay: ValueProperty? = null,
): DivSlideTransition {
return DivSlideTransition(
distance = distance,
duration = duration,
edge = edge,
interpolator = interpolator,
startDelay = startDelay,
)
}
fun CardContext.divSlideTransition(
distance: DivDimension? = null,
duration: Int? = null,
edge: DivSlideTransition.Edge? = null,
interpolator: DivAnimationInterpolator? = null,
startDelay: Int? = null,
): DivSlideTransition {
return DivSlideTransition(
distance = optionalValue(distance),
duration = optionalValue(duration),
edge = optionalValue(edge),
interpolator = optionalValue(interpolator),
startDelay = optionalValue(startDelay),
)
}