
com.pulumi.awsnative.eventschemas.kotlin.Discoverer.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.eventschemas.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [Discoverer].
*/
@PulumiTagMarker
public class DiscovererResourceBuilder internal constructor() {
public var name: String? = null
public var args: DiscovererArgs = DiscovererArgs()
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 DiscovererArgsBuilder.() -> Unit) {
val builder = DiscovererArgsBuilder()
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(): Discoverer {
val builtJavaResource = com.pulumi.awsnative.eventschemas.Discoverer(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Discoverer(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EventSchemas::Discoverer
* ## Example Usage
* ### Example
* No Java example available.
*/
public class Discoverer internal constructor(
override val javaResource: com.pulumi.awsnative.eventschemas.Discoverer,
) : KotlinCustomResource(javaResource, DiscovererMapper) {
/**
* Defines whether event schemas from other accounts are discovered. Default is True.
*/
public val crossAccount: Output?
get() = javaResource.crossAccount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A description for the discoverer.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN of the discoverer.
*/
public val discovererArn: Output
get() = javaResource.discovererArn().applyValue({ args0 -> args0 })
/**
* The Id of the discoverer.
*/
public val discovererId: Output
get() = javaResource.discovererId().applyValue({ args0 -> args0 })
/**
* The ARN of the event bus.
*/
public val sourceArn: Output
get() = javaResource.sourceArn().applyValue({ args0 -> args0 })
/**
* Defines the current state of the discoverer.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* Tags associated with the resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object DiscovererMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.eventschemas.Discoverer::class == javaResource::class
override fun map(javaResource: Resource): Discoverer = Discoverer(
javaResource as
com.pulumi.awsnative.eventschemas.Discoverer,
)
}
/**
* @see [Discoverer].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Discoverer].
*/
public suspend fun discoverer(name: String, block: suspend DiscovererResourceBuilder.() -> Unit): Discoverer {
val builder = DiscovererResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Discoverer].
* @param name The _unique_ name of the resulting resource.
*/
public fun discoverer(name: String): Discoverer {
val builder = DiscovererResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy