com.pulumi.awsnative.panorama.kotlin.PackageVersion.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.panorama.kotlin
import com.pulumi.awsnative.panorama.kotlin.enums.PackageVersionStatus
import com.pulumi.awsnative.panorama.kotlin.enums.PackageVersionStatus.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [PackageVersion].
*/
@PulumiTagMarker
public class PackageVersionResourceBuilder internal constructor() {
public var name: String? = null
public var args: PackageVersionArgs = PackageVersionArgs()
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 PackageVersionArgsBuilder.() -> Unit) {
val builder = PackageVersionArgsBuilder()
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(): PackageVersion {
val builtJavaResource = com.pulumi.awsnative.panorama.PackageVersion(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PackageVersion(builtJavaResource)
}
}
/**
* Schema for PackageVersion Resource Type
*/
public class PackageVersion internal constructor(
override val javaResource: com.pulumi.awsnative.panorama.PackageVersion,
) : KotlinCustomResource(javaResource, PackageVersionMapper) {
/**
* Whether the package version is the latest version.
*/
public val isLatestPatch: Output
get() = javaResource.isLatestPatch().applyValue({ args0 -> args0 })
/**
* Whether to mark the new version as the latest version.
*/
public val markLatest: Output?
get() = javaResource.markLatest().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An owner account.
*/
public val ownerAccount: Output?
get() = javaResource.ownerAccount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The package version's ARN.
*/
public val packageArn: Output
get() = javaResource.packageArn().applyValue({ args0 -> args0 })
/**
* A package ID.
*/
public val packageId: Output
get() = javaResource.packageId().applyValue({ args0 -> args0 })
/**
* The package version's name.
*/
public val packageName: Output
get() = javaResource.packageName().applyValue({ args0 -> args0 })
/**
* A package version.
*/
public val packageVersion: Output
get() = javaResource.packageVersion().applyValue({ args0 -> args0 })
/**
* A patch version.
*/
public val patchVersion: Output
get() = javaResource.patchVersion().applyValue({ args0 -> args0 })
/**
* The package version's registered time.
*/
public val registeredTime: Output
get() = javaResource.registeredTime().applyValue({ args0 -> args0 })
/**
* The package version's status.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The package version's status description.
*/
public val statusDescription: Output
get() = javaResource.statusDescription().applyValue({ args0 -> args0 })
/**
* If the version was marked latest, the new version to maker as latest.
*/
public val updatedLatestPatchVersion: Output?
get() = javaResource.updatedLatestPatchVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object PackageVersionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.panorama.PackageVersion::class == javaResource::class
override fun map(javaResource: Resource): PackageVersion = PackageVersion(
javaResource as
com.pulumi.awsnative.panorama.PackageVersion,
)
}
/**
* @see [PackageVersion].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PackageVersion].
*/
public suspend fun packageVersion(
name: String,
block: suspend PackageVersionResourceBuilder.() -> Unit,
): PackageVersion {
val builder = PackageVersionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PackageVersion].
* @param name The _unique_ name of the resulting resource.
*/
public fun packageVersion(name: String): PackageVersion {
val builder = PackageVersionResourceBuilder()
builder.name(name)
return builder.build()
}