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

commonMain.aws.sdk.kotlin.services.qapps.model.QPluginCard.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qapps.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A card in an Q App that integrates with a third-party plugin or service.
 */
public class QPluginCard private constructor(builder: Builder) {
    /**
     * The action identifier of the action to be performed by the plugin card.
     */
    public val actionIdentifier: kotlin.String? = builder.actionIdentifier
    /**
     * Any dependencies or requirements for the plugin card.
     */
    public val dependencies: List = requireNotNull(builder.dependencies) { "A non-null value must be provided for dependencies" }
    /**
     * The unique identifier of the plugin card.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The unique identifier of the plugin used by the card.
     */
    public val pluginId: kotlin.String = requireNotNull(builder.pluginId) { "A non-null value must be provided for pluginId" }
    /**
     * The type or category of the plugin used by the card.
     */
    public val pluginType: aws.sdk.kotlin.services.qapps.model.PluginType = requireNotNull(builder.pluginType) { "A non-null value must be provided for pluginType" }
    /**
     * The prompt or instructions displayed for the plugin card.
     */
    public val prompt: kotlin.String = requireNotNull(builder.prompt) { "A non-null value must be provided for prompt" }
    /**
     * The title or label of the plugin card.
     */
    public val title: kotlin.String = requireNotNull(builder.title) { "A non-null value must be provided for title" }
    /**
     * The type of the card.
     */
    public val type: aws.sdk.kotlin.services.qapps.model.CardType = requireNotNull(builder.type) { "A non-null value must be provided for type" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qapps.model.QPluginCard = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("QPluginCard(")
        append("actionIdentifier=$actionIdentifier,")
        append("dependencies=$dependencies,")
        append("id=$id,")
        append("pluginId=$pluginId,")
        append("pluginType=$pluginType,")
        append("prompt=$prompt,")
        append("title=$title,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionIdentifier?.hashCode() ?: 0
        result = 31 * result + (dependencies.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (pluginId.hashCode())
        result = 31 * result + (pluginType.hashCode())
        result = 31 * result + (prompt.hashCode())
        result = 31 * result + (title.hashCode())
        result = 31 * result + (type.hashCode())
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as QPluginCard

        if (actionIdentifier != other.actionIdentifier) return false
        if (dependencies != other.dependencies) return false
        if (id != other.id) return false
        if (pluginId != other.pluginId) return false
        if (pluginType != other.pluginType) return false
        if (prompt != other.prompt) return false
        if (title != other.title) return false
        if (type != other.type) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qapps.model.QPluginCard = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The action identifier of the action to be performed by the plugin card.
         */
        public var actionIdentifier: kotlin.String? = null
        /**
         * Any dependencies or requirements for the plugin card.
         */
        public var dependencies: List? = null
        /**
         * The unique identifier of the plugin card.
         */
        public var id: kotlin.String? = null
        /**
         * The unique identifier of the plugin used by the card.
         */
        public var pluginId: kotlin.String? = null
        /**
         * The type or category of the plugin used by the card.
         */
        public var pluginType: aws.sdk.kotlin.services.qapps.model.PluginType? = null
        /**
         * The prompt or instructions displayed for the plugin card.
         */
        public var prompt: kotlin.String? = null
        /**
         * The title or label of the plugin card.
         */
        public var title: kotlin.String? = null
        /**
         * The type of the card.
         */
        public var type: aws.sdk.kotlin.services.qapps.model.CardType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qapps.model.QPluginCard) : this() {
            this.actionIdentifier = x.actionIdentifier
            this.dependencies = x.dependencies
            this.id = x.id
            this.pluginId = x.pluginId
            this.pluginType = x.pluginType
            this.prompt = x.prompt
            this.title = x.title
            this.type = x.type
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.qapps.model.QPluginCard = QPluginCard(this)

        internal fun correctErrors(): Builder {
            if (dependencies == null) dependencies = emptyList()
            if (id == null) id = ""
            if (pluginId == null) pluginId = ""
            if (pluginType == null) pluginType = PluginType.SdkUnknown("no value provided")
            if (prompt == null) prompt = ""
            if (title == null) title = ""
            if (type == null) type = CardType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy