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

com.yandex.div.dsl.model.DivNinePatchBackground.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 DivNinePatchBackground internal constructor(
    @JsonIgnore val imageUrl: Property?,
    @JsonIgnore val insets: Property?,
) : DivBackground {

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

    @JsonAnyGetter
    internal fun properties(): Map {
        return propertyMapOf(
            "image_url" to imageUrl,
            "insets" to insets,
        )
    }
}

fun  TemplateContext.divNinePatchBackground(): LiteralProperty {
    return value(DivNinePatchBackground(
        imageUrl = null,
        insets = null,
    ))
}

fun  TemplateContext.divNinePatchBackground(
    imageUrl: Property? = null,
    insets: Property? = null,
): LiteralProperty {
    return value(DivNinePatchBackground(
        imageUrl = imageUrl,
        insets = insets,
    ))
}

fun  TemplateContext.divNinePatchBackground(
    imageUrl: URI? = null,
    insets: DivAbsoluteEdgeInsets? = null,
): LiteralProperty {
    return value(DivNinePatchBackground(
        imageUrl = optionalValue(imageUrl),
        insets = optionalValue(insets),
    ))
}

fun CardContext.divNinePatchBackground(
    imageUrl: ValueProperty,
    insets: ValueProperty,
): DivNinePatchBackground {
    return DivNinePatchBackground(
        imageUrl = imageUrl,
        insets = insets,
    )
}

fun CardContext.divNinePatchBackground(
    imageUrl: URI,
    insets: DivAbsoluteEdgeInsets,
): DivNinePatchBackground {
    return DivNinePatchBackground(
        imageUrl = value(imageUrl),
        insets = value(insets),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy