![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.glue.kotlin.SchemaVersion.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.glue.kotlin
import com.pulumi.awsnative.glue.kotlin.outputs.SchemaVersionSchema
import com.pulumi.awsnative.glue.kotlin.outputs.SchemaVersionSchema.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
/**
* Builder for [SchemaVersion].
*/
@PulumiTagMarker
public class SchemaVersionResourceBuilder internal constructor() {
public var name: String? = null
public var args: SchemaVersionArgs = SchemaVersionArgs()
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 SchemaVersionArgsBuilder.() -> Unit) {
val builder = SchemaVersionArgsBuilder()
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(): SchemaVersion {
val builtJavaResource = com.pulumi.awsnative.glue.SchemaVersion(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SchemaVersion(builtJavaResource)
}
}
/**
* This resource represents an individual schema version of a schema defined in Glue Schema Registry.
*/
public class SchemaVersion internal constructor(
override val javaResource: com.pulumi.awsnative.glue.SchemaVersion,
) : KotlinCustomResource(javaResource, SchemaVersionMapper) {
/**
* The schema that includes the schema version.
*/
public val schema: Output
get() = javaResource.schema().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* Complete definition of the schema in plain-text.
*/
public val schemaDefinition: Output
get() = javaResource.schemaDefinition().applyValue({ args0 -> args0 })
/**
* Represents the version ID associated with the schema version.
*/
public val versionId: Output
get() = javaResource.versionId().applyValue({ args0 -> args0 })
}
public object SchemaVersionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.glue.SchemaVersion::class == javaResource::class
override fun map(javaResource: Resource): SchemaVersion = SchemaVersion(
javaResource as
com.pulumi.awsnative.glue.SchemaVersion,
)
}
/**
* @see [SchemaVersion].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SchemaVersion].
*/
public suspend fun schemaVersion(
name: String,
block: suspend SchemaVersionResourceBuilder.() -> Unit,
): SchemaVersion {
val builder = SchemaVersionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SchemaVersion].
* @param name The _unique_ name of the resulting resource.
*/
public fun schemaVersion(name: String): SchemaVersion {
val builder = SchemaVersionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy