com.pulumi.awsnative.connect.kotlin.View.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.connect.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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
/**
* Builder for [View].
*/
@PulumiTagMarker
public class ViewResourceBuilder internal constructor() {
public var name: String? = null
public var args: ViewArgs = ViewArgs()
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 ViewArgsBuilder.() -> Unit) {
val builder = ViewArgsBuilder()
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(): View {
val builtJavaResource = com.pulumi.awsnative.connect.View(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return View(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Connect::View
*/
public class View internal constructor(
override val javaResource: com.pulumi.awsnative.connect.View,
) : KotlinCustomResource(javaResource, ViewMapper) {
/**
* The actions of the view in an array.
*/
public val actions: Output>
get() = javaResource.actions().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The description of the view.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the instance.
*/
public val instanceArn: Output
get() = javaResource.instanceArn().applyValue({ args0 -> args0 })
/**
* The name of the view.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* One or more tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
/**
* The template of the view as JSON.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Connect::View` for more information about the expected schema for this property.
*/
public val template: Output
get() = javaResource.template().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the view.
*/
public val viewArn: Output
get() = javaResource.viewArn().applyValue({ args0 -> args0 })
/**
* The view content hash.
*/
public val viewContentSha256: Output
get() = javaResource.viewContentSha256().applyValue({ args0 -> args0 })
/**
* The view id of the view.
*/
public val viewId: Output
get() = javaResource.viewId().applyValue({ args0 -> args0 })
}
public object ViewMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.connect.View::class == javaResource::class
override fun map(javaResource: Resource): View = View(
javaResource as
com.pulumi.awsnative.connect.View,
)
}
/**
* @see [View].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [View].
*/
public suspend fun view(name: String, block: suspend ViewResourceBuilder.() -> Unit): View {
val builder = ViewResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [View].
* @param name The _unique_ name of the resulting resource.
*/
public fun view(name: String): View {
val builder = ViewResourceBuilder()
builder.name(name)
return builder.build()
}