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

divkit.dsl.ActionCopyToClipboard.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
@file:Suppress(
    "unused",
    "UNUSED_PARAMETER",
)

package divkit.dsl

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 * Copies data to the clipboard.
 * 
 * Can be created using the method [actionCopyToClipboard].
 * 
 * Required parameters: `type, content`.
 */
@Generated
class ActionCopyToClipboard internal constructor(
    @JsonIgnore
    val properties: Properties,
) : ActionTyped {
    @JsonAnyGetter
    internal fun getJsonProperties(): Map = properties.mergeWith(
        mapOf("type" to "copy_to_clipboard")
    )

    operator fun plus(additive: Properties): ActionCopyToClipboard = ActionCopyToClipboard(
        Properties(
            content = additive.content ?: properties.content,
        )
    )

    class Properties internal constructor(
        val content: Property?,
    ) {
        internal fun mergeWith(properties: Map): Map {
            val result = mutableMapOf()
            result.putAll(properties)
            result.tryPutProperty("content", content)
            return result
        }
    }
}

@Generated
fun DivScope.actionCopyToClipboard(
    `use named arguments`: Guard = Guard.instance,
    content: ActionCopyToClipboardContent? = null,
): ActionCopyToClipboard = ActionCopyToClipboard(
    ActionCopyToClipboard.Properties(
        content = valueOrNull(content),
    )
)

@Generated
fun DivScope.actionCopyToClipboardProps(
    `use named arguments`: Guard = Guard.instance,
    content: ActionCopyToClipboardContent? = null,
) = ActionCopyToClipboard.Properties(
    content = valueOrNull(content),
)

@Generated
fun TemplateScope.actionCopyToClipboardRefs(
    `use named arguments`: Guard = Guard.instance,
    content: ReferenceProperty? = null,
) = ActionCopyToClipboard.Properties(
    content = content,
)

@Generated
fun ActionCopyToClipboard.override(
    `use named arguments`: Guard = Guard.instance,
    content: ActionCopyToClipboardContent? = null,
): ActionCopyToClipboard = ActionCopyToClipboard(
    ActionCopyToClipboard.Properties(
        content = valueOrNull(content) ?: properties.content,
    )
)

@Generated
fun ActionCopyToClipboard.defer(
    `use named arguments`: Guard = Guard.instance,
    content: ReferenceProperty? = null,
): ActionCopyToClipboard = ActionCopyToClipboard(
    ActionCopyToClipboard.Properties(
        content = content ?: properties.content,
    )
)

@Generated
fun ActionCopyToClipboard.asList() = listOf(this)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy