com.pulumi.awsnative.qbusiness.kotlin.Plugin.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.PluginBuildStatus
import com.pulumi.awsnative.qbusiness.kotlin.enums.PluginState
import com.pulumi.awsnative.qbusiness.kotlin.enums.PluginType
import com.pulumi.awsnative.qbusiness.kotlin.outputs.PluginCustomPluginConfiguration
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.Any
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.PluginBuildStatus.Companion.toKotlin as pluginBuildStatusToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.PluginState.Companion.toKotlin as pluginStateToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.PluginType.Companion.toKotlin as pluginTypeToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.outputs.PluginCustomPluginConfiguration.Companion.toKotlin as pluginCustomPluginConfigurationToKotlin
/**
* Builder for [Plugin].
*/
@PulumiTagMarker
public class PluginResourceBuilder internal constructor() {
public var name: String? = null
public var args: PluginArgs = PluginArgs()
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 PluginArgsBuilder.() -> Unit) {
val builder = PluginArgsBuilder()
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(): Plugin {
val builtJavaResource = com.pulumi.awsnative.qbusiness.Plugin(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Plugin(builtJavaResource)
}
}
/**
* Definition of AWS::QBusiness::Plugin Resource Type
*/
public class Plugin internal constructor(
override val javaResource: com.pulumi.awsnative.qbusiness.Plugin,
) : KotlinCustomResource(javaResource, PluginMapper) {
/**
* The identifier of the application that will contain the plugin.
*/
public val applicationId: Output
get() = javaResource.applicationId().applyValue({ args0 -> args0 })
/**
* Authentication configuration information for an Amazon Q Business plugin.
*/
public val authConfiguration: Output
get() = javaResource.authConfiguration().applyValue({ args0 -> args0 })
/**
* The current status of a plugin. A plugin is modified asynchronously.
*/
public val buildStatus: Output
get() = javaResource.buildStatus().applyValue({ args0 ->
args0.let({ args0 ->
pluginBuildStatusToKotlin(args0)
})
})
/**
* The timestamp for when the plugin was created.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* Configuration information required to create a custom plugin.
*/
public val customPluginConfiguration: Output?
get() = javaResource.customPluginConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> pluginCustomPluginConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the plugin.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of a plugin.
*/
public val pluginArn: Output
get() = javaResource.pluginArn().applyValue({ args0 -> args0 })
/**
* The identifier of the plugin.
*/
public val pluginId: Output
get() = javaResource.pluginId().applyValue({ args0 -> args0 })
/**
* The plugin server URL used for configuration.
*/
public val serverUrl: Output?
get() = javaResource.serverUrl().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The current status of the plugin.
*/
public val state: Output?
get() = javaResource.state().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
pluginStateToKotlin(args0)
})
}).orElse(null)
})
/**
* A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. 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 the plugin.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
pluginTypeToKotlin(args0)
})
})
/**
* The timestamp for when the plugin was last updated.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}
public object PluginMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.qbusiness.Plugin::class == javaResource::class
override fun map(javaResource: Resource): Plugin = Plugin(
javaResource as
com.pulumi.awsnative.qbusiness.Plugin,
)
}
/**
* @see [Plugin].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Plugin].
*/
public suspend fun plugin(name: String, block: suspend PluginResourceBuilder.() -> Unit): Plugin {
val builder = PluginResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Plugin].
* @param name The _unique_ name of the resulting resource.
*/
public fun plugin(name: String): Plugin {
val builder = PluginResourceBuilder()
builder.name(name)
return builder.build()
}