All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yandex.div.dsl.model.DivImageBackground.kt Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 30.19.0
Show newest version
// 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 DivImageBackground internal constructor(
    @JsonIgnore val alpha: Property?,
    @JsonIgnore val contentAlignmentHorizontal: Property?,
    @JsonIgnore val contentAlignmentVertical: Property?,
    @JsonIgnore val filters: Property>?,
    @JsonIgnore val imageUrl: Property?,
    @JsonIgnore val preloadRequired: Property?,
    @JsonIgnore val scale: Property?,
) : DivBackground {

    @JsonProperty("type") override val type = "image"

    @JsonAnyGetter
    internal fun properties(): Map {
        return propertyMapOf(
            "alpha" to alpha,
            "content_alignment_horizontal" to contentAlignmentHorizontal,
            "content_alignment_vertical" to contentAlignmentVertical,
            "filters" to filters,
            "image_url" to imageUrl,
            "preload_required" to preloadRequired,
            "scale" to scale,
        )
    }
}

fun  TemplateContext.divImageBackground(): LiteralProperty {
    return value(DivImageBackground(
        alpha = null,
        contentAlignmentHorizontal = null,
        contentAlignmentVertical = null,
        filters = null,
        imageUrl = null,
        preloadRequired = null,
        scale = null,
    ))
}

fun  TemplateContext.divImageBackground(
    imageUrl: Property? = null,
    alpha: Property? = null,
    contentAlignmentHorizontal: Property? = null,
    contentAlignmentVertical: Property? = null,
    filters: Property>? = null,
    preloadRequired: Property? = null,
    scale: Property? = null,
): LiteralProperty {
    return value(DivImageBackground(
        alpha = alpha,
        contentAlignmentHorizontal = contentAlignmentHorizontal,
        contentAlignmentVertical = contentAlignmentVertical,
        filters = filters,
        imageUrl = imageUrl,
        preloadRequired = preloadRequired,
        scale = scale,
    ))
}

fun  TemplateContext.divImageBackground(
    imageUrl: URI? = null,
    alpha: Double? = null,
    contentAlignmentHorizontal: DivAlignmentHorizontal? = null,
    contentAlignmentVertical: DivAlignmentVertical? = null,
    filters: List? = null,
    preloadRequired: BoolInt? = null,
    scale: DivImageScale? = null,
): LiteralProperty {
    return value(DivImageBackground(
        alpha = optionalValue(alpha),
        contentAlignmentHorizontal = optionalValue(contentAlignmentHorizontal),
        contentAlignmentVertical = optionalValue(contentAlignmentVertical),
        filters = optionalValue(filters),
        imageUrl = optionalValue(imageUrl),
        preloadRequired = optionalValue(preloadRequired),
        scale = optionalValue(scale),
    ))
}

fun CardContext.divImageBackground(
    imageUrl: ValueProperty,
    alpha: ValueProperty? = null,
    contentAlignmentHorizontal: ValueProperty? = null,
    contentAlignmentVertical: ValueProperty? = null,
    filters: ValueProperty>? = null,
    preloadRequired: ValueProperty? = null,
    scale: ValueProperty? = null,
): DivImageBackground {
    return DivImageBackground(
        alpha = alpha,
        contentAlignmentHorizontal = contentAlignmentHorizontal,
        contentAlignmentVertical = contentAlignmentVertical,
        filters = filters,
        imageUrl = imageUrl,
        preloadRequired = preloadRequired,
        scale = scale,
    )
}

fun CardContext.divImageBackground(
    imageUrl: URI,
    alpha: Double? = null,
    contentAlignmentHorizontal: DivAlignmentHorizontal? = null,
    contentAlignmentVertical: DivAlignmentVertical? = null,
    filters: List? = null,
    preloadRequired: BoolInt? = null,
    scale: DivImageScale? = null,
): DivImageBackground {
    return DivImageBackground(
        alpha = optionalValue(alpha),
        contentAlignmentHorizontal = optionalValue(contentAlignmentHorizontal),
        contentAlignmentVertical = optionalValue(contentAlignmentVertical),
        filters = optionalValue(filters),
        imageUrl = value(imageUrl),
        preloadRequired = optionalValue(preloadRequired),
        scale = optionalValue(scale),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy