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

com.pulumi.awsnative.qbusiness.kotlin.Retriever.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.qbusiness.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.qbusiness.kotlin.enums.RetrieverStatus
import com.pulumi.awsnative.qbusiness.kotlin.enums.RetrieverType
import com.pulumi.awsnative.qbusiness.kotlin.outputs.RetrieverConfiguration0Properties
import com.pulumi.awsnative.qbusiness.kotlin.outputs.RetrieverConfiguration1Properties
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.RetrieverStatus.Companion.toKotlin as retrieverStatusToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.RetrieverType.Companion.toKotlin as retrieverTypeToKotlin

/**
 * Builder for [Retriever].
 */
@PulumiTagMarker
public class RetrieverResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RetrieverArgs = RetrieverArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend RetrieverArgsBuilder.() -> Unit) {
        val builder = RetrieverArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Retriever {
        val builtJavaResource = com.pulumi.awsnative.qbusiness.Retriever(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Retriever(builtJavaResource)
    }
}

/**
 * Definition of AWS::QBusiness::Retriever Resource Type
 */
public class Retriever internal constructor(
    override val javaResource: com.pulumi.awsnative.qbusiness.Retriever,
) : KotlinCustomResource(javaResource, RetrieverMapper) {
    /**
     * The identifier of the Amazon Q Business application using the retriever.
     */
    public val applicationId: Output
        get() = javaResource.applicationId().applyValue({ args0 -> args0 })

    /**
     * Provides information on how the retriever used for your Amazon Q Business application is configured.
     */
    public val configuration:
        Output>
        get() = javaResource.configuration().applyValue({ args0 ->
            args0.transform(
                { args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.qbusiness.kotlin.outputs.RetrieverConfiguration0Properties.Companion.toKotlin(args0)
                    })
                },
                { args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.qbusiness.kotlin.outputs.RetrieverConfiguration1Properties.Companion.toKotlin(args0)
                    })
                },
            )
        })

    /**
     * The Unix timestamp when the retriever was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The name of your retriever.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the IAM role associated with the retriever.
     */
    public val retrieverArn: Output
        get() = javaResource.retrieverArn().applyValue({ args0 -> args0 })

    /**
     * The identifier of the retriever used by your Amazon Q Business application.
     */
    public val retrieverId: Output
        get() = javaResource.retrieverId().applyValue({ args0 -> args0 })

    /**
     * The ARN of an IAM role used by Amazon Q Business to access the basic authentication credentials stored in a Secrets Manager secret.
     */
    public val roleArn: Output?
        get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The status of your retriever.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                retrieverStatusToKotlin(args0)
            })
        })

    /**
     * A list of key-value pairs that identify or categorize the retriever. You can also use tags to help control access to the retriever. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The type of your retriever.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 ->
            args0.let({ args0 ->
                retrieverTypeToKotlin(args0)
            })
        })

    /**
     * The Unix timestamp when the retriever was last updated.
     */
    public val updatedAt: Output
        get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}

public object RetrieverMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.qbusiness.Retriever::class == javaResource::class

    override fun map(javaResource: Resource): Retriever = Retriever(
        javaResource as
            com.pulumi.awsnative.qbusiness.Retriever,
    )
}

/**
 * @see [Retriever].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Retriever].
 */
public suspend fun retriever(name: String, block: suspend RetrieverResourceBuilder.() -> Unit): Retriever {
    val builder = RetrieverResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Retriever].
 * @param name The _unique_ name of the resulting resource.
 */
public fun retriever(name: String): Retriever {
    val builder = RetrieverResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy