![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.eventschemas.kotlin.Schema.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 [Schema].
*/
@PulumiTagMarker
public class SchemaResourceBuilder internal constructor() {
public var name: String? = null
public var args: SchemaArgs = SchemaArgs()
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 SchemaArgsBuilder.() -> Unit) {
val builder = SchemaArgsBuilder()
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(): Schema {
val builtJavaResource = com.pulumi.awsnative.eventschemas.Schema(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Schema(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EventSchemas::Schema
* ## Example Usage
* ### Example
* No Java example available.
*/
public class Schema internal constructor(
override val javaResource: com.pulumi.awsnative.eventschemas.Schema,
) : KotlinCustomResource(javaResource, SchemaMapper) {
/**
* The source of the schema definition.
*/
public val content: Output
get() = javaResource.content().applyValue({ args0 -> args0 })
/**
* A description of the schema.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The last modified time of the schema.
*/
public val lastModified: Output
get() = javaResource.lastModified().applyValue({ args0 -> args0 })
/**
* The name of the schema registry.
*/
public val registryName: Output
get() = javaResource.registryName().applyValue({ args0 -> args0 })
/**
* The ARN of the schema.
*/
public val schemaArn: Output
get() = javaResource.schemaArn().applyValue({ args0 -> args0 })
/**
* The name of the schema.
*/
public val schemaName: Output?
get() = javaResource.schemaName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The version number of the schema.
*/
public val schemaVersion: Output
get() = javaResource.schemaVersion().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)
})
/**
* The type of schema. Valid types include OpenApi3 and JSONSchemaDraft4.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The date the schema version was created.
*/
public val versionCreatedDate: Output
get() = javaResource.versionCreatedDate().applyValue({ args0 -> args0 })
}
public object SchemaMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.eventschemas.Schema::class == javaResource::class
override fun map(javaResource: Resource): Schema = Schema(
javaResource as
com.pulumi.awsnative.eventschemas.Schema,
)
}
/**
* @see [Schema].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Schema].
*/
public suspend fun schema(name: String, block: suspend SchemaResourceBuilder.() -> Unit): Schema {
val builder = SchemaResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Schema].
* @param name The _unique_ name of the resulting resource.
*/
public fun schema(name: String): Schema {
val builder = SchemaResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy