Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.yandex.div.dsl.model.DivAction.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.
// 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 DivAction internal constructor(
@JsonIgnore val downloadCallbacks: Property?,
@JsonIgnore val logId: Property?,
@JsonIgnore val logUrl: Property?,
@JsonIgnore val menuItems: Property>?,
@JsonIgnore val payload: Property>?,
@JsonIgnore val referer: Property?,
@JsonIgnore val target: Property?,
@JsonIgnore val url: Property?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"download_callbacks" to downloadCallbacks,
"log_id" to logId,
"log_url" to logUrl,
"menu_items" to menuItems,
"payload" to payload,
"referer" to referer,
"target" to target,
"url" to url,
)
}
enum class Target(@JsonValue val value: String) {
SELF("_self"),
BLANK("_blank"),
}
class MenuItem internal constructor(
@JsonIgnore val action: Property?,
@JsonIgnore val actions: Property>?,
@JsonIgnore val text: Property?,
) {
@JsonAnyGetter
internal fun properties(): Map {
return propertyMapOf(
"action" to action,
"actions" to actions,
"text" to text,
)
}
}
}
fun TemplateContext.divAction(): LiteralProperty {
return value(DivAction(
downloadCallbacks = null,
logId = null,
logUrl = null,
menuItems = null,
payload = null,
referer = null,
target = null,
url = null,
))
}
fun TemplateContext.divAction(
logId: Property? = null,
downloadCallbacks: Property? = null,
logUrl: Property? = null,
menuItems: Property>? = null,
payload: Property>? = null,
referer: Property? = null,
target: Property? = null,
url: Property? = null,
): LiteralProperty {
return value(DivAction(
downloadCallbacks = downloadCallbacks,
logId = logId,
logUrl = logUrl,
menuItems = menuItems,
payload = payload,
referer = referer,
target = target,
url = url,
))
}
fun TemplateContext.divAction(
logId: String? = null,
downloadCallbacks: DivDownloadCallbacks? = null,
logUrl: URI? = null,
menuItems: List? = null,
payload: Map? = null,
referer: URI? = null,
target: DivAction.Target? = null,
url: URI? = null,
): LiteralProperty {
return value(DivAction(
downloadCallbacks = optionalValue(downloadCallbacks),
logId = optionalValue(logId),
logUrl = optionalValue(logUrl),
menuItems = optionalValue(menuItems),
payload = optionalValue(payload),
referer = optionalValue(referer),
target = optionalValue(target),
url = optionalValue(url),
))
}
fun TemplateContext.menuItem(): LiteralProperty {
return value(DivAction.MenuItem(
action = null,
actions = null,
text = null,
))
}
fun TemplateContext.menuItem(
text: Property? = null,
action: Property? = null,
actions: Property>? = null,
): LiteralProperty {
return value(DivAction.MenuItem(
action = action,
actions = actions,
text = text,
))
}
fun TemplateContext.menuItem(
text: String? = null,
action: DivAction? = null,
actions: List? = null,
): LiteralProperty {
return value(DivAction.MenuItem(
action = optionalValue(action),
actions = optionalValue(actions),
text = optionalValue(text),
))
}
fun CardContext.divAction(
logId: ValueProperty,
downloadCallbacks: ValueProperty? = null,
logUrl: ValueProperty? = null,
menuItems: ValueProperty>? = null,
payload: ValueProperty>? = null,
referer: ValueProperty? = null,
target: ValueProperty? = null,
url: ValueProperty? = null,
): DivAction {
return DivAction(
downloadCallbacks = downloadCallbacks,
logId = logId,
logUrl = logUrl,
menuItems = menuItems,
payload = payload,
referer = referer,
target = target,
url = url,
)
}
fun CardContext.divAction(
logId: String,
downloadCallbacks: DivDownloadCallbacks? = null,
logUrl: URI? = null,
menuItems: List? = null,
payload: Map? = null,
referer: URI? = null,
target: DivAction.Target? = null,
url: URI? = null,
): DivAction {
return DivAction(
downloadCallbacks = optionalValue(downloadCallbacks),
logId = value(logId),
logUrl = optionalValue(logUrl),
menuItems = optionalValue(menuItems),
payload = optionalValue(payload),
referer = optionalValue(referer),
target = optionalValue(target),
url = optionalValue(url),
)
}
fun CardContext.menuItem(
text: ValueProperty,
action: ValueProperty? = null,
actions: ValueProperty>? = null,
): DivAction.MenuItem {
return DivAction.MenuItem(
action = action,
actions = actions,
text = text,
)
}
fun CardContext.menuItem(
text: String,
action: DivAction? = null,
actions: List? = null,
): DivAction.MenuItem {
return DivAction.MenuItem(
action = optionalValue(action),
actions = optionalValue(actions),
text = value(text),
)
}